Django: OperationalError on initial syncdb when a reusable south app has user_post_save signal -
i have app integrates forked version of django-invitation has modified original model. therefore needs use south migrate existing databases.
the problem:
if fresh install of app new database, when initial syncdb occurs , superuser created django-invitation app receives user_post_save signal , tries create invitation_user... since south app, it's database tables have not been constructed of course triggers database error.
what recommended approach dealing issue?
idea 1) check if table exists in data base prior o trying save, require database hit every time user created.
idea 2)
try: invitation_user.save() except: django.db import connection connection.close() is there has better way...
since nobody has chimed in guess best thing go original idea#2:
try: #code fail on new database creation here except operationalerror: django.db import connection connection.close() i have been testing since original question , seems work great.
Comments
Post a Comment