On Sun, 2006-10-01 at 21:15 -0400, Shidan wrote:
> Hi, Im writing just a bit of learning code to generate html from
> templates without using a model. But all I'm getting is this,
> 
> Request Method:       GET
> Request URL:  http://localhost:8000/about/
> Exception Type:       ImportError
> Exception Value:      No module named about
> Exception Location:
>       
> C:\Python24\lib\site-packages\django-0.95-py2.4.egg\django\core\urlresolvers.py
> in _get_urlconf_module, line
> 
> 
> In my urls.py I have this:
> (r'^about/', include('Nuovotel.account.views.about')),

You do not need include() here. Include() is used to include another URL
configuration file for further processing.

Instead, you just include the name of the view function, so

        (r'^about/', 'Nuovotel.account.views.about'),
        
This says "if you match this pattern, call this function". Your first
version said "if you match this pattern, pass of the further processing
of this URL to another file that is found in ... and that will tell you
which view to end up calling".
        
In fact, if you want to import the about() function into your URL
configuration, you don't even need the quotes around it (you can use a
reference to the actual function). That is entirely optional, though, so
the simplest initial solution is just to remove the include() part and
you should be fine.

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

  • ImportError Shidan
    • Re: ImportError Malcolm Tredinnick

Reply via email to