I have a plugin style app that adds "support" for PHP (inserting two
admin inlines) into VirtualHostAdmin class, I use this code for the
job:
admin.site.unregister(VirtualHost)
ix = len(VirtualHostAdmin.inlines)
VirtualHostAdmin.inlines.insert(ix, PHPVersionInline)
VirtualHostAdmin.inlines.insert(ix+1, VirtualHostPHPOptionInline)
admin.site.register(VirtualHost, VirtualHostAdmin)
I don't know why but this inserts the PHPVersionInline and
VirtualHostPHPOptionInline into ALL of my admin models without an
admin inline defined. For example:
print "admin model who haven't nothing to do with VirtualHost and have
NO inlines"
[<class 'ucp.php.admin.PHPVersionInline'>, <class
'ucp.php.admin.VirtualHostPHPOptionInline'>]
print "admin model who haven't nothing to do with VirtualHost and have
inlines defined"
[<class 'ucp.pricing.admin.RateInline'>]
consequently, when I try to load a change_forma for
ucp.pricing.models.Pack django servers raise this exeption:
<class 'ucp.php.models.PHPVersion'> has no ForeignKey to <class
'ucp.pricing.models.Pack'>
Any clue about what's going on here?
Thanks!
--
Marc
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment