Re: Rendering the Admin app list?

2010-06-27 Thread derek
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

Re: Rendering the Admin app list?

2010-06-26 Thread euan.godd...@googlemail.com
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

Re: Rendering the Admin app list?

2010-06-26 Thread derek
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.

Re: Rendering the Admin app list?

2010-06-25 Thread raj
> 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

Re: Rendering the Admin app list?

2010-06-25 Thread derek
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 }

Re: Rendering the Admin app list?

2010-06-25 Thread euan.godd...@googlemail.com
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

Rendering the Admin app list?

2010-06-24 Thread derek
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