Re: [Django] #19471: base_site.html should actually be base.html at the end of tutorial 2

2012-12-13 Thread Django
#19471: base_site.html should actually be base.html at the end of tutorial 2
---+--
 Reporter:  brandon@…  |Owner:  nobody
 Type:  Uncategorized  |   Status:  closed
Component:  Documentation  |  Version:  1.4
 Severity:  Normal |   Resolution:  worksforme
 Keywords:  tutorial   | Triage Stage:  Unreviewed
Has patch:  0  |  Needs documentation:  0
  Needs tests:  0  |  Patch needs improvement:  0
Easy pickings:  0  |UI/UX:  0
---+--
Changes (by kmtracey):

 * status:  new => closed
 * needs_better_patch:   => 0
 * resolution:   => worksforme
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 The reference to `base_site.html` is correct, that is the name of the file
 and it is included in Django 1.4.3:

 {{{
 #!bash
 kmtracey@ubuntu 05:38:52: ~
 --> mkvirtualenv django143
 New python executable in django143/bin/python
 Installing setuptoolsdone.
 Installing pip...done.
 virtualenvwrapper.user_scripts creating
 /home/kmtracey/.virtualenvs/django143/bin/predeactivate
 virtualenvwrapper.user_scripts creating
 /home/kmtracey/.virtualenvs/django143/bin/postdeactivate
 virtualenvwrapper.user_scripts creating
 /home/kmtracey/.virtualenvs/django143/bin/preactivate
 virtualenvwrapper.user_scripts creating
 /home/kmtracey/.virtualenvs/django143/bin/postactivate
 virtualenvwrapper.user_scripts creating
 /home/kmtracey/.virtualenvs/django143/bin/get_env_details

 (django143) kmtracey@ubuntu 05:39:04: ~
 --> pip install django==1.4.3
 Downloading/unpacking django==1.4.3
   Downloading Django-1.4.3.tar.gz (7.7MB): 7.7MB downloaded
   Running setup.py egg_info for package django

 Installing collected packages: django
   Running setup.py install for django
 changing mode of build/scripts-2.7/django-admin.py from 664 to 775

 changing mode of /home/kmtracey/.virtualenvs/django143/bin/django-
 admin.py to 775
 Successfully installed django
 Cleaning up...

 (django143) kmtracey@ubuntu 05:40:56: ~
 --> cdsitepackages

 (django143) kmtracey@ubuntu 05:41:01:
 ~/.virtualenvs/django143/lib/python2.7/site-packages
 --> cat django/contrib/admin/templates/admin/base_site.html
 {% extends "admin/base.html" %}
 {% load i18n %}

 {% block title %}{{ title }} | {% trans 'Django site admin' %}{% endblock
 %}

 {% block branding %}
 {% trans 'Django administration' %}
 {% endblock %}

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

 (django143) kmtracey@ubuntu 05:41:16:
 ~/.virtualenvs/django143/lib/python2.7/site-packages
 -->
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[Django] #19471: base_site.html should actually be base.html at the end of tutorial 2

2012-12-13 Thread Django
#19471: base_site.html should actually be base.html at the end of tutorial 2
---+--
 Reporter:  brandon@…  |  Owner:  nobody
 Type:  Uncategorized  | Status:  new
Component:  Documentation  |Version:  1.4
 Severity:  Normal |   Keywords:  tutorial
 Triage Stage:  Unreviewed |  Has patch:  0
Easy pickings:  0  |  UI/UX:  0
---+--
 In the documentation for tutorial 2 1.4,
 https://docs.djangoproject.com/en/1.4/intro/tutorial02/, I believe
 references to `base_site.html` need to be adjusted to `base.html`.

 {{{
 Now copy the template admin/base_site.html from within the default Django
 admin template directory in the source code of Django itself
 (django/contrib/admin/templates) into an admin subdirectory of whichever
 directory you're using in TEMPLATE_DIRS. For example, if your
 TEMPLATE_DIRS includes '/home/my_username/mytemplates', as above, then
 copy django/contrib/admin/templates/admin/base_site.html to
 /home/my_username/mytemplates/admin/base_site.html. Don't forget that
 admin subdirectory.

 Then, just edit the file and replace the generic Django text with your own
 site's name as you see fit.

 This template file contains lots of text like {% block branding %} and {{
 title }}. The {% and {{ tags are part of Django's template language. When
 Django renders admin/base_site.html, this template language will be
 evaluated to produce the final HTML page. Don't worry if you can't make
 any sense of the template right now -- we'll delve into Django's
 templating language in Tutorial 3.

 Note that any of Django's default admin templates can be overridden. To
 override a template, just do the same thing you did with base_site.html --
 copy it from the default directory into your custom directory, and make
 changes.

 Astute readers will ask: But if TEMPLATE_DIRS was empty by default, how
 was Django finding the default admin templates? The answer is that, by
 default, Django automatically looks for a templates/ subdirectory within
 each app package, for use as a fallback. See the template loader
 documentation for full information.

 }}}

 In my install of Django 1.4.3, the file was base.html, not base_site.html.

 base_site.html includes the following:


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

 {% block title %}{{ title }} | {% trans 'Django site admin' %}{% endblock
 %}

 {% block branding %}
 {% trans 'Django administration' %}
 {% endblock %}

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

 Which does not match the description provided in the documentation.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.