#21699: Provide a way to define a model without being registered into AppConfig
------------------------------+-----------------------------------------
     Reporter:  mitar         |                    Owner:  nobody
         Type:  New feature   |                   Status:  new
    Component:  Core (Other)  |                  Version:  master
     Severity:  Normal        |               Resolution:
     Keywords:  app-loading   |             Triage Stage:  Someday/Maybe
    Has patch:  0             |      Needs documentation:  0
  Needs tests:  0             |  Patch needs improvement:  0
Easy pickings:  0             |                    UI/UX:  0
------------------------------+-----------------------------------------

Comment (by mitar):

 > So we're talking of hacking the internals heavily here ;-)

 Yes. :-) But from such hacking new use cases emerge. :-)

 > Currently ModelBase.new always returns a class registered in the app
 registry.

 Yes. This is why we register, and then try to unregister. So maybe then
 #21698 is a better approach. The issue there is that you still send a
 signal when a new model is registered, despite then removing it almost
 immediately. Maybe an alternative would be that API could provide a way to
 register a model without sending a signal, and then to unregister. But
 this is just a hack for current approach with `get_registered_model`.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21699#comment:9>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.711100c1341c52b1986856d915f033ab%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to