Django - authentication, registration with email confirmation

后端 未结 3 1176
予麋鹿
予麋鹿 2020-12-28 17:21

I\'m looking at the API for authentication

https://docs.djangoproject.com/en/1.3/topics/auth/

I can\'t seem to find information on simple user registration

相关标签:
3条回答
  • 2020-12-28 17:37

    While django-registration used to be the registration system du jour, it has been abandoned by the maintainer and doesn't work on Django 1.6 without patching.

    Try maybe django-allauth - I would have used it if I had known about it when I was looking. (As it turned out, I found this question first and used django-registration, wasting a lot of time.)

    EDIT 10/2016: Looks like django-registration is maintained again. It's on GitHub now: https://github.com/ubernostrum/django-registration

    0 讨论(0)
  • 2020-12-28 17:37

    You can do this:

    • Define a function to activate the user (i. e. def activate(request))
      • Configure in the url.py the route to that function (i.e /activate/)
    • Create a form to register user
    • Create the post function to create the user
      • When you create the user set field 'is_active' to 0.
      • In the same function send the email with a link inside, this link must have the target as the configured route
    0 讨论(0)
  • 2020-12-28 18:00

    It's not built into Django. There is a reusable app called django-allauth, which will fit your needs.

    An app called django-registration used to be recommended, but that is now unmaintained and out of date.

    Editor note: django-registration is not unmaintained as of December 2016.

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