magic-removal: Merged to [2120]

git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Adrian Holovaty 2006-01-24 00:49:16 +00:00
parent b7891c560c
commit 7d23d1e798
5 changed files with 51 additions and 10 deletions

View File

@ -41,7 +41,7 @@ hr { clear:both; color:#eee; background-color:#eee; height:1px; border:none; mar
/* PAGE STRUCTURE */
#container { position:relative; width:100%; min-width:658px; }
#header { text-align:left; min-height:55px; }
#header { text-align:left; }
#content { margin:10px 15px; }
#content-main, #content-related { float:left; }
#footer { clear:both; padding:10px; }
@ -54,13 +54,13 @@ hr { clear:both; color:#eee; background-color:#eee; height:1px; border:none; mar
.colSM #content-related { margin-right:12px; width:30%; }
/* HEADER */
#header { background:#417690; color:#ffc; }
#header a:link, #header a:visited { color:white; }
#header { background:#417690; color:#ffc; min-height:2.5em; _height:2.5em; }
#header a:link, #header a:visited { color:white; }
#header a:hover { text-decoration:underline; }
#branding { float:left; width:480px; }
#branding h1 { padding:8px 0 0 10px; margin:0; font-size:18px; font-weight:normal; color:#f4f379; }
#branding h2 { font-size:14px; padding:0 0 8px 10px; margin:0; font-weight:normal; color:#ffc; }
#user-tools { font-size:11px; padding:8px 8px 0 5px; text-align:right; }
#branding { float:left; width:18em; }
#branding h1 { padding:0.5em 10px 0 10px; font-size:18px; margin:0; font-weight:normal; color:#f4f379; }
#branding h2 { padding:0 10px 0.5em 10px; font-size:14px; margin:0; font-weight:normal; color:#ffc; }
#user-tools { padding:1.2em 10px; font-size:11px; text-align:right; }
/* SIDEBAR */
#content-related h3 { font-size:12px; color:#666; margin-bottom:3px; }

View File

@ -20,10 +20,9 @@
{% block branding %}{% endblock %}
</div>
{% if not user.is_anonymous %}
<div id="user-tools">{% trans 'Welcome,' %} <strong>{% if user.first_name %}{{ user.first_name }}{% else %}{{ user.username }}{% endif %}</strong>. <br />{% block userlinks %}<a href="doc/">{% trans 'Documentation' %}</a> / <a href="password_change/">{% trans 'Change password' %}</a> / <a href="logout/">{% trans 'Log out' %}</a>{% endblock %}</div>
<div id="user-tools">{% trans 'Welcome,' %} <strong>{% if user.first_name %}{{ user.first_name }}{% else %}{{ user.username }}{% endif %}</strong>. {% block userlinks %}<a href="doc/">{% trans 'Documentation' %}</a> / <a href="password_change/">{% trans 'Change password' %}</a> / <a href="logout/">{% trans 'Log out' %}</a>{% endblock %}</div>
{% endif %}
{% block nav-global %}{% endblock %}
<br class="clear" />
</div>
<!-- END Header -->
{% block breadcrumbs %}<div class="breadcrumbs"><a href="/">{% trans 'Home' %}</a>{% if title %} &rsaquo; {{ title }}{% endif %}</div>{% endblock %}

View File

@ -5,7 +5,6 @@
{% block branding %}
<h1 id="site-name">{% trans 'Django administration' %}</h1>
<h2 id="site-url"><a href="http://www.example.com/">example.com</a></h2>
{% endblock %}
{% block nav-global %}{% endblock %}

View File

@ -166,6 +166,22 @@ In the meantime, though, check out this `unofficial Django screencast`_.
.. _unofficial Django screencast: http://www.throwingbeans.org/django_screencasts.html
How can I download the Django documentation to read it offline?
---------------------------------------------------------------
The Django docs are available in the ``docs`` directory of each Django tarball
release. These docs are in ReST (restructured text) format, and each text file
corresponds to a Web page on the official Django site.
Because the documentation is `stored in revision control`_, you can browse
documentation changes just like you can browse code changes.
Technically, the docs on Django's site are generated from the latest development
versions of those ReST documents, so the docs on the Django site may offer more
information than the docs that come with the latest Django release.
.. _stored in revision control: http://code.djangoproject.com/browser/django/trunk/docs
Installation questions
======================
@ -390,6 +406,19 @@ If you're sure your username and password are correct, make sure your user
account has ``is_active`` and ``is_staff`` set to True. The admin site only
allows access to users with those two fields both set to True.
How do I automatically set a field's value to the user who last edited the object in the admin?
-----------------------------------------------------------------------------------------------
At this point, you can't do this. But it's an oft-requested feature, so we're
discussing how it can be implemented. The problem is we don't want to couple
the model layer with the admin layer with the request layer (to get the current
user). It's a tricky problem.
How do I limit admin access so that objects can only be edited by the users who created them?
---------------------------------------------------------------------------------------------
See the answer to the previous question.
My "list_filter" contains a ManyToManyField, but the filter doesn't display.
----------------------------------------------------------------------------

View File

@ -283,6 +283,20 @@ Example::
{% load comments i18n %}
Custom libraries and template inheritance
-----------------------------------------
When you load a custom tag or filter library, the tags/filters are only made
available to the current template -- not any parent or child templates along
the template-inheritance path.
For example, if a template ``foo.html`` has ``{% load comments %}``, a child
template (e.g., one that has ``{% extends foo %}`` will *not* have access to
the comments template tags and filters. The child template is responsible for
its own ``{% load comments %}``.
This is a feature for the sake of maintainability and sanity.
Built-in tag and filter reference
=================================