Code

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#5901 closed (invalid)

r'^polls/' vs r'^admin/'

Reported by: anonymous Owned by: nobody
Component: Documentation Version: master
Severity: Keywords: admin site
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

From a new user perspective... This part is a big stumbling block for me.
This page documents how to get the polls working in the urls.py but disables the admin page... It should be expanded to include how to keep the admin site working... The instinctual answer would be to add the following:

from django.conf.urls.defaults import *

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

but this doesn't work because:

ViewDoesNotExist at /admin/
Tried vote in module mysite.polls.views. Error was: 'module' object has no attribute 'vote'

Request Method:	GET
Request URL:	http://mysite/admin/
Exception Type:	ViewDoesNotExist
Exception Value:	Tried vote in module mysite.polls.views. Error was: 'module' object has no attribute 'vote'
Exception Location:	/sw/lib/python2.4/site-packages/django/core/urlresolvers.py in _get_callback, line 184
Python Executable:	/sw/sbin/apache2
Python Version:	2.4.3

Attachments (0)

Change History (2)

comment:1 Changed 6 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

Your instinctual answer was correct. The problem you're getting is actually related to a separate bug, so I'll close this.

comment:2 Changed 6 years ago by SmileyChris

(for that bug, see ticket #5904)

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.