Apologies - I did not mention that my original urls.py (under mysite/,
at the same level as polls/) still exists (the urls.py has to be
copied over as opposed to moved), and it contains the following code:

------mysite/urls.py begin------
from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('mysite.polls.views',
    #enables admin and poll/urls.py
    (r'^polls/', include('mysite.polls.urls')),
    (r'^admin/(.*)', admin.site.root),
)
------end mysite/urls.py------

Again, no need for any additional changes.

On Aug 22, 1:38 am, Rodney Topor <[EMAIL PROTECTED]> wrote:
> On Aug 22, 4:18 pm, Anurag Goel <[EMAIL PROTECTED]> wrote:> I was able to 
> implement the generic views change with yesterday's
> > trunk version successfully. I did not have to do anything special (no
> > separate admin.py, no get_absolute_url())
>
> > I did however, do something that the tutorial did not ask to do - i.e.
> > delete all references to the admin in mysite/urls.py, which looks like
> > this:
>
> Anurag, Thanks.  That worked for me too.  But it's hardly a solution.
> Now I can't use admin.  I want both.  Is that asking too much?  Has
> anyone else any ideas?
>
> > On Aug 21, 10:45 pm, Rodney Topor <[EMAIL PROTECTED]> wrote:
>
> > > I'm having trouble modifying the tutorial example to use generic
> > > views.  (My implementation without generic views works fine.)  I've
> > > registered the class Poll with admin in a separate admin.py module as
> > > described in ticket 8181.  I've provided names for all url patterns in
> > > app polls.  I've defined get_absolute_url() for class Poll using the
> > > name for the poll detail pattern.  I've implemented view vote() as
> > > described in the tutorial,  Yet when I cast a vote in the form with
> > > action = /polls/n/vote/, I get the following error:
>
> > > The model Poll is already registered
>
> > > Any suggestions?
>
> > > (And this is separate from the reverse lookup failures I get with
> > > generic views using named patterns in url template tags...)
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to