How to redirect users to a specific url after registration in django registration?

前端 未结 3 1976
灰色年华
灰色年华 2020-12-16 02:11

So I am using django-registration app to implement a user registration page for my site. I used Django\'s backends.simple views which allows the users to immediately login a

3条回答
  •  隐瞒了意图╮
    2020-12-16 02:20

    If you wish, you can modify the following file /usr/local/lib/python2.7/dist-packages/registration/backends/simple/urls.py, changing the path, for example:

    Before modifying:

    success_url = getattr (settings, 'SIMPLE_BACKEND_REDIRECT_URL', '/'),

    After modifying:

    success_url = getattr (settings, 'SIMPLE_BACKEND_REDIRECT_URL', '/upload/new'),

    Regards.

    Diego

提交回复
热议问题