id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux
7865,Inline Edits across Apps,magneto,nobody,"One little feature that is either a) missing or b) not documented that existed in the 'old forms admin' was the ability to 'edit_inline' across Apps
{{{
## the 'old way'
# myapp1/models.py
class M1(models.Model):
col1 = ...
#myapp2/models.py
from mapp1.models. import M1
class M2(models.Model):
m1 = models.ForeignKey(M1, edit_inline = models.STACKED)
col1 = ...
}}}
The above would make the 'M2' editable inline inside the admin form for M1
This obviously would depend on the Order of the Apps loading in settings (i.e. M1 before M2)
But this is nice little feature and can be replicated with a 'hack' to the new-forms admin of sorts
{{{
# in myapp2/admin.py
from myapp1.models import M1
from myapp2.models import M2
from django.contrib import admin
class M2_Inline(admin.StackedInline):
model = M2
## here it the hack
## get the User instance from the current admin set up and add these inlines
if M1 in admin.site._registry:
## add to inlines of the base User
inline_instance = M2_Inline(admin.site._registry[M1].model, admin.site._registry[M1].admin_site)
admin.site._registry[M1].inline_instances.append(inline_instance)
###
}}}
It would be _nice_ to simply have some methods to the _registry of the AdminSite object, and even, perhaps an ""AdminSite .add_to_inlines(""TargetModel"", [List of Other Inlines])
I Imagine this requires some design designs as to weather or to to allow access to the AdminSite overloard object
",New feature,closed,Forms,master,Normal,wontfix,newforms-admin edit_inline,,Design decision needed,0,0,0,0,0,0