Fixed the migrations to get to a baseline version you can log into.

This commit is contained in:
Griatch 2013-07-11 22:24:55 +02:00
parent c676c9965f
commit a4042920e0
7 changed files with 75 additions and 72 deletions

View file

@ -136,6 +136,8 @@ class SharedMemoryModelBase(ModelBase):
# dynamically create the wrapper properties for all fields not already handled
for field in cls._meta.fields:
fieldname = field.name
if not fieldname.startswith("db_"):
continue
wrappername = fieldname == "id" and "dbid" or fieldname.replace("db_", "")
if not hasattr(cls, wrappername):
# makes sure not to overload manually created wrappers on the model