summaryrefslogtreecommitdiff
path: root/news/migrations/0002_move_news_in.py
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2012-12-12 20:24:30 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2012-12-12 20:24:30 -0500
commitf9ae4f860ccf57e84032d7be9426331a9e06e979 (patch)
treec9d837d7e2750d22ba9049abc7cf3c4125f0c9e4 /news/migrations/0002_move_news_in.py
parent6c5c3355a97d35afb7f1eee284966ad0bf8cee3b (diff)
parent206000df736fde75a49c3178a8522d17f30a955e (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.py11
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': {