aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/db/migrations.py
diff options
context:
space:
mode:
authortilly-Q <nattilypigeonfowl@gmail.com>2013-10-08 18:42:59 -0400
committertilly-Q <nattilypigeonfowl@gmail.com>2013-10-08 18:42:59 -0400
commit0b1fcaebf5954bc1cc672145b1411b499ebb1bf7 (patch)
tree896f4b6598c65a636f937f75db2ae6bc204d1eda /mediagoblin/db/migrations.py
parent0a24db84c5769149537b0d9bd8e3a88fe8e9522a (diff)
downloadmediagoblin-0b1fcaebf5954bc1cc672145b1411b499ebb1bf7.tar.lz
mediagoblin-0b1fcaebf5954bc1cc672145b1411b499ebb1bf7.tar.xz
mediagoblin-0b1fcaebf5954bc1cc672145b1411b499ebb1bf7.zip
This was a quick update to clean up some of my templates and fix the formatting
in some of my other bits of code. In migrations.py, I clarified the comments & fixed the code to stay within 80 columns. In each of the templates, I fixed the spacing as well to stay within 80 columns and I also corrected my improper uses of the trans tag to ensure that these pages can be translated correctly.
Diffstat (limited to 'mediagoblin/db/migrations.py')
-rw-r--r--mediagoblin/db/migrations.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py
index 7011d842..6616b657 100644
--- a/mediagoblin/db/migrations.py
+++ b/mediagoblin/db/migrations.py
@@ -607,24 +607,28 @@ def create_moderation_tables(db):
]
# Give each user the appopriate privileges depending whether they are an
- # admin, an active user or an inactivated user ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ # admin, an active user or an inactive user ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
for admin_user in admin_users_ids:
admin_user_id = admin_user['id']
- for privilege_id in [admin_privilege_id, uploader_privilege_id, reporter_privilege_id, commenter_privilege_id, active_privilege_id]:
+ for privilege_id in [admin_privilege_id, uploader_privilege_id,
+ reporter_privilege_id, commenter_privilege_id,
+ active_privilege_id]:
db.execute(user_privilege_assoc.insert().values(
core__privilege_id=admin_user_id,
core__user_id=privilege_id))
for active_user in active_users_ids:
active_user_id = active_user['id']
- for privilege_id in [uploader_privilege_id, reporter_privilege_id, commenter_privilege_id, active_privilege_id]:
+ for privilege_id in [uploader_privilege_id, reporter_privilege_id,
+ commenter_privilege_id, active_privilege_id]:
db.execute(user_privilege_assoc.insert().values(
core__privilege_id=active_user_id,
core__user_id=privilege_id))
for inactive_user in inactive_users_ids:
inactive_user_id = inactive_user['id']
- for privilege_id in [uploader_privilege_id, reporter_privilege_id, commenter_privilege_id]:
+ for privilege_id in [uploader_privilege_id, reporter_privilege_id,
+ commenter_privilege_id]:
db.execute(user_privilege_assoc.insert().values(
core__privilege_id=inactive_user_id,
core__user_id=privilege_id))
@@ -660,7 +664,7 @@ def create_moderation_tables(db):
db.commit()
new_user_table.rename("core__users")
else:
- # If the db is not SQLite, this process is much simpler ~~~~~~~~~~~~~~~
+ # If the db is not run using SQLite, this process is much simpler ~~~~~
status = user_table.columns['status']
email_verified = user_table.columns['email_verified']