8. When everything can
be solved with a filter
$ cat
templatetags/authenticated_tags.py
...
@register.filter()
def is_authenticated(request):
return hasattr(request, 'user') and
request.user.is_authenticated()
$ cat index.html
{% if request.user|is_authenticated %}
...
{% endif %}
is_authenticated
vs.
is_authenticated(
)
capfirst
vs.
capitalize
12. How you can help?
• Clone DjaoDjin repos and try them
out!
• Star us on GitHub!
https://github.com/djaodjin/djaodjin-pages/
https://github.com/djaodjin/djaodjin-saas/