Hi, can you implement something like below?
if (None == request.META.get('HTTP_REFERER')): return HttpResponseRedirect(reverse(YOUR VIEW FUNCTION THAT REDIRECT TO DOWNLOAD URL)) elif (-1 == request.META.get('HTTP_REFERER') .find(reverse(YOUR VIEW FUNCTION THAT REDIRECT TO DOWNLOAD URL))): return HttpResponseRedirect(reverse(YOUR VIEW FUNCTION THAT REDIRECT TO DOWNLOAD URL)) elif (request.method == 'POST'): -Devang. On 8/29/09, orschiro <orsch...@googlemail.com> wrote: > > Hello guys, > > I've set up a Single-Pay-Button via Paypal. After a customer had paid > successfully I configured Paypal to redirect the user to > download.domain.tld. There he has to fill in his personal data into a > html form and then receive some download data. > > Well and that is also the problem with my solution. Everyone who knows > the URL can download the data without to pay before. > > What I'm now looking for is a possibility to inquire whether the > customer has paid before he was visiting the download page. > > Some kind of If clause: > > def index(request): > if paypal true: > if request.method == 'POST': > formular = form(request.POST) > > else: > formular = form() > > return render_to_response('download/index.html', { > 'form': formular, > }) > else: > error message > > How could I do that? > > Thank you in advance. :) > > orschiro > > > > --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---