-
Notifications
You must be signed in to change notification settings - Fork 16
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
Alert tag rewrite #1074
Conversation
There was a problem hiding this 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.
Add args + kwargs functionality to the alert template tag, and use the tag where possible.