Hi all,
I was having some trouble with the form validation code here:
http://bitbucket.org/jespern/django-piston/wiki/Documentation#form-validation
I think the examples might omit:
from piston.util import validate
Is that right? Here's an example in context:
from piston.handler import BaseHandler
from piston.utils import validate
from crm.models import Report
from crm.forms import ReportForm
class ReportsHandler(BaseHandler):
allowed_methods = ('POST')
@validate(ReportForm)
def create(self, request):
...
Either that, or I'm missing something more fundamental here... but it
appears to be working now.
Thanks,
Ian