On Dec 31, 12:31 pm, "dick...@gmail.com" <dick...@gmail.com> wrote: > was looking for some info on how ROOT_URLCONF setting is supposed to > be used? i am trying something very simple. i have a single django > project. there are two apps. > > i want to run one app, call it foo, with a specific settings file, > and set of urls, and bar with something else. > > so, with a myproject/settings.py, myproject/bar-settings.py, > myproject/urls.py , myproject/bar-urls.py > > bar-settings.py has ROOT_URLCONF=myproject.bar-urls > everything works great with the foo (default project). > > now to run the "bar" project, i start it: python manage.py runserver -- > settings=bar-settings > > the error i get is, after i hit a url (everything starts up fine): > > File "/Users/rich/devtools/jython-dev/dist/Lib/site-packages/django/ > core/urlresolvers.py", line 246, in resolve > return get_resolver(urlconf).resolve(path) > File "/Users/rich/devtools/jython-dev/dist/Lib/site-packages/django/ > core/urlresolvers.py", line 179, in resolve > for pattern in self.urlconf_module.urlpatterns: > File "/Users/rich/devtools/jython-dev/dist/Lib/site-packages/django/ > core/urlresolvers.py", line 198, in _get_urlconf_module > self._urlconf_module = __import__(self.urlconf_name, {}, {}, ['']) > ImportError: No module named bar
I think your problem is that 'bar-settings' is not a valid identifier in Python. You can't use a hyphen in names of variables or modules. Try calling them bar_settings etc, and see if that works. -- DR. --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---