Django: relation “django_site” does not exist

前端 未结 10 1373
北荒
北荒 2020-12-05 10:30

I am running a test django server on aws and I just installed django-userena and when I try to signup a user upon clicking submit, I get the following message:

10条回答
  •  失恋的感觉
    2020-12-05 11:20

    I experienced the same problem with creating a new empty database for my project (which uses zinnia)

    Running 'manage migrate site' before 'manage migrate' did not solve anything. It seems that the complete project was loaded before any table creating was done.

    I resolved to catching the errors that importing the zinnia releated app produced.

    e.g.: in the urls.py of the app

    urlpatterns = None
    app_name = 'something'
    
    try:
        from .views import MyEntryCreate
    
    
        urlpatterns = [
    
        url(r'^blogentry/create/$',
            login_required(MyEntryCreate.as_view()),
            name='zinnia_entry-add'),
    
        ]
    except Exception as e:
        logger.error(app_name+" Error urls: "+str(e))
        urlpatterns = []
    

    Had to do something like that elsewhere in that app, and 'manage migrate' worked again.

提交回复
热议问题