python - Django, South, and Guardian: Migrate -
i have 2 users, mh00h1 , mh00h2. have modela defines following in models.py:
class meta: permissions = ( ('read','read'), ('write','write'), )
from shell, went set permissions:
>>>> frhde = create modela instance >>>> assign_perm('read', mh00h2, frhde) doesnotexist: permission matching query not exist. lookup parameters {'codename': u'read', 'content_type': <contenttype: modela>}
i realized south
didn't migrate models after added class meta
modela
, confirmed this. changing read
read2
shows south
not detect change.
$ /manage.py schemamigration myapp --auto running migrations myapp: - nothing migrate. - loading initial data myapp. installed 0 object(s) 0 fixture(s) running migrations guardian: - nothing migrate. - loading initial data guardian. installed 0 object(s) 0 fixture(s)
how can schematicmigration correctly update database, or there better way not require redoing whole database?
thank you.
you can use ./manage.py syncdb --all
, or create signal in this post.
Comments
Post a Comment