[shipping] clean up Milestone.status and redirect shortcut use

RESOLVED FIXED in 3.1

Status

P5
normal
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: peterbe, Assigned: peterbe)

Tracking

x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
The views code in shipping uses http.HttpRedirect() instead of the redirect() shortcut.

Instead of things like status=Milestone.OPEN it does things like status=1.
(Assignee)

Updated

6 years ago
Depends on: 762532
(Assignee)

Comment 1

6 years ago
Note-to-self: This might also mean changing some templates where the numbers are used. Instead, do something like this::

  return render('template', {"Milestone": Milestone, ...})

So you can do this in the templates::

  {% if something.status == Milestone.OPEN %}

instead of 

  {% if something.status == 1 %}


milestone.html, index.html, about-milestone.html, etc.
Assignee: nobody → peterbe
(Assignee)

Comment 2

6 years ago
Pro tip from Pike::

 find apps/shipping/templates/shipping/ -type f|xargs grep \\.status
Priority: -- → P5
(Assignee)

Comment 3

6 years ago
Created attachment 700030 [details] [diff] [review]
No more stray integer
Attachment #700030 - Flags: review?(l10n)

Updated

6 years ago
Attachment #700030 - Flags: review?(l10n) → review+
(Assignee)

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED

Updated

6 years ago
Target Milestone: --- → 3.1
You need to log in before you can comment on or make changes to this bug.