#14831: Django Template Style Guide
-------------------------------------+-------------------------------------
     Reporter:  Simon Meers          |                    Owner:  Ryan
                                     |  Cheley
         Type:  New feature          |                   Status:  assigned
    Component:  Documentation        |                  Version:  1.2
     Severity:  Normal               |               Resolution:
     Keywords:  template, style,     |             Triage Stage:  Accepted
  format                             |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Ryan Cheley):

 Checking the `{% loads` using this bash command
 {{{
 find . -name "*.html" ! -path "./venv/*" -exec grep -En "\{% load" {} + |
 awk -F: '$2 > 2 {print "Filename: " $1 ", Line number: " $2 ", Matched
 string: " $3}'
 }}}
 returns the following results:

 * Filename:
 ./django/contrib/admin/templates/admin/auth/user/change_password.html,
 Line number: 3, Matched string: {% load admin_urls %}
 * Filename: ./django/contrib/admin/templates/admin/index.html, Line
 number: 25, Matched string:             {% load log %}


 The first item is actually OK upon inspection as there are 2 `{% load ...
 }` statements in the file

 The second item `./django/contrib/admin/templates/admin/index.html` has
 `{% load log %}` on line 25. This was first added in commit
 
[https://github.com/django/django/blob/52f5c949e9b50ae3b0034d67f2d385219588aaf1/templates/admin/index.html
 52f5c9] so it's always been lower in the file.

 Next step is to determine if moving the line up will break anything

-- 
Ticket URL: <https://code.djangoproject.com/ticket/14831#comment:13>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018d03f3a622-2a72d8a0-69fe-4860-bca8-6e6c3e4aca80-000000%40eu-central-1.amazonses.com.

Reply via email to