Django-registration compatibility issue with django 1.7

前端 未结 2 1269
梦毁少年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.

    0 讨论(0)
  • 2020-12-30 09:40

    Don't use the django-registration available from PyPI. It does not support Django 1.7 and it appears it never will. The repo maintainer has abdicated and the project appears unmaintained.

    There is a maintenance fork available on Github which has worked well for me with Django 1.7:

    https://github.com/macropin/django-registration

    It's available from PyPI as django-registration-redux.

    https://pypi.python.org/pypi/django-registration-redux/

    You can install using pip:

    pip install django-registration-redux

    0 讨论(0)
提交回复
热议问题