You are not following the instructions. I would agree the instructions aren't as clear as they could be, but it does describe what is needed. Specifically the documentation says:
"""Remember: the parent directories of anything you import directly must be on the Python path.""" You have not done this. You only have: PythonPath "['/home/testrmcom/django-svn/django', '/home/testrmcom/ ridgemoor'] + sys.path" Because you are declaring DJANGO_SETTINGS_MODULE as: SetEnv DJANGO_SETTINGS_MODULE ridgemoor.settings then the parent directory of 'ridgemoor' must be added to PythonPath. PythonPath "['/home/testrmcom/django-svn/django', '/home/testrmcom', '/home/testrmcom/ridgemoor'] + sys.path" Ie., to setup same path as inbuilt server, you need both the directory the settings.py file is in and the parent of that directory. Graham On Jan 22, 1:43 am, Carl Karsten <[EMAIL PROTECTED]> wrote: > Graham Dumpleton wrote: > > Post your Apache configuration snippet where you configuremod_python > > for Django. > > <VirtualHost *:80> > > ServerAdmin [EMAIL PROTECTED] > ServerName test > ServerAlias test.ridgemoor.personnelware.com > > DocumentRoot /home/juser/public_html/ > > SetHandler python-program > PythonHandler django.core.handlers.modpython > SetEnv DJANGO_SETTINGS_MODULE ridgemoor.settings > PythonDebug On > PythonPath "['/home/testrmcom/django-svn/django', > '/home/testrmcom/ridgemoor'] + sys.path" > > </VirtualHost> > > > > > Post your full urls.py file. > > [EMAIL PROTECTED]:~/ridgemoor$ cat urls.py > # urls.py > > import os > > from django.conf.urls.defaults import * > > from django.conf import settings > > urlpatterns = patterns('', > (r'^admin/', include('django.contrib.admin.urls')), > (r'^logout/$', 'django.contrib.auth.views.logout', > {'template_name':'logout.html'} ), > (r'^eventcal/', include('eventcal.urls')), > (r'^accounts/login/$', 'django.contrib.auth.views.login', > {'template_name': > 'login.html'}), > (r'^msg/', include('msg.urls')), > (r'^core/', include('core.urls')), > (r'^pre/', include('pre.urls')), > (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': > settings.BASE_DIR+'/core/static/', 'show_indexes': True}), > (r'', include('core.urls')), > ) > > > Indicate the path to the directory containing the settings.py file so > > we can see if it matches with what it is meant to be. > > [EMAIL PROTECTED]:~/ridgemoor$ pwd > /home/juser/ridgemoor > > and here is the current error I am getting: > > Environment: > > Request Method: GET > Request URL:http://test.ridgemoor.personnelware.com/admin/ > Django Version: 0.97-pre-SVN-7027 > Python Version: 2.5.2 > Installed Applications: > ['django.contrib.auth', > 'django.contrib.contenttypes', > 'django.contrib.sessions', > 'django.contrib.sites', > 'django.contrib.admin', > 'django.contrib.databrowse', > 'django.contrib.webdesign', > 'ridgemoor.core', > 'ridgemoor.eventcal', > 'ridgemoor.pre'] > Installed Middleware: > ('django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware', > 'django.middleware.doc.XViewMiddleware') > > Template error: > In template /home/testrmcom/django/contrib/admin/templates/admin/base.html, > error at line 28 > Caught an exception while rendering: Tried new_message in module > ridgemoor.core.views. Error was: 'module' object has no attribute > 'new_message' > 18 : {% if not is_popup %} > > 19 : <!-- Header --> > > 20 : <div id="header"> > > 21 : <div id="branding"> > > 22 : {% block branding %}{% endblock %} > > 23 : </div> > > 24 : {% if user.is_authenticated and user.is_staff %} > > 25 : <div id="user-tools"> > > 26 : {% trans 'Welcome,' %} <strong>{% if user.first_name %}{{ > user.first_name|escape }}{% else %}{{ user.username }}{% endif %}</strong>. > > 27 : {% block userlinks %} > > 28 : <a href=" {% url django.contrib.admin.views.doc.doc_index %} > ">{% trans 'Documentation' %}</a> > > 29 : / <a href="{% url django.contrib.auth.views.password_change > %}">{% trans 'Change password' %}</a> > > 30 : / <a href="{% url django.contrib.auth.views.logout %}">{% > trans > 'Log out' %}</a> > > 31 : {% endblock %} > > 32 : </div> > > 33 : {% endif %} > > 34 : {% block nav-global %}{% endblock %} > > 35 : </div> > > 36 : <!-- END Header --> > > 37 : {% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% > trans 'Home' %}</a>{% if title %} › {{ title|escape }}{% endif > %}</div>{% > endblock %} > > 38 : {% endif %} > > Traceback: > File "/home/testrmcom/django/template/debug.py" in render_node > 71. result = node.render(context) > File "/home/testrmcom/django/template/defaulttags.py" in render > 363. return reverse(self.view_name, args=args, kwargs=kwargs) > File "/home/testrmcom/django/core/urlresolvers.py" in reverse > 297. return iri_to_uri(u'/' + get_resolver(urlconf).reverse(viewname, > *args, **kwargs)) > File "/home/testrmcom/django/core/urlresolvers.py" in reverse > 282. if lookup_view in self.reverse_dict: > File "/home/testrmcom/django/core/urlresolvers.py" in _get_reverse_dict > 218. for key, value in > pattern.reverse_dict.iteritems(): > File "/home/testrmcom/django/core/urlresolvers.py" in _get_reverse_dict > 221. self._reverse_dict[pattern.callback] = (pattern,) > File "/home/testrmcom/django/core/urlresolvers.py" in _get_callback > 184. raise ViewDoesNotExist, "Tried %s in module %s. Error was: > %s" % (func_name, mod_name, str(e)) > > Exception Type: ViewDoesNotExist at /admin/ > Exception Value: Tried new_message in module ridgemoor.core.views. Error was: > 'module' object has no attribute 'new_message' > > Which I also now get when I > browse:http://test.ridgemoor.personnelware.com:8000/admin/ > > This was working before I started putting it under apache. everything > (including conf files) are under svn, so I could show diffs, but I checked in > about 15 or so revisions as I got this and that working. > > Carl K > > > > > Graham > > > On Jan 21, 6:22 pm, Carl Karsten <[EMAIL PROTECTED]> wrote: > >> I developed a site using ./mmanage.py runserver for testing. I try to run > >> it > >> under apache and it errors. I hear runserver adds things to sys.path > >> (installed > >> apps) and when you run from apache that doesn't happen. sure enough, I > >> can fix > >> it by adding things to PythonPath. > > >> Now I am having 2 problems with > >> (r'^admin/', include('django.contrib.admin.urls')), > > >> 1. if I browse to mysite.com/admin it misses that and gets caught by > >> (r'', include('ridgemoor.core.urls')), > > >> 2, browse to mysite.com/admin/ get error: > > >> Tried new_message in module ridgemoor.core.views. Error was: 'module' > >> object has > >> no attribute 'new_message' > > >> I have a feeling this is more pathing problems, but now it doesn't work > >> from > >> runserver either, which makes me think I broke something trying to fix the > >> path > >> isues. > > >> So before I go 'fixing' more things, some sort of checklist describing what > >> changes I need to make would be nice. Anything like this exist? > > >> Carl K > > >> ps > > >>http://us.pycon.org/2008/registration/openfor business. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---