If a link is requested to the default template, don't put the template name into the link. Fixes #533
Detailed description
This adds an index_template property to Category objects, which indicates what the default index template for that category is. Links generated which request the default template will have that omitted.
This also updates path_alias to have the same index-template-respecting logic for category views.
Developer/user impact
Can now get rid of a bunch of crap like
view.link(template=template if template != 'index' else '')
Summary
If a link is requested to the default template, don't put the template name into the link. Fixes #533
Detailed description
This adds an
index_template
property toCategory
objects, which indicates what the default index template for that category is. Links generated which request the default template will have that omitted.This also updates
path_alias
to have the same index-template-respecting logic for category views.Developer/user impact
Can now get rid of a bunch of crap like
or whatever.
Test plan
See the
category-index
tests.Got a site to show off?