Not sure about your first error, but you are getting this second error
because you forgot to put quotes around main_page in your urls.py

On Dec 10, 12:28 am, edward9 <edward...@gmail.com> wrote:
> Yes. I restart Apache every configuration change.
>
> Error from text box:
> Environment:
>
> Request Method: GET
> Request URL:http://127.0.0.1/
> Django Version: 1.0.2 final
> Python Version: 2.5.4
> Installed Applications:
> ['django.contrib.auth',
>  'django.contrib.contenttypes',
>  'django.contrib.sessions',
>  'django.contrib.sites']
> Installed Middleware:
> ('django.middleware.common.CommonMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware')
>
> Traceback:
> File "/usr/lib/pymodules/python2.5/django/core/handlers/base.py" in
> get_response
>   77.                     request.path_info)
> File "/usr/lib/pymodules/python2.5/django/core/urlresolvers.py" in
> resolve
>   179.             for pattern in self.urlconf_module.urlpatterns:
> File "/usr/lib/pymodules/python2.5/django/core/urlresolvers.py" in
> _get_urlconf_module
>   198.             self._urlconf_module = __import__
> (self.urlconf_name, {}, {}, [''])
> File "/mysite/urls.py" in <module>
>   18.   (r'^$',main_page),
>
> Exception Type: NameError at /
> Exception Value: name 'main_page' is not defined
>
> Apache:
>         <Location "/mysite/">
>             SetHandler python-program
>             PythonHandler django.core.handlers.modpython
>             SetEnv DJANGO_SETTINGS_MODULE mysite.settings
>             #PythonOption django.root /mysite
>             PythonDebug Off
>             PythonPath "['/',  '/mysite', '/var/www'] + sys.path"
>             #PythonPath "['/'] + sys.path"
>         </Location>
>
> On development server works fine. On Apache not working. I have tried
> to create new project but same situation.
>
> Regards
> Edward9
>
> On Dec 10, 12:41 am, Karen Tracey <kmtra...@gmail.com> wrote:
>
>
>
> > Did you restart Apache after making all your code changes?
>
> > Please click the Switch to copy-and-paste view link and cut and paste the
> > contents of the text box that will appear.  The other version is not good
> > for pasting into email.
>
> > Karen

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.


Reply via email to