I am a newbee to Django. I recently installed Django om my Centos 5.4
Linux box and created a projekt. Then I modified settings.py to suit
my needs, and modified Apache's config file. I created the databases
with default setting in setting.py and and created an application. It
worked fine. I then created a model and enabled the admin features by
uncommenting the admin lines in settings.py and urls.py. I then
created the databases expressed in the model.py.

Django is installed in /usr/local/lib/python2.4/site-packages/django

I got the following debug log:

Any hints what is wrong?


ImportError at /

No module named django_dns.urls

Request Method:         GET
Request URL:    http://www.mydomain.com/managebind/
Django Version:         1.2
Exception Type:         ImportError
Exception Value:

No module named django_dns.urls

Exception Location:     /usr/local/lib/python2.4/site-packages/django/
utils/importlib.py in import_module, line 35
Python Executable:      /usr/bin/python
Python Version:         2.4.3
Python Path:    ['/var/www/app/django', '/usr/local/lib/python2.4/site-
packages/django', '/usr/lib/python24.zip', '/usr/lib/python2.4', '/usr/
lib/python2.4/plat-linux2', '/usr/lib/python2.4/lib-tk', '/usr/lib/
python2.4/lib-dynload', '/usr/lib/python2.4/site-packages', '/usr/lib/
python2.4/site-packages/Numeric', '/usr/lib/python2.4/site-packages/
gtk-2.0', '/usr/local/lib/python2.4/site-packages']
Server time:    mån, 24 Maj 2010 10:43:12 +0200
Traceback Switch to copy-and-paste view

    * /usr/local/lib/python2.4/site-packages/django/core/handlers/
base.py in get_response
        83.
        84. if hasattr(request, "urlconf"):
        85. # Reset url resolver with a custom urlconf.
        86. urlconf = request.urlconf
        87. urlresolvers.set_urlconf(urlconf)
        88. resolver = urlresolvers.RegexURLResolver(r'^/', urlconf)
  89.
        90. callback, callback_args, callback_kwargs =
resolver.resolve( ...
        91. request.path_info)
        92.
        93. # Apply view middleware
        94. for middleware_method in self._view_middleware:
        95. response = middleware_method(request, callback,
callback_args, callback_kwargs)
        96. if response:
      ▶ Local vars
      Variable  Value
      exc_info
      (<class exceptions.ImportError at 0xb5fbc3ec>,
<exceptions.ImportError instance at 0xb81976c>, <traceback object at
0xb9ce07c>)
      exceptions
      <module 'django.core.exceptions' from '/usr/local/lib/python2.4/
site-packages/django/core/exceptions.pyc'>
      middleware_method
      <bound method MessageMiddleware.process_request of
<django.contrib.messages.middleware.MessageMiddleware object at
0xb8193ac>>
      receivers
      [(<function _rollback_on_exception at 0xb868764>, None)]
      request
      <ModPythonRequest path:/managebind/, GET:<QueryDict: {}>,
POST:<QueryDict: {}>, COOKIES:{'2ad85a87cdecc66fe84fe1aaab045150':
'8e654f0d6abecbad27ff4bc3c3510b96', 'PHPSESSID':
'b5lm4jg72o0qak2te88qb8aoj6', 'b403199245ca03e6af6d93fc3ec1baa6':
'd5c8b6be28ccf797f8d746af8f81da0d', 'nexus-fontstyle': 'f-small'},
META:{'AUTH_TYPE': None, 'CONTENT_LENGTH': 0, 'CONTENT_TYPE': None,
'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/
xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET':
'ISO-8859-1,utf-8;q=0.7,*;q=0.7', 'HTTP_ACCEPT_ENCODING':
'gzip,deflate', 'HTTP_ACCEPT_LANGUAGE': 'sv-se,sv;q=0.8,en-
us;q=0.5,en;q=0.3', 'HTTP_CACHE_CONTROL': 'max-age=0',
'HTTP_CONNECTION': 'keep-alive', 'HTTP_COOKIE': 'nexus-fontstyle=f-
small; PHPSESSID=b5lm4jg72o0qak2te88qb8aoj6;
b403199245ca03e6af6d93fc3ec1baa6=d5c8b6be28ccf797f8d746af8f81da0d;
2ad85a87cdecc66fe84fe1aaab045150=8e654f0d6abecbad27ff4bc3c3510b96',
'HTTP_HOST': 'www.mydomain.com', 'HTTP_KEEP_ALIVE': '300',
'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:
1.9.0.18) Gecko/2010021718 CentOS/3.0.18-1.el5.centos Firefox/3.0.18
FirePHP/0.4', 'PATH_INFO': u'/', 'PATH_TRANSLATED': None,
'QUERY_STRING': None, 'REMOTE_ADDR': '85.230.87.236', 'REMOTE_HOST':
None, 'REMOTE_IDENT': None, 'REMOTE_USER': None, 'REQUEST_METHOD':
'GET', 'SCRIPT_NAME': '/managebind', 'SERVER_NAME':
'www.mydomain.com', 'SERVER_PORT': 80, 'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SOFTWARE': 'mod_python'}>
      resolver
      <RegexURLResolver django_dns.urls (None:None) ^/>
      response
      None
      self
      <django.core.handlers.modpython.ModPythonHandler object at
0xb8dbfac>
      settings
      <django.conf.LazySettings object at 0xb7a7a6c>
      urlconf
      'django_dns.urls'
      urlresolvers
      <module 'django.core.urlresolvers' from '/usr/local/lib/
python2.4/site-packages/django/core/urlresolvers.pyc'>
    * /usr/local/lib/python2.4/site-packages/django/core/
urlresolvers.py in resolve
       207. app_dict = property(_get_app_dict)
       208.
       209. def resolve(self, path):
       210. tried = []
       211. match = self.regex.search(path)
       212. if match:
       213. new_path = path[match.end():]
       214. for pattern in self.url_patterns: ...
       215. try:
       216. sub_match = pattern.resolve(new_path)
       217. except Resolver404, e:
       218. sub_tried = e.args[0].get('tried')
       219. if sub_tried is not None:
       220. tried.extend([(pattern.regex.pattern + ' ' + t) for t in
sub_tried])
      ▶ Local vars
      Variable  Value
      match
      <_sre.SRE_Match object at 0xb9adf70>
      new_path
      u''
      path
      u'/'
      self
      <RegexURLResolver django_dns.urls (None:None) ^/>
      tried
      []
    * /usr/local/lib/python2.4/site-packages/django/core/
urlresolvers.py in _get_url_patterns
       236. return self._urlconf_module
       237. except AttributeError:
       238. self._urlconf_module = import_module(self.urlconf_name)
       239. return self._urlconf_module
       240. urlconf_module = property(_get_urlconf_module)
       241.
       242. def _get_url_patterns(self):
       243. patterns = getattr(self.urlconf_module, "urlpatterns",
self.urlconf_module) ...
       244. try:
       245. iter(patterns)
       246. except TypeError:
       247. raise ImproperlyConfigured("The included urlconf %s
doesn't have any patterns in it" % self.urlconf_name)
       248. return patterns
       249. url_patterns = property(_get_url_patterns)
      ▶ Local vars
      Variable  Value
      self
      <RegexURLResolver django_dns.urls (None:None) ^/>
    * /usr/local/lib/python2.4/site-packages/django/core/
urlresolvers.py in _get_urlconf_module
       231. raise Resolver404({'tried': tried, 'path': new_path})
       232. raise Resolver404({'path' : path})
       233.
       234. def _get_urlconf_module(self):
       235. try:
       236. return self._urlconf_module
       237. except AttributeError:
       238. self._urlconf_module =
import_module(self.urlconf_name) ...
       239. return self._urlconf_module
       240. urlconf_module = property(_get_urlconf_module)
       241.
       242. def _get_url_patterns(self):
       243. patterns = getattr(self.urlconf_module, "urlpatterns",
self.urlconf_module)
       244. try:
      ▶ Local vars
      Variable  Value
      self
      <RegexURLResolver django_dns.urls (None:None) ^/>
    * /usr/local/lib/python2.4/site-packages/django/utils/importlib.py
in import_module
        28. raise TypeError("relative imports require the 'package'
argument")
        29. level = 0
        30. for character in name:
        31. if character != '.':
        32. break
        33. level += 1
        34. name = _resolve_name(name[level:], package, level)
        35. __import__(name) ...
        36. return sys.modules[name]
      ▶ Local vars

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to