Thursday, March 27, 2014

Django: Having trouble with nesting URLS

I posted this on stack, but I feel like I would get better help here:

I am trying to connect my urls together after installing the django-registration app via pip install. 

My main project is called Club , here is club/club/

from django.conf.urls import patterns, include, url  from blog import views  # Uncomment the next two lines to enable the admin:  from django.contrib import admin  admin.autodiscover()    urlpatterns = patterns('',      # Examples:      # url(r'^$', 'club.views.home', name='home'),      # url(r'^club/', include('')),        # Uncomment the admin/doc line below to enable admin documentation:      # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),        # Uncomment the next line to enable the admin:      url(r'^admin/', include(,      url(r'^addauthor$', views.addauthorView),      url(r'^thanks/$', views.thanksView),      url(r'^displayauthors/$', views.displayauthors),      # registration links below      url(r'^reg/', include('club.registration.urls')),    )   

And here is my club/registration/

from django.conf.urls import patterns, include, url    urlpatterns = patterns('',  url(r'^accounts/', include('registration.backends.default.urls')),  )

Am I connecting these two correctly? Or is there another way to do it?

When trying to visit in browser I get an error message:

ImportError at /reg/accounts/login/  No module named registration.urls

You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment