On Sun, 2009-03-01 at 19:38 -0800, Les wrote:
> I created a view and template dummy / dummy.html to use in new urls
> for testing.
>
> Despite the fact that both are defined, I get NameError:
>
> The other urls defined work fine, if I take the refs to dummy out of
> urls.py. As is, nothing works.
> +++++++++++++++++++++++++++++++++++++===
> Here's urls.py:
>
> from django.conf.urls.defaults import *
> from django.conf import settings
> import os
> from frodo.views import welcome
> from frodo.views import outside_home
>
> # Uncomment the next two lines to enable the admin:
> from django.contrib import admin
> admin.autodiscover()
>
> urlpatterns = patterns('',
> # Example:
> # (r'^frodo/', include('frodo.foo.urls')),
> # Outside homepage
> (r'^$', outside_home),
> # Welcome page (after login)
> (r'^welcome/$', welcome),
> (r'^login/$', dummy),
> (r'^upload/$', dummy),
> (r'^download/$', dummy),
The error is telling you what the problem is: the name is not defined in
this namespace. Because you haven't imported it. Notice that you've
imported "welcome" and "outside_home", but not "dummy".
Regards,
Malcolm
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---