#5648: __init__ of Models not overrideable
---------------------------+------------------------------------------------
Reporter:  Armin Ronacher  |       Owner:  nobody          
  Status:  new             |   Component:  Database wrapper
 Version:  SVN             |    Keywords:                  
   Stage:  Unreviewed      |   Has_patch:  0               
---------------------------+------------------------------------------------
 Apparently django is calling `__init__` for models created from database
 data.  This makes it impossible to override the constructor that has a
 different signature.

 It would make more sense if the database API is creating a verbatim
 instance of the class using `object.__new__(Model)` and updating the
 attributes. It would also be possible to add a `construct` method that is
 called when a model is assembled from database data.

 I can provide a patch if wanted.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5648>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to