On Sat, 2006-09-30 at 19:18 +0400, Ivan Sagalaev wrote: > Marco Amato wrote: > > and URL.py > > > > ########### > > from django.conf.urls.defaults import * > > > > urlpatterns = patterns('', > > # Example: > > (r'^base/$', include('test.selecto.views')), > > > > # Uncomment this for admin: > > (r'^admin/$', include('django.contrib.admin.urls')), > > ) > > ######## > > This 'include' thing in the main urls.py is intended to include other > URL configurations of different apps, not for referring actual views. > > So you have to create a local urls.py in your test/selecto directory and > include it: > > (r'^base/$', include('test.selecto.urls')), > > And in that urls.py you define actual links between urls and views for > 'selecto' app: > > from django.conf.urls.defaults import * > > urlpatterns = patterns('test.selecto.views', > (r'^$', 'index'), > )
It's also slightly bad practice to create an app called "test" because that is the name of a standard Python module (although you may not have it installed on some systems). With careful management of your Python path there shouldn't be a problem, but it makes errors difficult to track down if the Python system version is import rather than your version of "test". Recommended to choose another name for your application. 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 -~----------~----~----~----~------~----~------~--~---