Closed Bug 719873 Opened 14 years ago Closed 14 years ago

All use of render_to_string that don't need `request` shouldn't ask for it

Categories

(Webtools Graveyard :: Elmo, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: peterbe, Assigned: peterbe)

Details

Attachments

(1 file)

Functions inside views.py files that take `request` as a first positional argument might appear like Django view functions but they're not and should therefore not use RequestContext if they don't actually need it. ``import this``
Attachment #590361 - Flags: review?(l10n)
Comment on attachment 590361 [details] [diff] [review] render_to_string functions refactored Review of attachment 590361 [details] [diff] [review]: ----------------------------------------------------------------- r=me, with the removal of the l10nstats snippet call, or that as a follow up bug. ::: apps/homepage/views.py @@ +111,4 @@ > return redirect('homepage.views.teams') > > from l10nstats.views import teamsnippet as stats_snippet > + l10nstats_div = mark_safe(stats_snippet(loc)) I think we should really just drop calling in to this at all. The new team page doesn't use this div. Fine as a follow-up though.
Attachment #590361 - Flags: review?(l10n) → review+
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Assignee: nobody → peterbe
Target Milestone: --- → 2.1
Product: Webtools → Webtools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: