add south migrations, convert update to python
This commit is contained in:
parent
dc1bd6bccd
commit
2c07dedac0
46 changed files with 2729 additions and 48 deletions
40
pandora/news/migrations/0001_initial.py
Normal file
40
pandora/news/migrations/0001_initial.py
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import datetime
|
||||
from south.db import db
|
||||
from south.v2 import SchemaMigration
|
||||
from django.db import models
|
||||
|
||||
|
||||
class Migration(SchemaMigration):
|
||||
|
||||
def forwards(self, orm):
|
||||
# Adding model 'News'
|
||||
db.create_table('news_news', (
|
||||
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
|
||||
('created', self.gf('django.db.models.fields.DateTimeField')(auto_now_add=True, blank=True)),
|
||||
('modified', self.gf('django.db.models.fields.DateTimeField')(auto_now=True, blank=True)),
|
||||
('title', self.gf('django.db.models.fields.TextField')()),
|
||||
('date', self.gf('django.db.models.fields.TextField')()),
|
||||
('text', self.gf('django.db.models.fields.TextField')()),
|
||||
))
|
||||
db.send_create_signal('news', ['News'])
|
||||
|
||||
|
||||
def backwards(self, orm):
|
||||
# Deleting model 'News'
|
||||
db.delete_table('news_news')
|
||||
|
||||
|
||||
models = {
|
||||
'news.news': {
|
||||
'Meta': {'object_name': 'News'},
|
||||
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
|
||||
'date': ('django.db.models.fields.TextField', [], {}),
|
||||
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||
'modified': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
|
||||
'text': ('django.db.models.fields.TextField', [], {}),
|
||||
'title': ('django.db.models.fields.TextField', [], {})
|
||||
}
|
||||
}
|
||||
|
||||
complete_apps = ['news']
|
||||
0
pandora/news/migrations/__init__.py
Normal file
0
pandora/news/migrations/__init__.py
Normal file
Loading…
Add table
Add a link
Reference in a new issue