Hi

You could check request.META['HTTP_REFERER'], it should be set if the user 
clicks on a link and unset if the user entered the url in the address bar. 
Obviously this is browser dependent. If you really want to be sure I would use 
a one time url with a uuid which you generate and store to validate against 
when you get the request.

François

On Oct 10, 2014, at 8:09 AM, robert brook <software.by.pyt...@gmail.com> 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+unsubscr...@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/b8423a99-7798-4458-b817-5f5179373603%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
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, 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/6D7DADBF-5562-4E61-9941-7FC140458BB5%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to