Den 06/08/2014 kl. 01.00 skrev Joel Goldstick <joel.goldst...@gmail.com>:
> I have this: > > from django.conf.urls import patterns, include, url > > from django.contrib import admin, admindocs > import blog_app > > admin.autodiscover() > > patterns = patterns('', > url(r'^admin/doc/', include(admindocs.urls)), > url(r'^blog/', include(blog_app.urls)), > url(r'^admin/', include(admin.site.urls)), > ) > > i am using virtualenv, django 1.6 > > I get this error: > > Exception Value: > > 'module' object has no attribute 'urls' > > Exception Location: > /home/jcg/code/python/venvs/joelgoldstick.com.16/blog/blog/urls.py in > <module>, line 9 You need to actually import the urls module from admindocs (and the other modules): Either: from django.contrib.admindocs import urls as admindocs_urls url(r'^admin/doc/', include(admindocs_urls)), Or: import django.contrib.admindocs.urls url(r'^admin/doc/', include(django.contrib.admindocs.urls)), > It worked earlier today. I think I have a typo but can't find it. That's what a version control system is for :-) Erik -- 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 django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8783998F-37F1-47DA-AD7F-B1599F40B49A%40cederstrand.dk. For more options, visit https://groups.google.com/d/optout.