Re: Multiple URLconfs per app?

2007-07-19 Thread Nathaniel Whiteinge

Thanks, guys.

On Jul 19, 12:52 am, Nathan Ostgard <[EMAIL PROTECTED]> wrote:
> If you just want to specify the urls as listed, you could always
> create a urls folder in myapp, put an __init__.py in there, and create
> myapp/urls/feature1.py and myapp/urls/feature2.py.
>
> 
> Nathan Ostgard
>
> On Jul 18, 7:37 pm, Collin Grady <[EMAIL PROTECTED]> wrote:
>
> > You'll need two files.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Multiple URLconfs per app?

2007-07-18 Thread Nathan Ostgard

If you just want to specify the urls as listed, you could always
create a urls folder in myapp, put an __init__.py in there, and create
myapp/urls/feature1.py and myapp/urls/feature2.py.


Nathan Ostgard

On Jul 18, 7:37 pm, Collin Grady <[EMAIL PROTECTED]> wrote:
> You'll need two files.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: Multiple URLconfs per app?

2007-07-18 Thread Collin Grady

You'll need two files.


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Multiple URLconfs per app?

2007-07-18 Thread Nathaniel Whiteinge

I'm a little fuzzy on how Django imports additional app URLconfs. I've
got two parts of an app that are closely related to one another,
however I'd like to give them both root URLs.

myproject/urls.py::

urlpatterns = patterns('',
(r'^feature1/', include('myproject.apps.myapp.urls')),
(r'^feature2/', include('myproject.apps.myapp.urls')),
)

Is there a way to group the URLs in the app's urls.py so as to keep
them all in that one file? Or do I *have* to make seperate files (e.g.
feature1_urls.py, feature2_urls.py)?

myproject/urls.py::

urlpatterns = patterns('',
(r'^feature1/',
include('myproject.apps.myapp.urls.feature1')),
(r'^feature2/',
include('myproject.apps.myapp.urls.feature2')),
)

- whiteinge


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---