django raw_id_field javascript callback -
consider example:
models.py
class foo(models.model): = models.foreignkey(something) class bar(models.model): foo = models.foreignkey(foo) option = models.foreignkey(option)
admin.py
class barinline(admin.tabularinline): model = bar raw_id_fields = ('option',) class fooadmin(admin.modeladmin): raw_id_fields = ('something',)
so when create fresh foo object
, no barinlines
have been defined yet.
without saving foo object
first limit barinline option field's options adding parameter (e.g. &option__id=<something>
) javascript trigger. how hook javascript callback?
i cannot seem find documentation regarding raw_id_field javascript callbacks, seems unlikely there aren't hooks, missing?
Comments
Post a Comment