Skip to content
Permalink
Browse files

Bug 1119312: Upgrade Django to 1.6.9

Also fixes some tests that were failing after upgrade.
Code was relying on Django's strip_tags filter which has
changed and now ignores things that obviously aren't HTML tags

Updated to latest playdoh-lib which includes fixes for Django 1.6
in funfactory.
  • Loading branch information
pmac authored and jgmize committed Jan 12, 2015
1 parent bf549cc commit 016fc021d4ae64bac6593468bcee08f054920582
@@ -61,3 +61,6 @@
[submodule "vendor-local/src/django-filter"]
path = vendor-local/src/django-filter
url = https://github.com/alex/django-filter.git
[submodule "vendor-local/src/django"]
path = vendor-local/src/django
url = git://github.com/django/django.git
@@ -10,6 +10,7 @@ cache:
before_script:
- flake8 bedrock lib
- mysql -e 'create database bedrock_test;'
- python manage.py version
- python manage.py syncdb --noinput --migrate
- python manage.py update_product_details
- svn checkout https://svn.mozilla.org/projects/mozilla.com/trunk/locales/ locale
@@ -33,11 +33,16 @@ class FraudReportForm(forms.Form):
)
input_category = forms.ChoiceField(
choices=(
('Charging for software', _lazy(u'Charging for software')),
('Collecting personal information', _lazy(u'Collecting personal information')),
('Domain name violation', _lazy(u'Domain name violation')),
('Logo misuse/modification', _lazy(u'Logo misuse/modification')),
('Distributing modified Firefox/malware', _lazy(u'Distributing modified Firefox/malware')),
('Charging for software',
_lazy(u'Charging for software')),
('Collecting personal information',
_lazy(u'Collecting personal information')),
('Domain name violation',
_lazy(u'Domain name violation')),
('Logo misuse/modification',
_lazy(u'Logo misuse/modification')),
('Distributing modified Firefox/malware',
_lazy(u'Distributing modified Firefox/malware')),
),
required=True,
error_messages={
@@ -10,13 +10,13 @@ A new violating website report has been submitted with the following information
{{ input_product }}

+ Specific product
{{ input_specific_product|safe|strip_tags }}
{{ input_specific_product|strip_tags|safe }}

+ Other details...
{{ input_details|safe|strip_tags }}
{{ input_details|strip_tags|safe }}

+ Attachments...
{{ input_attachment_desc|safe|strip_tags }}
{{ input_attachment_desc|strip_tags|safe }}

+ Email
{{ input_email }}
@@ -227,10 +227,10 @@ def test_emails_not_escaped(self):
Tags are still stripped, though.
"""

STRING1 = u"J'adore Citröns & <Piñatas> so there"
EXPECTED1 = u"J'adore Citröns & so there"
STRING1 = u"<em>J'adore Citröns</em> & <Piñatas> so there"
EXPECTED1 = u"J'adore Citröns & <Piñatas> so there"

STRING2 = u"J'adore Piñatas & <fromage> so here"
STRING2 = u"<em>J'adore Piñatas</em> & <fromage> so here"
EXPECTED2 = u"J'adore Piñatas & so here"

STRING3 = u"J'adore <coffee>el café</coffee> también"
@@ -34,7 +34,7 @@ def submit_form(request, form):

attachment = form.cleaned_data['input_attachment']

if (attachment):
if attachment:
email.attach(attachment.name, attachment.read(), attachment.content_type)

email.send()
@@ -1,4 +1,4 @@
Email: {{ email }}
Area of Interest: {{ interest }}
Language: {{ request.locale }}
Comment: {{ comments|safe|strip_tags }}
Comment: {{ comments|strip_tags|safe }}
@@ -423,8 +423,8 @@ def test_emails_not_escaped(self):
Tags are still stripped, though.
"""
STRING = u"J'adore Citröns & <Piñatas> so there"
EXPECTED = u"J'adore Citröns & so there"
STRING = u"<strong>J'adore Citröns</strong> & <Piñatas> so there"
EXPECTED = u"J'adore Citröns & <Piñatas> so there"
self.data.update(comments=STRING)
self.client.post(self.url_en, self.data)
eq_(len(mail.outbox), 2)
@@ -592,8 +592,8 @@ def test_emails_not_escaped(self):
Tags are still stripped, though.
"""
STRING = u"J'adore Citröns & <Piñatas> so there"
EXPECTED = u"J'adore Citröns & so there"
STRING = u"<em>J'adore Citröns</em> & <Piñatas> so there"
EXPECTED = u"J'adore Citröns & <Piñatas> so there"
self.data.update(comments=STRING)
self.client.post(self.url_en, self.data)
eq_(len(mail.outbox), 2)
@@ -1,7 +1,7 @@
A new speaker request form has been submitted with the following information:

+ Event Name
{{ sr_event_name|safe|strip_tags }}
{{ sr_event_name|strip_tags|safe }}

+ Event URL
{{ sr_event_url }}
@@ -15,29 +15,29 @@ Guest Speaker

{% if sr_guest_speaker1 %}
+ Choice 1
{{ sr_guest_speaker1|safe|strip_tags }}
{{ sr_guest_speaker1|strip_tags|safe }}
{% endif %}
{% if sr_guest_speaker2 %}

+ Choice 2
{{ sr_guest_speaker2|safe|strip_tags }}
{{ sr_guest_speaker2|strip_tags|safe }}
{% endif %}

{% endif %}
------------------------------------
Contact Information

+ Name
{{ sr_contact_name|safe|strip_tags }}
{{ sr_contact_name|strip_tags|safe }}
{% if sr_contact_title %}

+ Title
{{ sr_contact_title|safe|strip_tags }}
{{ sr_contact_title|strip_tags|safe }}
{% endif %}
{% if sr_contact_company %}

+ Company
{{ sr_contact_company|safe|strip_tags }}
{{ sr_contact_company|strip_tags|safe }}
{% endif %}
{% if sr_contact_phone %}

@@ -58,22 +58,22 @@ Event Details

{% if sr_event_venue %}
+ Venue
{{ sr_event_venue|safe|strip_tags }}
{{ sr_event_venue|strip_tags|safe }}
{% endif %}
{% if sr_event_theme %}

+ Theme
{{ sr_event_theme|safe|strip_tags }}
{{ sr_event_theme|strip_tags|safe }}
{% endif %}
{% if sr_event_goal %}

+ Goal
{{ sr_event_goal|safe|strip_tags }}
{{ sr_event_goal|strip_tags|safe }}
{% endif %}
{% if sr_event_format %}

+ Format
{{ sr_event_format|safe|strip_tags }}
{{ sr_event_format|strip_tags|safe }}
{% endif %}
{% if sr_event_audience_size %}

@@ -83,32 +83,32 @@ Event Details
{% if sr_event_audience_demographics %}

+ Audience Demographics
{{ sr_event_audience_demographics|safe|strip_tags }}
{{ sr_event_audience_demographics|strip_tags|safe }}
{% endif %}
{% if sr_event_speakers_confirmed %}

+ Confirmed Speakers
{{ sr_event_speakers_confirmed|safe|strip_tags }}
{{ sr_event_speakers_confirmed|strip_tags|safe }}
{% endif %}
{% if sr_event_speakers_invited %}

+ Invited Speakers
{{ sr_event_speakers_invited|safe|strip_tags }}
{{ sr_event_speakers_invited|strip_tags|safe }}
{% endif %}
{% if sr_event_speakers_past %}

+ Past Speakers
{{ sr_event_speakers_past|safe|strip_tags }}
{{ sr_event_speakers_past|strip_tags|safe }}
{% endif %}
{% if sr_event_media_coverage %}

+ Media Coverage
{{ sr_event_media_coverage|safe|strip_tags }}
{{ sr_event_media_coverage|strip_tags|safe }}
{% endif %}
{% if sr_event_sponsors %}

+ Event Sponsors
{{ sr_event_sponsors|safe|strip_tags }}
{{ sr_event_sponsors|strip_tags|safe }}
{% endif %}
{% if sr_event_confirmation_deadline %}

@@ -126,12 +126,12 @@ Presentation Details
{% if sr_presentation_panelists %}

+ Other Panelists
{{ sr_presentation_panelists|safe|strip_tags }}
{{ sr_presentation_panelists|strip_tags|safe }}
{% endif %}
{% if sr_presentation_topic %}

+ Topic of Presentation
{{ sr_presentation_topic|safe|strip_tags }}
{{ sr_presentation_topic|strip_tags|safe }}
{% endif %}
{% if sr_presentation_length %}

@@ -244,8 +244,8 @@ def test_emails_not_escaped(self):
Tags are still stripped, though.
"""

STRING1 = u"J'adore Citröns & <Piñatas> so there"
EXPECTED1 = u"J'adore Citröns & so there"
STRING1 = u"<blink>J'adore Citröns</blink> & <Piñatas> so there"
EXPECTED1 = u"J'adore Citröns & <Piñatas> so there"

STRING2 = u"J'adore Piñatas & <fromage> so here"
EXPECTED2 = u"J'adore Piñatas & so here"
2 vendor
Submodule vendor updated 1 files
+1 −1 src/funfactory
Submodule django added at 4747c2
@@ -6,6 +6,7 @@ packages/pytz
packages/PyYAML/lib
src/basket-client
src/chkcrontab
src/django
src/django-dnt
src/django-extensions
src/django-filter

0 comments on commit 016fc02

Please sign in to comment.
You can’t perform that action at this time.