hugo wrote:
>>+1. Gets around the reserved word problem entirely, and removes a
>>little bit more magic from model definitions.
> 
> 
> Problem with that discussion was, IIRC, that neither Adrian nor Jacob
> where very fond of allways having to explicitely provide the manager.
> So the result of the discussion was what we now have in magic-removal -
> a simple default way for the simple situations and an explicit way for
> all situations that won't be solved by the default. I can live with
> that.
> 
> bye, Georg
> 
> 

The real issue here is : what happens if it is left out? Some stuff
assumes a default manager ( eg any objects this is related to, the
admin, generic views, etc.) The only options then are

* Validation error, which just means that it becomes boilerplate - very
annoying

* Some kind of hidden default manager that is not kept in the model
class, but in a mapping somewhere else

Manager.get_default(MyModel) would get the first manager if defined in a
class, otherwise it will generate a default one and cache it somewhere.

This method would be used by the generic code.

I don't really have any opinion on which of these two options or the
current behaviour would be best...

Reply via email to