On Tue, Jan 21, 2014 at 9:08 AM, Larry Martell <[email protected]> wrote: > I have a model that I need to add some custom javascript processing to > its admin form, which is this: > > class CategoryAdmin(admin.ModelAdmin): > radio_fields = {"data_path_ip": admin.HORIZONTAL} > list_display = ('name', 'event_path', 'data_path', 'file_spec', > 'data_path_ip') > list_filter = ('name', 'event_path', 'data_path', 'file_spec', > 'data_path_ip') > admin.site.register(Category, CategoryAdmin) > > Where (i.e. in what template) would I put this js code in?
I found this: https://docs.djangoproject.com/en/1.5/ref/contrib/admin/#overriding-admin-templates so I created my own change_form.html, and I overrode object-tools-items and put my js in there, but I'm not seeing it when I go to the change form. Then, just as a test, I put it directly into the real django change_form.html, but still nothing. Then to see if that template is being used, I changed it - added data, created syntax errors, but still, it had no effect. So it seems like that template isn't being used at all. But the HTML sure looks like it came from that template. Can anyone give me some direction here please. Thanks! -larry -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACwCsY5hFfS%2BGJ928Edcr-LgGJyDqdVhjDRmc-br5pPdxpwLQA%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.

