added filename field for the 3d model
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +1,2 @@
|
|||||||
*.pyc
|
*.pyc
|
||||||
|
.DS_Store
|
||||||
|
|||||||
@@ -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 field 'Sample.model_filename'
|
||||||
|
db.add_column(u'common_sample', 'model_filename',
|
||||||
|
self.gf('django.db.models.fields.CharField')(max_length=1000, null=True),
|
||||||
|
keep_default=False)
|
||||||
|
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
# Deleting field 'Sample.model_filename'
|
||||||
|
db.delete_column(u'common_sample', 'model_filename')
|
||||||
|
|
||||||
|
|
||||||
|
models = {
|
||||||
|
u'common.category': {
|
||||||
|
'Meta': {'object_name': 'Category'},
|
||||||
|
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['common.Category']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'})
|
||||||
|
},
|
||||||
|
u'common.sample': {
|
||||||
|
'Meta': {'object_name': 'Sample'},
|
||||||
|
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'model_filename': ('django.db.models.fields.CharField', [], {'max_length': '1000', 'null': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['common.Category']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['common']
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
# -*- 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):
|
||||||
|
|
||||||
|
# Changing field 'Sample.model_filename'
|
||||||
|
db.alter_column(u'common_sample', 'model_filename', self.gf('django.db.models.fields.CharField')(default='', max_length=1000))
|
||||||
|
|
||||||
|
def backwards(self, orm):
|
||||||
|
|
||||||
|
# Changing field 'Sample.model_filename'
|
||||||
|
db.alter_column(u'common_sample', 'model_filename', self.gf('django.db.models.fields.CharField')(max_length=1000, null=True))
|
||||||
|
|
||||||
|
models = {
|
||||||
|
u'common.category': {
|
||||||
|
'Meta': {'object_name': 'Category'},
|
||||||
|
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['common.Category']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'})
|
||||||
|
},
|
||||||
|
u'common.sample': {
|
||||||
|
'Meta': {'object_name': 'Sample'},
|
||||||
|
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
|
||||||
|
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
|
||||||
|
'model_filename': ('django.db.models.fields.CharField', [], {'max_length': '1000'}),
|
||||||
|
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
|
||||||
|
'parent': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['common.Category']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
complete_apps = ['common']
|
||||||
@@ -18,5 +18,6 @@ class Category(CommonInfo):
|
|||||||
|
|
||||||
|
|
||||||
class Sample(CommonInfo):
|
class Sample(CommonInfo):
|
||||||
|
model_filename = models.CharField(max_length=1000)
|
||||||
parent = models.ForeignKey(Category, blank=True, null=True,
|
parent = models.ForeignKey(Category, blank=True, null=True,
|
||||||
on_delete=models.SET_NULL)
|
on_delete=models.SET_NULL)
|
||||||
|
|||||||
Binary file not shown.
@@ -156,3 +156,11 @@ LOGGING = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Custom config settings
|
||||||
|
MODEL_DIRS = (
|
||||||
|
# put model directories here, separated by commas. If there are
|
||||||
|
# models with the same name under different directories, the first
|
||||||
|
# directory will be used
|
||||||
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user