Closed Bug 910800 Opened 7 years ago Closed 7 years ago

upgrade to django 1.5

Categories

(Input Graveyard :: Code Quality, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: willkg, Assigned: willkg)

Details

(Whiteboard: u=dev c=codequality p=2 s=input.2013q4)

We need to upgrade to Django 1.5 soon. Because Input is a playdoh project, it probably means we need to upgrade playdoh first.

It might make sense to take this as an opportunity to ditch playdoh-lib.
Putting this in the 2013q3 backlog. Should do it soon.
Whiteboard: u=dev c=codequality p= s=input.2013q3
Bumping to next quarter.

Making it a P3. We don't *have* to do it, but it's a good idea.
Priority: -- → P3
Whiteboard: u=dev c=codequality p= s=input.2013q3 → u=dev c=codequality p= s=input.2013q4
Django 1.5 release notes:

https://docs.djangoproject.com/en/dev/releases/1.5/

Interesting bits:

> Management commands do not raise SystemExit any more when called by code from call_command. Any exception raised by the command (mostly CommandError) is propagated.
>
> Moreover, when you output errors or messages in your custom commands, you should now use self.stdout.write('message') and self.stderr.write('error') (see the note on management commands output).

> In the admin, you can now filter users by groups which they are members of.

> The new ALLOWED_HOSTS setting validates the request’s Host header and protects against host-poisoning attacks. This setting is now required whenever DEBUG is False, or else django.http.HttpRequest.get_host() will raise SuspiciousOperation. For more details see the full documentation for the new setting.

> The cleaned_data dictionary is now always present after form validation. When the form doesn’t validate, it contains only the fields that passed validation. You should test the success of the validation with the is_valid() method and not with the presence or absence of the cleaned_data attribute on the form.
Ugly. Let me try that again:

Django 1.5 release notes:

https://docs.djangoproject.com/en/dev/releases/1.5/

Interesting bits:

> Management commands do not raise SystemExit any more when called by code from call_command.
> Any exception raised by the command (mostly CommandError) is propagated.
>
> Moreover, when you output errors or messages in your custom commands, you should now use 
> self.stdout.write('message') and self.stderr.write('error') (see the note on management 
> commands output).


> In the admin, you can now filter users by groups which they are members of.


> The new ALLOWED_HOSTS setting validates the request’s Host header and protects against 
> host-poisoning attacks. This setting is now required whenever DEBUG is False, or else 
> django.http.HttpRequest.get_host() will raise SuspiciousOperation. For more details see 
> the full documentation for the new setting.

> The cleaned_data dictionary is now always present after form validation. When the form
> doesn’t validate, it contains only the fields that passed validation. You should test
> the success of the validation with the is_valid() method and not with the presence or
> absence of the cleaned_data attribute on the form.
I made some code changes that allow Fjord to work with Django 1.5.

PR: https://github.com/mozilla/fjord/pull/182
I did some prep work in these two commits:

* https://github.com/mozilla/fjord/commit/e13a69a
* https://github.com/mozilla/fjord/commit/77d391f

Still need to update playdoh-lib to Django 1.5 and then I can update Fjord.
Assignee: nobody → willkg
Status: NEW → ASSIGNED
Whiteboard: u=dev c=codequality p= s=input.2013q4 → u=dev c=codequality p=2 s=input.2013q4
All the work I needed to do in playdoh-lib and funfactory is done.

In a PR: https://github.com/mozilla/fjord/pull/185
Landed in master in: https://github.com/mozilla/fjord/commit/f8e8a89

Pushed to production just now.

I'll spend the next hour keeping an eye on everything to make sure things are ok.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Product: Input → Input Graveyard
You need to log in before you can comment on or make changes to this bug.