Hi,
I'm having trouble figuring out a piece of template code in Zine.
Maybe someone could help? :)
In admin.py, the manage_entries function renders the
manage_entries.html template, like this:
return render_admin_response('admin/manage_entries.html', 'manage.entries',
entries=entries, pagination=pagination)
Clearly it sets the "entries" variable for the template. But in the
template there's the following code:
<h1>{{ _("Manage Entries") }}</h1>
{{ render_drafts_box(drafts) }}
{{ render_post_list(entries) }}
Does anyone know where the "drafts" variable set? I can't find it
anywhere I look.
Best,
Elver
elver.loho@gmail.com
+372 5661 6933
http://memeresearch.com/
skype: elver.loho
Hi,
Apparently, drafts is not set anywhere and the {% if drafts ... %}
code in render_drafts_box() never executes the inner part. I would
wager a guess that that is some left-over old code...
Regards,
Artem
On Sat, Aug 21, 2010 at 5:39 AM, Elver Loho <elver.loho@gmail.com> wrote:
> Hi,
>
> I'm having trouble figuring out a piece of template code in Zine.
> Maybe someone could help? :)
>
> In admin.py, the manage_entries function renders the
> manage_entries.html template, like this:
>
> return render_admin_response('admin/manage_entries.html', 'manage.entries',
> entries=entries, pagination=pagination)
>
> Clearly it sets the "entries" variable for the template. But in the
> template there's the following code:
>
> <h1>{{ _("Manage Entries") }}</h1>
> {{ render_drafts_box(drafts) }}
> {{ render_post_list(entries) }}
>
> Does anyone know where the "drafts" variable set? I can't find it
> anywhere I look.
>
> Best,
> Elver
>
> elver.loho@gmail.com
> +372 5661 6933
> http://memeresearch.com/>
> skype: elver.loho
>
Thanks! That was it :) On 22 August 2010 01:49, Artem Egorkine <arteme@gmail.com> wrote: > Hi, > > Apparently, drafts is not set anywhere and the {% if drafts ... %} > code in render_drafts_box() never executes the inner part. I would > wager a guess that that is some left-over old code... > > Regards, > Artem > > On Sat, Aug 21, 2010 at 5:39 AM, Elver Loho <elver.loho@gmail.com> wrote: >> Hi, >> >> I'm having trouble figuring out a piece of template code in Zine. >> Maybe someone could help? :) >> >> In admin.py, the manage_entries function renders the >> manage_entries.html template, like this: >> >> return render_admin_response('admin/manage_entries.html', 'manage.entries', >> entries=entries, pagination=pagination) >> >> Clearly it sets the "entries" variable for the template. But in the >> template there's the following code: >> >> <h1>{{ _("Manage Entries") }}</h1> >> {{ render_drafts_box(drafts) }} >> {{ render_post_list(entries) }} >> >> Does anyone know where the "drafts" variable set? I can't find it >> anywhere I look. >> >> Best, >> Elver >> >> elver.loho@gmail.com >> +372 5661 6933 >> http://memeresearch.com/> >> skype: elver.loho >> >