Opened 19 years ago

Closed 19 years ago

Last modified 17 years ago

#125 closed defect (wontfix)

View-Controller separation violation

Reported by: maurycy Owned by: Adrian Holovaty
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

For example, django.views.admin.main:

    if lookup_opts.admin.search_fields:
        raw_template.append('<div id="toolbar">\n<form id="changelist-search" action="" method="get">\n')
        raw_template.append('<label><img src="%simg/admin/icon_searchbox.png" /></label> ' % ADMIN_MEDIA_PREFIX)
        raw_template.append('<input type="text" size="40" name="%s" value="%s" id="searchbar" /> ' % \
            (SEARCH_VAR, escape(query)))

Shouldn't it be done only with templates?

Change History (2)

comment:1 by maurycy, 19 years ago

Additionally, it makes harder to fix #115.

comment:2 by Adrian Holovaty, 19 years ago

Resolution: wontfix
Status: newclosed

The automatic admin generation is a special-case. The template is hard-coded for that, because it would be way too complex if we used a template to generate the template. We broke the rule on purpose for this isolated case.

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