user3541631
user3541631

Reputation: 4008

Django Admin - customize use jquery inside and custom fields

I want to implement in Django Admin a jquery plugin that "adjust" and image(http://guillotine.js.org/), them get the coordinates with ImageKit and save the new image.

I need some tutorials and advises how to do it.

Upvotes: 1

Views: 749

Answers (1)

Ivan Semochkin
Ivan Semochkin

Reputation: 8897

I have no tutorials, but can give you advice.
You can customize your admin model with custom css and js, by Media class, like so:

class MyModelAdmin(admin.ModelAdmin):

    class Media:
        css = {
            "all": ("my_styles.css",)
        }
        js = ("my_code.js",)

You can look in dev tools, how Django chose names id's and classes for elements in page and also check the docs.
Admin docs

Upvotes: 2

Related Questions