I'm doing something pretty similar sounding with jQuery. I wanted to check for form validation errors via Ajax and do a regular form submission otherwise.
The JavaScript: http://dpaste.com/hold/8571/ The Python: http://dpaste.com/hold/8572/ The code might be a little weird looking. I'm relying on a 403 response header to detect validation errors and the X-Requested-With request header to detect Ajax. Feel free to drop me a line for more explanation if you want. - whiteinge On Apr 13, 8:29 am, "Tipan" <[EMAIL PROTECTED]> wrote: > I've created a view that is made up of several elements such as main > content, sidebar information navigation bar. The main content is > derived from specific data dependent on the parameter passed to the > view. .../page/3 etc. > > The view is rendered as a series of template extensions from a master > base.html. Elements also use inclusion tags. > > I want to include a form field in the main part of the view and have > displayed this as an inclusion tag. The purpose of the form is to > enable a user to enter a code which can be checked in the database. > Error messages need to be returned to this view, if code is valid the > user will be passed to a new view. > > However, I'm not sure of the best way to process the form for error > messages without rebuilding the complete view, which seems to be a lot > of overhead when you consider all the relevant queries that have to be > re-done. > > Can any one advise on best practice here, or a means by which I can > cache the original view? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---

