|
|
@@ -81,3 +81,13 @@ To backup the database, execute the command
|
|
81
|
81
|
You can then restore your data into a freshly migrated new database with
|
|
82
|
82
|
|
|
83
|
83
|
python manage.py loaddata seum.json
|
|
|
84
|
+
|
|
|
85
|
+## Helpful commands
|
|
|
86
|
+
|
|
|
87
|
+### Inactive users
|
|
|
88
|
+
|
|
|
89
|
+To track down inactive users, launch `python manage.py shell` and type
|
|
|
90
|
+
|
|
|
91
|
+ no_reset = Counter.objects.annotate(num_resets=Count('resets__counter')).filter(num_resets=0)
|
|
|
92
|
+ no_like = Counter.objects.annotate(num_likes=Count('likes')).filter(num_likes=0)
|
|
|
93
|
+ [ (u.user.email, u.trigramme) for u in (no_rest & no-like)]
|