Web X.Y

Tips and tricks for development with Java, Python, Django, the Google Web Toolkit, and Linux.

Django: “No module named urls” error for /admin/ December 4, 2008

Filed under: Django — adambossy @ 5:48 pm
Tags: , , ,

Backward compatibility issue from Django 0.96 -> Django 1.0.

http://groups.google.com/group/django-users/browse_thread/thread/28df85c31f859f36

>> http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Mergednewforms-adminintotrunk :


# OLD:
from django.conf.urls.defaults import *

urlpatterns = patterns('',
    (r'^admin/', include('django.contrib.admin.urls')),
)

# NEW:
from django.conf.urls.defaults import *
from django.contrib import admin

admin.autodiscover()

urlpatterns = patterns('',
    (r'^admin/(.*)', admin.site.root),
)
Advertisement
 

One Response to “Django: “No module named urls” error for /admin/”

  1. [...] December 4, 2008 at 5:50 pm (Django) Tags: admin, Django, newforms, python, urls Continued from urls problem. [...]


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.