Changes between Version 4 and Version 5 of ModelSyntaxChangeInstructions


Ignore:
Timestamp:
Aug 25, 2005, 3:16:38 PM (19 years ago)
Author:
Adrian Holovaty
Comment:

added clarification about repr()

Legend:

Unmodified
Added
Removed
Modified
  • ModelSyntaxChangeInstructions

    v4 v5  
    3030        ),
    3131    )
     32
     33    def __repr__(self):
     34        return self.first_name
    3235}}}
    3336
     
    4851            ),
    4952        )
     53
     54    def __repr__(self):
     55        return self.first_name
    5056}}}
    5157
     
    5763 * The {{{verbose_name}}} is now an optional first argument to {{{Field}}}s. For {{{ForeignKey}}}s, {{{ManyToManyField}}}s and {{{OneToOneField}}}s, use a named argument: {{{verbose_name="foo"}}}.
    5864 * Don't forget to remove the commas after each {{{Field}}}, because they're class attributes instead of list elements now.
     65 * Custom methods (such as {{{__repr__()}}} here) still go at the class level. They haven't changed.
Back to Top