0

I have a django site that has a donate form on it. This site handles only the internal donations by the organization. They have a public facing site that is not django driven. They want to have the same donation form for public users to submit donations through and have it get posted into the djagno sites database.

Is there anyway to have a non django site post form data to my database? Can iframe handle something like this?

EDIT: The other problem I have is that this form has logic built within it. Based upon their address I trigger an ajax request to give a list of possible choices from the database for a select field. So this may further complicate things

Austin
  • 4,296
  • 6
  • 40
  • 52
  • its still a html post rit? it should work – Vivek S Sep 05 '12 at 13:53
  • Sounds like your options are to a) implement some sort of Django api that the external app can 'post' to, or b) just access the database directly from your non-django site... – will-hart Sep 05 '12 at 13:54
  • Yes, it's an html post but from a different server. These two sites are separate from each other. I had nothing to do with the public facing site. Only for the internal organization. So it would need to be a cross site/server post. – Austin Sep 05 '12 at 13:56

1 Answers1

1

The only problem will be with CSRF protection. You can't implement CSRF if you actually intend posts coming from an external site. Just decorate your form handler view with csrf_exempt.

Chris Pratt
  • 232,153
  • 36
  • 385
  • 444