On Sat, Sep 13, 2008 at 4:14 AM, Shantp <[EMAIL PROTECTED]> wrote:

>
>
> Just to clear up some confusion, I posted only the relevant part of my
> urls.py file. I have all the other necessary stuff in it but i'm still
> getting this error.
>

So if your root urlconf file does have urlpatterns specified, it must be
that one of the ones pulled in via include('...') does not.  Comment out
everything in urlpatters and verify that the dev server brings up the "It
worked" page when you try to access any url on its port.  If it doesn't,
verify that the urls file you think you are using is really the one
specified in ROOT_URLCONF in settings.py, that you have spelled
'urlpatterns' correctly, etc..  If you do get "It worked", then start
un-commenting lines  individually in urlpatterns until you find the one that
is specified wrong somehow.

Karen


>
>
> On Sep 12, 8:14 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> > On Sep 13, 2008, at 8:32 AM, Shantp wrote:
> >
> >
> >
> > > Hi,
> >
> > > I did a lot of searching on this and can't figure out what I'm doing
> > > wrong. Here's what's in my urls.py:
> >
> > > share_detail = {
> > >    'queryset': Share.objects.all(),
> > > }
> >
> > > (r'^comments/', include('django.contrib.comments.urls')),
> > > (r'^comments/(?P<slug>[-\w]+)/?$',
> > > 'django.views.generic.list_detail.object_detail',
> > >        dict(share_detail, slug_field='slug',
> > > template_object_name='share', template_name='share_page.html')),
> >
> > This looks like you're putting your urlconf patterns directly at the
> > top level of the file. They need to be encapsulated in a patterns()
> > call, and assigned to a variable called 'urlpatterns'. Right now
> > django's looking for that 'urlpatterns' variable, and not finding it.
> > Take a look at the sample urlconf file:
> >
> > http://docs.djangoproject.com/en/dev/topics/http/urls/#example
> >
> > Yours,
> > Eric
> >
> >
> >
> > > I'm getting this error:
> >
> > > Exception Type:    AttributeError
> > > Exception Value:   'module' object has no attribute 'urlpatterns'
> >
> > > Can anyone help me understand what is wrong with my urls?
> >
>

--~--~---------~--~----~------------~-------~--~----~
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