On Jun 26, 6:14 pm, "euan.godd...@googlemail.com"
wrote:
> There is no reason why all views should pass that variable to the
> template. It is more efficient to only pass the minimal variable
> necessary to render the template Even the list is lazily evaluated
> there is still unnecessary overhead
There is no reason why all views should pass that variable to the
template. It is more efficient to only pass the minimal variable
necessary to render the template Even the list is lazily evaluated
there is still unnecessary overhead in passing it when not needed.
Euan
On 26 June, 08:50, derek w
On Jun 25, 8:45 pm, raj wrote:
> > Before I "pass the variable app_list"; do I not need to create what is
> > in this variable first? If so, how?
>
> That template is rendered by the view, AdminSite.index() found at
> django.contrib.admin.sites. Please Check it to know how it's done.
>
> Rajeesh.
> Before I "pass the variable app_list"; do I not need to create what is
> in this variable first? If so, how?
That template is rendered by the view, AdminSite.index() found at
django.contrib.admin.sites. Please Check it to know how it's done.
Rajeesh.
--
You received this message because you
On Jun 25, 9:07 am, "euan.godd...@googlemail.com"
wrote:
> Do you mean that you want to include this code in your own app or want
> to alter the structure of the admin app?
>
> Either of these actions will require the view that renders the page to
> pass the variable app_list into the context as }
Do you mean that you want to include this code in your own app or want
to alter the structure of the admin app?
Either of these actions will require the view that renders the page to
pass the variable app_list into the context as }% if app_list %} will
always be False as Django's templating system
Working with Django 1.2.1
The default index page for Django admin contains:
{% if app_list %}
{% for app in app_list %}
...
{% endfor %}
{% else %}
{% trans "You don't have permission to edit anything." %}
{% endif %}
I'd like to move this snippet to a separate page; however, when I
7 matches
Mail list logo