Here is my urls.py: from django.conf.urls.defaults import * from intertubewaypoint.blog.models import Entry
blog_dict = { 'queryset': Entry.objects.all(), 'date_field': 'pub_date', } urlpatterns = patterns('', (r'^intertubewaypoint/', include('intertubewaypoint.urls')), (r'^blog/(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(? P<slug>[-\w]+)/$', 'django.views.generic.date_based.object_detail', dict(blog_dict, slug_field='slug')), (r'^blog/?$' 'django.views.generic.date_based.archive_index', blog_dict), # Uncomment this for admin: (r'^admin/', include('django.contrib.admin.urls')), ) On Aug 1, 3:02 pm, bhamdeveloper <[EMAIL PROTECTED]> wrote: > The /home/shawn/myCode/intertubewaypoint does have my urls.py file in > it. They way I have my project currently setup is that > intertubewaypoint is my project directory, and I will have > applications under there (ex: intertubewaypoint/blog, > intertubewaypoint/photos, etc.). I want to have intertubewaypoint as > my root and have a single base template that is shown when you go > tohttp://intertubewaypoint.comand then have links to take you to the > projects. So, in my project directory I have __init__.py, > settings.py, urls.py, manage.py, (plus corresponding .pyc files) and > then a directory called blog that has __init__.py, models.py, views.py > (plus corresponding pyc and pyo files). > > Anyway, I tried your suggestion and then got a different error, this > one a plain black and white text output that said: > Mod_python error: "PythonHandler django.core.handlers.modpython" > Traceback (most recent call last): > File "/usr/lib/python2.4/site-packages/mod_python/apache.py", line > 299, in HandlerDispatch > result = object(req) > File "/usr/lib/python2.4/site-packages/django_src/django/core/ > handlers/modpython.py", line 178, in handler > return ModPythonHandler()(req) > File "/usr/lib/python2.4/site-packages/django_src/django/core/ > handlers/modpython.py", line 146, in __call__ > self.load_middleware() > File "/usr/lib/python2.4/site-packages/django_src/django/core/ > handlers/base.py", line 22, in load_middleware > for middleware_path in settings.MIDDLEWARE_CLASSES: > File "/usr/lib/python2.4/site-packages/django_src/django/conf/ > __init__.py", line 28, in __getattr__ > self._import_settings() > File "/usr/lib/python2.4/site-packages/django_src/django/conf/ > __init__.py", line 57, in _import_settings > self._target = Settings(settings_module) > File "/usr/lib/python2.4/site-packages/django_src/django/conf/ > __init__.py", line 85, in __init__ > raise EnvironmentError, "Could not import settings '%s' (Is it on > sys.path? Does it have syntax errors?): %s" % (self.SETTINGS_MODULE, > e) > > EnvironmentError: Could not import settings 'settings' (Is it on > sys.path? Does it have syntax errors?): No module named settings > > When I reverted back, I get the previous error from django: > > ImportError at / > No module named intertubewaypoint.urls > Request Method: GET > Request URL:http://intertubewaypoint.com/ > Exception Type: ImportError > Exception Value: No module named intertubewaypoint.urls > Exception Location: /usr/lib/python2.4/site-packages/django_src/django/ > core/urlresolvers.py in _get_urlconf_module, line 251 > Python Executable: /usr/bin/python > Python Version: 2.4.3 > > Does django need a specific path-to-urls or something that I am > missing, maybe in the settings file? > > On Aug 1, 2:05 pm, Emanuele Pucciarelli <[EMAIL PROTECTED]> wrote: > > > > > Hello, > > > > PythonPath "['/home/shawn/myCode/intertubewaypoint/'] + sys.path" > > > Your modules should live right below the PythonPath. If your urls.py > > file is at /home/shawn/myCode/intertubewaypoint/urls.py, then that > > line should probably read > > > PythonPath "['/home/shawn/myCode'] + sys.path" > > > Regards, > > > -- > > Emanuele- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---