Django template tags to define "a" or "an"

Is there an existing django template tag to define a/an before an article? If not, how would I start writing such a tag?

+4
source share
2 answers

Someone was kind enough to leave a snippet here: http://djangosnippets.org/snippets/1519/

+3
source

There's a nice pip package, anora , that will add this template tag to you without having to maintain code in your own application.

+1
source

Source: https://habr.com/ru/post/1400320/


All Articles