Friday, October 10, 2014

Re: Question on url routing

It would seem that this should be a common issue for any web site.

based on the DRY principle, how has this been resolved by other developers

On Friday, October 10, 2014 8:09:12 AM UTC-4, robert brook wrote:
If I have 2 urls coded in the file for example

url(r'^abc/$', views.abc),
url( r'^abc/def/$', views.def),

And the first url should be accessible by typing it into the browser.

The 2nd url should only be accessible from the application, not by virtue of a user typing it into the browser.

How do I accomplish that?
How do I capture that and reroute it to a valid page?

Thanks is advance

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c90c55a0-c657-4e49-b4e2-77903f37e082%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment