What does the HTML for the Django-generated form look like?

What does the HTML for the non-Django-generated form look like?

Are you using Django Cross Site Request Forgery protection?

On Feb 22, 12:27 pm, kkerbel <kker...@gmail.com> wrote:
> Let me further clarify...when I post using django it works as
> expected, meaning I have another view that which processes a new form
> I submit from django.  I wrote a standalone html form on my desktop
> and tried submitting to the view and it still does not work.
>
> On Feb 22, 11:17 am, kkerbel <kker...@gmail.com> wrote:
>
>
>
> > I'm attempting to write a listener page which will take POST variables
> > sent from an external payment site to verify whether payment was
> > successful or not.  Here is the view:
>
> > def results(request):
> >         if request.method == 'POST':
> >                 test = request.POST.get('pmt_status')
> >                 subject = 'Jensen test values'
> >                 message = test + "\n"
> >                 emailto = '....@fake.com'  <--normally my real address
> >                 try:
> >                         mail = EmailMessage(subject, message, 
> > 'do_not_re...@fake.com',
> > [emailto])
> >                         mail.send()
> >                         return 
> > render_to_response('forms/jensen/thanks.html', {'message':
> > 'Sent email to %s'%emailto})
> >                 except:
> >                         return 
> > render_to_response('forms/jensen/emailerror.html')
> >         else:
> >                 return render_to_response('forms/jensen/error.html')
>
> > No matter what I do the else block is always processed.  It never
> > detects the POST method from the external site.  When I do this from
> > internal...it works great...not so with the external site.  Is there
> > something special about processing POST from an external site?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.

Reply via email to