Changes between Version 2 and Version 3 of CookBookManipulatorCustomManipulator


Ignore:
Timestamp:
Jan 27, 2006, 9:33:23 PM (18 years ago)
Author:
gary.wilson@…
Comment:

Added Python procossor to code blocks. Added curly braces around __init__.

Legend:

Unmodified
Added
Removed
Modified
  • CookBookManipulatorCustomManipulator

    v2 v3  
    22
    33{{{
     4#!python
    45from django.core import formfields, validators
    56
     
    3435}}}
    3536
    36 Now to use, subclass it, and fill in the necessary methods ("__init__" and "complete"), also give it the fields:
     37Now to use, subclass it, and fill in the necessary methods ("{{{__init__}}}" and "{{{complete}}}"), also give it the fields:
    3738
    3839{{{
     40#!python
    3941class PollEdit(Manipulator):
    4042    fields = (
     
    5759
    5860{{{
     61#!python
    5962def edit_poll(request, id):
    6063    poll = polls.get_object(pk=id)      #Assume it works
     
    7073
    7174{{{
     75#!python
    7276class PollAdd(PollEdit):       
    7377    def __init__(self):
     
    8589
    8690{{{
     91#!python
    8792def add_poll(request):
    8893    manipulator = PollAdd()
Back to Top