diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-12-12 20:24:30 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-12-12 20:24:30 -0500 |
commit | f9ae4f860ccf57e84032d7be9426331a9e06e979 (patch) | |
tree | c9d837d7e2750d22ba9049abc7cf3c4125f0c9e4 /news/migrations/0002_move_news_in.py | |
parent | 6c5c3355a97d35afb7f1eee284966ad0bf8cee3b (diff) | |
parent | 206000df736fde75a49c3178a8522d17f30a955e (diff) |
Merge tag 'release_2012-04-21'
Migrations, moving code around, random small improvements
Diffstat (limited to 'news/migrations/0002_move_news_in.py')
-rw-r--r-- | news/migrations/0002_move_news_in.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/news/migrations/0002_move_news_in.py b/news/migrations/0002_move_news_in.py index d6dafad4..43d68df4 100644 --- a/news/migrations/0002_move_news_in.py +++ b/news/migrations/0002_move_news_in.py @@ -7,14 +7,19 @@ from django.db import models class Migration(SchemaMigration): depends_on = ( - ('main', '0001_initial'), + ('main', '0031_move_news_out'), ) def forwards(self, orm): - pass + db.send_create_signal('news', ['News']) + if not db.dry_run: + ct = orm['contenttypes.ContentType'].objects + ct.filter(app_label='main', model='news').update(app_label='news') def backwards(self, orm): - pass + if not db.dry_run: + ct = orm['contenttypes.ContentType'].objects + ct.filter(app_label='news', model='news').update(app_label='main') models = { 'auth.group': { |