Skip to content

Use a template tag for tidier templates #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

andybak
Copy link
Contributor

@andybak andybak commented Jun 5, 2014

If a user wants to use multiple admin extensions that all want to override the change form template they will need to incorporate all the template changes in their own change_form.html

It's therefore a good idea to keep each template customization as clean and simple as possible.

Sorry - I haven't updated the docs to mention this enhancement. If it's a blocker let me know.

@crccheck
Copy link
Owner

crccheck commented Jul 1, 2014

I like the idea of making things simpler, but I generally think that templatetags add a layer of complexity. Perhaps if there was additional functionality to making it a templatetag. Something like {% object_actions mode='ie7' %}.

@crccheck
Copy link
Owner

closing because of inactivity

@crccheck crccheck closed this Aug 23, 2015
@andybak
Copy link
Contributor Author

andybak commented Sep 9, 2015

Sorry I didn't respond earlier.

Not sure if you want to re-open but take a look at this: django-admin-tools/django-admin-tools#21

It's a discussion regarding a similar issue and the maintainer went with an alternative solution that I suggested.

The general problem is that you can't use two admin add-ons if they both work by wanting to override the same template. It breaks in a way that would be hard for inexperienced devs to track down and the way it breaks depends on the order of INSTALLED_APPS

So I feel at the very least any admin add-on that uses template overriding should clearly document where this will break and offer a manual fix ("make these changes to your changelist.html")

@crccheck
Copy link
Owner

Are you at DjangoCon right now? I'll be at sprints today.

@andybak
Copy link
Contributor Author

andybak commented Sep 10, 2015

Nope. I don't live the jet-set conference life-style! Too much work to do :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants