v1k45 / django-notify-x

Notification system for Django
MIT License
187 stars 40 forks source link

Target precedence on render_notification #30

Closed fgmacedo closed 8 years ago

fgmacedo commented 8 years ago

If a suffix is given, then the templates of the suffix has higher precedence over the default (empty suffix).

In the case of a custom target like api, and a nf_type='badge_awarded'.

The default template of this target should have higher precedence over the templates of the default (page=empty target), in order to allow a default target message.

To an api target, no HTML tags are required, only the text, then the default_api.html could be something like this:

{% if actor %}{{ actor }} {% endif %}{{ verb }}{% if target %}: {% block target %}{{ target }}{% endblock target %}{% endif %}

Best regards,

v1k45 commented 8 years ago

Looks good to me :+1: Will update PyPI package soon.