#23587: Paragraph on over-riding base_html can be misread as to WHAT needs to be
changed...
-------------------------------------+-------------------------------------
     Reporter:  Pyrrhicv             |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |                  Version:  1.7
    Component:  Documentation        |               Resolution:
     Severity:  Normal               |             Triage Stage:  Accepted
     Keywords:  base_site.html       |      Needs documentation:  0
  tutorial 2                         |  Patch needs improvement:  0
    Has patch:  1                    |                    UI/UX:  0
  Needs tests:  0                    |
Easy pickings:  0                    |
-------------------------------------+-------------------------------------

Comment (by Pyrrhicv):

 Dear Tim:

          I just went to the base directory and retrieved a new copy of
 base_site.html and cut&pasted it in to my own (now working) template
 directory copy.  I enclose that copy and I added "FOO" and "FOOBAR" so
 that it would be easy to see if these changes appeared in admin.

 ....snip....

 {% extends "admin/base.html" %}

 {% block title %}{{ title }} | {{ site_title|default:_('Django FOO site
 admin') }}{% endblock %}

 {% block branding %}
 <h1 id="site-name"><a href="{% url 'admin:index' %}">{{
 site_header|default:_('Django FOOBAR administration') }}</a></h1>
 {% endblock %}

 {% block nav-global %}{% endblock %}

 ....end file ... snip ....


      The above is what I did first when I got to this section of the
 tutorial and I think other newbies do so sometimes too.  Of course (for
 reasons I do not yet understand) this does not work at all.

      Frankly, at one point, very desperate, I even did a 'locate' on my
 machine and changed text within the single brackets on every single
 instance of base_site.html on my workstation, and could not get "FOO" or
 "FOOBAR" to appear in my otherwise functional admin screen from ANY copy
 of base_site.html. However, I had an additional problem, I did not
 realize, originally, as my template file ended up one hierarchical
 directory level up from where it actually belonged.  So...at first, no
 template changes worked when I experimented with cut&paste variants
 (including, I think the right one) nothing .... no surprise!  When I got
 the directory location fixed, still nothing worked as I was just trying to
 copy what was in the single brackets by that point (ie the text that
 actually is supposed to appear) as I was under the impression that my
 experiments had shown other things did not work.  My problem was
 compounded by reading too many pieces of documentation written in haste
 that have the code or examples wrong so when stuff that is cut&pasted does
 not work, I start to look for other explanations.  Of course, being very
 tired by the time I changed my directories did not help.

      I note that if you substitute the material - ALL of it -
 ''including'' the double brace brackets etc, as the text actually suggests
 you should it works (even for me...now).

      Personally, I find the tutorial with its embedded instructions to
 replace ''this'' and'' that'' often rather hard to follow. I wonder if
 someone should take the same text and redo the layout in a fashion more
 similar to the better books on coding which make things clearer.  (Yes, I
 might be willing to contribute to such an effort), even a change as simple
 as stating at the beginning of the tutorial series that every piece of
 text in color "x" is a cut&paste or type-in piece of code.

 Bottom line?  At the end of the day, I think it is probably safe to say
 that a fix might be just to make what is getting copied clearer despite
 the the actual written text being pretty clear.

 Apologies for all the fuss but I know others are stubbing their toes on
 this and everyone wants to be writing code and no one wants to write docs.
 <sigh>

 I note that your response to this ticket was impressively fast and I do
 want to say that django is pretty amazing and that anyone supporting it
 deserves a very big thanks.

 Best,

 Petrus (Pyrrhic) van Bork
 cell: 646-319-6545

--
Ticket URL: <https://code.djangoproject.com/ticket/23587#comment:4>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.32577faf9841119ae8d9178d83a8aa48%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to