Opened 19 years ago

Last modified 16 years ago

#541 closed enhancement

Making generic views use other templates like Zope3 ZPT — at Version 1

Reported by: jpaulofarias@… Owned by: Jacob
Component: Generic views Version: 1.0
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: yes Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description (last modified by Jacob)

Hi!

I was wondering if it is possible to use other template engines with generic views.

I think making template_loader a parameter of object_list at file list_detail.py, with default value django.core.template_loader should make it flexible enough to use any template engine.

The user could, then, switch to zope3 zpt by adding a key on the dict of the url patterns parameter, like this:

from django.contrib.pagetemplate import pagetemplate

info_dict = {
  'app_label': 'myapp',
  'app_module': 'mymodule',
  'template_loader': pagetemplate,
}

Hope this will be helpful.

--
João Paulo Fernandes Farias

Change History (1)

comment:1 by Jacob, 19 years ago

Description: modified (diff)
Status: newassigned

Sounds like a great idea. I'll add this when I get a moment, but if you want to write a patch that will make it happen quicker.

Note: See TracTickets for help on using tickets.
Back to Top