>From the docs: "you must create the function for it in a module called page_processors.py inside one of your INSTALLED_APPS"
http://mezzanine.jupo.org/docs/content-architecture.html#page-processors On Tue, Apr 1, 2014 at 4:32 PM, Tameen Malik <[email protected]> wrote: > from django import forms > from django.http import HttpResponseRedirect > from mezzanine.pages.page_processors import processor_for > from .models import Author > > This is processor.py file: Now i save this in /myproject/proccessor.py. My > question can be simple but i am confuse that now where i have to define > this to access this form. (in url.py file using views or in template or is > there any other way too!) > > *class AuthorForm(forms.Form):* > * name = forms.CharField()* > * email = forms.EmailField()* > > *@processor_for(Author)* > *def author_form(request, page):* > * form = AuthorForm()* > * if request.method == "POST":* > * form = AuthorForm(request.POST)* > * if form.is_valid():* > * # Form processing goes here.* > * redirect = request.path + "?submitted=true"* > * return HttpResponseRedirect(redirect)* > * return {"form": form}* > > -- > You received this message because you are subscribed to the Google Groups > "Mezzanine Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Stephen McDonald http://jupo.org -- You received this message because you are subscribed to the Google Groups "Mezzanine Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
