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

Alert tag rewrite #1074

Merged
merged 15 commits into from
Aug 29, 2024
Merged

Alert tag rewrite #1074

merged 15 commits into from
Aug 29, 2024

Conversation

caseyhans
Copy link
Collaborator

Add args + kwargs functionality to the alert template tag, and use the tag where possible.

Copy link
Collaborator

@rabstejnek rabstejnek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you or could you look into making the alert template tag more like with or the like? ie where you can construct it like {% alert type="danger" %} instead of {% alert "type=danger" %}, just for consistency's sake.
https://github.com/django/django/blob/main/django/template/defaulttags.py#L1509
In that link you will also see there are token parsers provided by django, so we may be able to cut down on some code as well.

@shapiromatron shapiromatron merged commit d8e2069 into main Aug 29, 2024
6 checks passed
@shapiromatron shapiromatron deleted the alert-tag-rewrite branch August 29, 2024 02:55
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.

3 participants