/
0003_activate_existing_entries.py
30 lines (24 loc) · 1.16 KB
/
0003_activate_existing_entries.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
orm['blog.Entry'].objects.update(is_active=True)
def backwards(self, orm):
"Write your backwards methods here."
models = {
'blog.entry': {
'Meta': {'ordering': "('-pub_date',)", 'object_name': 'Entry', 'db_table': "'blog_entries'"},
'author': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'body': ('django.db.models.fields.TextField', [], {}),
'headline': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'pub_date': ('django.db.models.fields.DateTimeField', [], {}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '50', 'db_index': 'True'}),
'summary': ('django.db.models.fields.TextField', [], {})
}
}
complete_apps = ['blog']