Colleen Owens wrote:
> On 09 Feb, 2006, at 13.21, Robert Wittams wrote:
> 


> 
> 
> I'd be happy to write this up once I get it working. The problem I'm
> having right now is that there seems to be no elegant way of updating
> the dictionary bound_related_object_overrides in admin_modify.py to let
> it know about additional view types. I can, of course, edit it directly
> in admin_modify, but this isn't very nice.
> 
> Any suggestions? All ideas I can come up with involve changing the
> admin code.
> 
> Colleen
> 
> 

As I explained before:
------------
The overrides stuff is just to allow TABULAR and STACKED to continue to
work, without meaning that the core django has a dependency on the admin
code.
  As you are defining your own class, that shouldn't matter for you, you
can just use the class directly, eg

from path.to.custom.admin.code import MyBoundRelatedObject

class Whatever(Model):
        parent = ForeignKey(edit_inline=MyBoundRelatedObject)
--------------
I do not know how to make it any clearer than that. MyBoundRelatedObject
is a class.

You do *not* need to make up a new constant like TABULAR. It is purely a
mechanism that allows people to specify the tabular view or whatever
without making the core system depend on the admin code.

Reply via email to