Model methods are custom methods that add custom row level
functionality to your objects.
For example, if your model has a first_name field and a last_name
field, and you wanted to return the full name, your custom model
method could be:
class Person(models.Model):
first_name = models.CharFi
About methods in managers and models are described rather well in:
https://docs.djangoproject.com/en/1.3/topics/db/managers/#adding-extra-manager-methods
Putting Admin class inside models is deprecated about 3 years ago. You
should read
https://docs.djangoproject.com/en/dev/intro/tutorial02/#writi
I am a little bit confused... what functions should I write it in the
Manager and what should be within the Model itself... Also what functions do
you think should be written inside the class Admin within the Model?
Regards,
Eyad
--
You received this message because you are subscribed to the Go
3 matches
Mail list logo