On Sunday 13 February 2011 18:18:39 BW wrote:
> I know you can override the save() method in a model, but is it
> possible to do it when you try to get a row or rows from a db? I have
> data like this '\xFF\x00\x00\x00\xFE'... that I need to store in a
> MySQL db.
>
> When I was trying to save i
You can make a custom manager.
http://docs.djangoproject.com/en/dev/topics/db/managers/#custom-managers-and-model-inheritance
You probably don't realize it from normal use, but the 'objects'
property you're using on your models is an instance of models.Manager,
not an internal part of the models.
2 matches
Mail list logo