Django-registration compatibility issue with django 1.7

前端 未结 2 1272
梦毁少年i
梦毁少年i 2020-12-30 08:49

I\'ve been using [django-registration] (https://bitbucket.org/ubernostrum/django-registration) and now I have started using django 1.7b1 and here is the error I am getting t

2条回答
  •  無奈伤痛
    2020-12-30 09:36

    This note addresses your problem.

    I think the preferred way to import User is:

    from django.conf import settings
    User = settings.AUTH_USER_MODEL
    

    EDIT:

    Looks like this problem has been noted but the project admin is being difficult about making the change. link. This is a bigger problem with the updates in Django 1.7.

    I would say you could either: (1) fork the repo and make the change yourself, or (2) make the changes in your site packages folder after you pip install. The latter version won't work as well if you then push it to another server and install with requirements.txt. Note that if you do option 1 with requirements.txt, you'll want to point it to your repo rather than Django-registration.

提交回复
热议问题