Django Signup urls.py 1

Django Signup urls.py

from django.conf.urls import url
from mysite.core import views as core_views

urlpatterns = [
    ...
    url(r'^signup/$', core_views.signup, name='signup'),
]

Here is what the above code is Doing:
1. We import the views from our core app.
2. We add a new URL pattern to urlpatterns.
3. We use the url() function to match an empty string and to call the signup() view.
4. We name the URL pattern signup.

Similar Posts