Re: URL namespaces

2016-02-25 Thread James Schneider
On Thu, Feb 25, 2016 at 12:45 PM, Malik Rumi wrote: > > Assuming it can be done, what is the proper way to namespace two models in > the same app, where both use slugs in the url but have different views and > templates? > > In the docs, > https://docs.djangoproject.com/en/1.9/topics/http/urls/#u

Re: URL namespaces

2016-02-25 Thread Alex Heyden
Models don't have views. Applications have views. URLs route to views, not models. Include is basically an import for a urls.py file as a whole, so there's no reason to import the same file multiple times unless you wanted it to match multiple URLs. What are you actually trying to do? On Thu, Feb

Re: URL Namespaces

2014-03-07 Thread anubhav joshi
Thanks. That was quite helpful. Regards Anubhav -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group

Re: URL Namespaces

2014-03-05 Thread Jonathan Baker
Much like module namespacing, they allow you to group subitems in more logical and descriptive ways while preventing naming collisions. So, if a Django project has a blog, with a list of Posts at /blog/posts/, a sensible url name for that pattern might be "post_list" (and using url names in your ap

Re: Url Namespaces

2009-07-27 Thread Vitaly Babiy
Thanks, I knew it had to be somewhere in the docs. Vitaly Babiy On Sun, Jul 26, 2009 at 7:16 PM, Vasil Vangelovski wrote: > > See this: > > > http://docs.djangoproject.com/en/dev/topics/http/urls/#defining-url-namespaces > > On Mon, Jul 27, 2009 at 12:13 AM, Vitaly Babiy wrote: > > How does one

Re: Url Namespaces

2009-07-26 Thread Joshua Russo
On Sun, Jul 26, 2009 at 9:13 PM, Vitaly Babiy wrote: > How does one go about registering a namespace? Not quite sure what you mean by that, but my guess is that you are assuming you need to register your namespace (modules?) before being able to import them. If this is what you are asking, you

Re: Url Namespaces

2009-07-26 Thread Vasil Vangelovski
See this: http://docs.djangoproject.com/en/dev/topics/http/urls/#defining-url-namespaces On Mon, Jul 27, 2009 at 12:13 AM, Vitaly Babiy wrote: > How does one go about registering a namespace? > I can't seem to find it in the docs. > Thanks, > Vitaly Babiy > > > > --~--~-~--~~---