Skip to content
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

Move rendering of action_links from templatetag to list.html template partial #39

Open
joshuadavidthomas opened this issue Feb 7, 2024 · 1 comment

Comments

@joshuadavidthomas
Copy link
Contributor

Currently as a user of neapolitan there's no easy way to adjust how the action links are rendered in CRUDView's list view, since the links are rendered to a string within the templatetag.

I got around this by creating my own object_list templatetag that calls a new action_links function that, instead of rendering to a string, returns a dictionary with the relevant info that can then taken by the template and rendered there. This approach allows for greater flexibility for anyone using neapolitan to adjust how the actions are rendered.

Here's the relevant commit to see how this would look.

@carltongibson
Copy link
Owner

Yes, I find myself overriding all this very quickly.

I want to address reversing URLs, and the structure of the default templates here, so let me keep this in mind for the moment.

(Just need to decide how it's meant to look 😅)

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

No branches or pull requests

2 participants