Re: Can't start admin in web tutorial

2009-02-03 Thread andrewz

Thanks for the prompt reply. I am working from 1.0.2, and, yes, I
tried altering the urlpattern to match the online docs after the
urlpattern I uncommented didn't work. I had been working through The
Definitive Guide to Django, but it's based off 0.96, so I hit a snag
when I got to the admin chapter.

I tried the admin urlpattern at the ticket you mentioned, but it threw
an equivalent error: "No module named admin.site.root"

Perhaps I'd be best off updating to the development version and
proceeding from the beginning of the online tutorial.

Thanks again.

Andrew
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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
-~--~~~~--~~--~--~---



Re: Can't start admin in web tutorial

2009-02-03 Thread Karen Tracey
On Wed, Feb 4, 2009 at 1:22 AM, andrewz  wrote:

>
> I'm a Django newbie, as the subject suggests, and couldn't find this
> problem addressed in this group's archives.
>
> I've done the following, as per the web tutorial:
> • Add "django.contrib.admin" to INSTALLED_APPS setting.
> • Run python manage.py syncdb.
> • Edit mysite/urls.py file and uncomment the lines below the
> "Uncomment the next two lines..." comment.
>
>
> But after I start the development server and try to load the admin
> page in my browser, I get 500 page. Here is the Traceback:
>
> Environment:
>
> Request Method: GET
> Request URL: http://127.0.0.1:8000/admin/
> Django Version: 1.0.2 final
> Python Version: 2.5.1
> Installed Applications:
> ['django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.sites',
>  'mysite.books',
>  'django.contrib.admin']
> Installed Middleware:
> ()
>
>
> Traceback:
> File "/Library/Python/2.5/site-packages/django/core/handlers/base.py"
> in get_response
>  77. request.path_info)
> File "/Library/Python/2.5/site-packages/django/core/urlresolvers.py"
> in resolve
>  181. sub_match = pattern.resolve(new_path)
> File "/Library/Python/2.5/site-packages/django/core/urlresolvers.py"
> in resolve
>  179. for pattern in self.urlconf_module.urlpatterns:
> File "/Library/Python/2.5/site-packages/django/core/urlresolvers.py"
> in _get_urlconf_module
>  198. self._urlconf_module = __import__
> (self.urlconf_name, {}, {}, [''])
>
> Exception Type: ImportError at /admin/
> Exception Value: No module named admin.site.urls
>
>
> Why can't it find the admin module, even though I've activated it in
> mysite/settings.py?
>

What version of Django are you running?

The message is saying that admin.site.urls, specifically, cannot be found.
It sounds like you are following the current online directions but running
Django 1.0 or 1.0.2.  Unfortunately the two don't currently match up for
activating the admin.  See http://code.djangoproject.com/ticket/10162, which
mentions the correct urlpattern for admin (though the correct url should
have just been there to un-comment, so it seems you did not just uncomment
the line but rather fixed it up to match the online docs?).

Karen

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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
-~--~~~~--~~--~--~---



Can't start admin in web tutorial

2009-02-03 Thread andrewz

I'm a Django newbie, as the subject suggests, and couldn't find this
problem addressed in this group's archives.

I've done the following, as per the web tutorial:
• Add "django.contrib.admin" to INSTALLED_APPS setting.
• Run python manage.py syncdb.
• Edit mysite/urls.py file and uncomment the lines below the
“Uncomment the next two lines...” comment.


But after I start the development server and try to load the admin
page in my browser, I get 500 page. Here is the Traceback:

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/admin/
Django Version: 1.0.2 final
Python Version: 2.5.1
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'mysite.books',
 'django.contrib.admin']
Installed Middleware:
()


Traceback:
File "/Library/Python/2.5/site-packages/django/core/handlers/base.py"
in get_response
  77. request.path_info)
File "/Library/Python/2.5/site-packages/django/core/urlresolvers.py"
in resolve
  181. sub_match = pattern.resolve(new_path)
File "/Library/Python/2.5/site-packages/django/core/urlresolvers.py"
in resolve
  179. for pattern in self.urlconf_module.urlpatterns:
File "/Library/Python/2.5/site-packages/django/core/urlresolvers.py"
in _get_urlconf_module
  198. self._urlconf_module = __import__
(self.urlconf_name, {}, {}, [''])

Exception Type: ImportError at /admin/
Exception Value: No module named admin.site.urls


Why can't it find the admin module, even though I've activated it in
mysite/settings.py?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@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
-~--~~~~--~~--~--~---