Luke Plant <[EMAIL PROTECTED]> writes:
> This is actually quite interesting. You would need to alter your
> patch a bit so that it works for models with 'app_label' defined --
> the "model_module.__name__.split('.')[-2]" logic should exist in
> only one place.
Good point. Another problem I ran into is that circular dependencies
caused by models imported in the patch function result in somewhat
confusing error messages. I have yet to find a way to fix this.
On the bright side, I already found another use for the patch:
def patch_flatpage(name, bases, attrs):
attrs['Admin'].js = ('tiny_mce/tiny_mce.js',
'tiny_mce/textareas.js')
return attrs
MODEL_PATCHES = {'flatpages.FlatPage': patch_flatpage}
:)
> Other than that it seems quite good -- maybe you should create a
> ticket.
That I will, I posted it here first to get some feedback and a chance
to fix any problems before I submit a patch. Thanks for your
comments!
-mk
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users
-~----------~----~----~----~------~----~------~--~---