On Feb 18, 2008 2:22 PM, Karen Tracey <[EMAIL PROTECTED]> wrote:
> On Feb 18, 2008 1:18 AM, Almir Karic <[EMAIL PROTECTED]> wrote:
>
> >
> > it seems that the name of the template is hardcoded in the code
> >
> > def result_list(cl):
> > return {'cl': cl,
> > 'result_headers': list(result_headers(cl)),
> > 'results': list(results(cl))}
> > result_list =
> register.inclusion_tag("admin/change_list_results.html")(result_list)
> >
> >
> > :(
> >
> > can anyone confirm this?
>
>
> Yes, that's the code from admin. Overriding the default admin templates is
> described here:
>
> http://www.djangoproject.com/documentation/tutorial02/#customize-the-admin-look-and-feel
>
> and as far as I can see it doesn't provide for overriding a template on a
> per-model basis. Is there some other doc where you got the idea that this
> could be done?
http://djangobook.com/en/1.0/chapter17/ is where i read things, Table
17-1. Global Admin Templates lists change_list.html as over-riddable
per app and/or object basis. i looked into that code and the
particular bit that interests me seems to be 'included' from
change_list_results.html, so i hopped that change_list_results.html is
over-riddable the same way change_list.html is. apperently i was wrong
:(.
as for what i am trying to do, i created myself a VERY simple TODO
manager (a single model, with admin and meta classes), i would like to
break the tasks into 3 visually separated blocks, one for tasks due by
today, one for future tasks and one for tasks with unassigned date.
the obvious (for me) way to do this is to add 3 for loops with if's
inside them and some html around it to visually separate the blocks.
>
> You don't mention whether you are trying to do this with current admin or
> newforms-admin. Personally, at this point I wouldn't be investing much time
> in trying to make customizations using old admin, so if you are not using
> newforms-admin you might want to give it a look. Also if you give more
> details of exactly what you are trying to do someone might be able to
> provide some more specific guidance.
>
> Karen
>
>
> >
> >
> >
> >
> >
> >
> > On Feb 16, 2008 8:15 AM, Almir Karic <[EMAIL PROTECTED]> wrote:
> > > i would like to change the way django admin writes out the results for
> > > one object, the code i would like to change is located in
> > > change_list_results.html, however if i put that file in my
> > > templates/admin/<app>/<object name>/ django doesn't seem to pick it
> > > up. any hints?
> > >
> > > --
> > > error: one bad user found in front of screen
> > >
> >
> >
> >
> > --
> > error: one bad user found in front of screen
> > > >
> >
>
--
error: one bad user found in front of screen
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---