1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ import registration.backends.default.urls from django.conf.urls import url, include from django.conf.urls.static import static from django.conf import settings from django.contrib import admin from core.views import CustomRegistrationView, router urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^accounts/register/$', CustomRegistrationView.as_view(), name='registration_register'), url(r'^accounts/', include(registration.backends.default.urls)), url(r'^', include(router.urls)), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), ] if settings.DEBUG: import debug_toolbar urlpatterns += [ url(r'^__debug__/', include(debug_toolbar.urls)), ] if settings.MEDIA_URL: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
url(r'^admin/', include(admin.site.urls)), url(r'^djangular/', include('djangular.urls')), # Needs to be defined before all default URL patterns are included because # in Django the first matched URL pattern wins url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'authentication_form': AuthenticationFormUsernameOrEmail}, name='login'), url(r'^accounts/', include('django.contrib.auth.urls')), url(r'^accounts/profile/$', 'core.views.user_profile', name='user_profile'), url(r'^accounts/profile/edit/$', 'core.views.user_profile_edit', name='user_profile_edit'), url(r'^accounts/register/$', CustomRegistrationView.as_view( form_class=RegistrationFormWithCustomFields), name='registration.views.register'), url(r'^activate/(?P<activation_key>\w+)/$', ActivationView.as_view(), name='registration.views.activate'), url(r'^accounts/', include('registration.backends.default.urls')), # NG: tastypie API urls url(r'^api/', include(v1_api.urls)), user_files_url, user_files_csv_url # (r'^favicon\.ico$', # 'django.views.generic.simple.redirect_to', # {'url': STATIC_URL+'images/favicon.ico'}), ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
), url(r'^accounts/', include('django.contrib.auth.urls')), url(r'^accounts/profile/$', 'core.views.user_profile', name='user_profile'), url( r'^accounts/profile/edit/$', 'core.views.user_profile_edit', name='user_profile_edit' ), url( r'^accounts/register/$', verify_recaptcha( CustomRegistrationView.as_view( form_class=RegistrationFormWithCustomFields ) ), name='registration.views.register' ), url( r'^activate/(?P<activation_key>\w+)/$', ActivationView.as_view(), name='registration.views.activate' ), url(r'^accounts/', include('registration.backends.default.urls')), # NG: tastypie API urls url(r'^api/', include(v1_api.urls)),