Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#8420 closed (wontfix)

Inconsistent use of template_name in generic views

Reported by: Benjamin Schwarze Owned by: nobody
Component: Generic views Version: dev
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Nearly all generic views use the parameter template_name to provide a custom template for rendering purposes.

But, the generic view django.views.generic.simple.direct_to_template uses the parameter template instead of template_name for exactly the same.

This is an inconsistency that probably should be fixed before releasing 1.0.

Change History (3)

comment:1 by Malcolm Tredinnick, 16 years ago

Resolution: wontfix
Status: newclosed

Not worth it. It would break every piece of code using that template for no real reason. You don't just switch on generic view for another with no other changes, so changing this at the time isn't a real hardship. Yes, it might be nice if we were starting from scratch, but introducing random backwards-incompatible changes that don't really improve functionality isn't a good idea at the moment.

comment:2 by Benjamin Schwarze, 16 years ago

What about officially changing it to template_name, and mention the use of template_name in the docs, but still keeping silent support for the old template parameter.
This wouldn't break backwards compatibility, but rather promotes the use of the commonly-used parameter template_name.

Support for the old template parameter may be dropped in a future release.

In the case that this ticket will be accepted I could provide a patch.

comment:3 by Jacob, 13 years ago

milestone: 1.0

Milestone 1.0 deleted

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