#21526: register = template.Library(). Is the instance name just a convention?
-------------------------------+-----------------------------------------
     Reporter:  oubiga         |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Documentation  |    Version:  1.6
     Severity:  Normal         |   Keywords:  register, template, Library
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+-----------------------------------------
 https://docs.djangoproject.com/en/dev/howto/custom-template-tags/#code-
 layout shows:

 [... To be a valid tag library, the module '''must''' contain a module-
 level variable '''named register''' that is a template.Library instance,
 in which all the tags and filters are registered. So, near the top of your
 module, put the following: ...]

 if I'm not mistaken, "register" is just a convention. I would be more
 explicit:

 [... To be a valid tag library, the module '''must''' contain a module-
 level variable '''(by convention named register)''' that is a
 template.Library instance, in which all the tags and filters are
 registered. So, near the top of your module, put the following: ...]

-- 
Ticket URL: <https://code.djangoproject.com/ticket/21526>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.9230f6c5f9c1abdff8a2afc22e50a1ae%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to