#21699: Provide a way to define a model without being registered into the app
registry / Get rid of get_registered_model
------------------------------+-----------------------------------------
     Reporter:  Mitar         |                    Owner:  nobody
         Type:  New feature   |                   Status:  new
    Component:  Core (Other)  |                  Version:  dev
     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 John Cronan):

 Hi! This is a very old ticket, but I've tested this same approach in 3.2
 and it still works. I'm doing a form-builder type of app, and I decided to
 use dynamic models.

 I get the warning message about "reloading models is not advised as it can
 lead to inconsistencies." In my case, I've ensured that the dynamic models
 don't use any foreign keys (except between each other).

 Considering the scope, "figure out what the registration API becomes":
 just as someone using this capability, I'd suggest that there could be a
 way to suppress the warning when you know that the side effects are not
 harmful. True unregistering, where the side effects with related models
 and such are removed automatically, would be cool but sounds hard.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21699#comment:14>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/063.5a6558dbf3d6bd32216e6bc83e02fb66%40djangoproject.com.

Reply via email to