Reset Django registration models?

277 views Asked by At

I am trying to implement django registration-redux 1.2. I installed the application and added to it settings.py of my project. I ran manage.py syncdb as well as makemigrations/migrate. Typing these commands again and I get no changes detected. However it seems like the tables are not getting created. When I try to register I get the following error:

ProgrammingError at /main/register/ (1146, "Table 'la_test_serve.registration_registrationprofile' doesn't exist")

Is there a way to reset the project/app so that these tables get created?

Thanks,

Robert

3

There are 3 answers

0
Richard John On

Try to run schemamigration for your registration apps

python manage.py schemamigration registration --initial

after that run migrate

python manage.py migrate registration

0
Henri Edouard Francois On

Remove the app from your "INSTALLED APPS" setting. Then run manage.py makemigrations and manage.py migrate. Reinstall the app. Note: If you didn't add 'registration' (yes, simply 'registration') to your "INSTALLED APPS", it won't work.

0
bsmith4 On

I found this error occurred when I was reinstalling django-registration-redux.

Either way, check that you have deleted not only the table for registration in the database but also ensure that in the migrations table delete the corresponding row, in this case 'registration'.