Commit 8ecea60a by Ahsan Ulhaq

upgrade django to 1.10.7

Upgrade django to the newer version
Django has been updated to 1.11.X so this is one step towards the newer version
LEARNER-946
parent 7ea762eb
...@@ -172,7 +172,7 @@ class CatalogViewSetTests(ElasticsearchTestMixin, SerializationMixin, OAuth2Mixi ...@@ -172,7 +172,7 @@ class CatalogViewSetTests(ElasticsearchTestMixin, SerializationMixin, OAuth2Mixi
# to be included. # to be included.
filtered_course_run = CourseRunFactory(course=course) filtered_course_run = CourseRunFactory(course=course)
with self.assertNumQueries(19): with self.assertNumQueries(16):
response = self.client.get(url) response = self.client.get(url)
assert response.status_code == 200 assert response.status_code == 200
......
...@@ -73,7 +73,7 @@ class ProgramViewSetTests(SerializationMixin, APITestCase): ...@@ -73,7 +73,7 @@ class ProgramViewSetTests(SerializationMixin, APITestCase):
def test_retrieve(self): def test_retrieve(self):
""" Verify the endpoint returns the details for a single program. """ """ Verify the endpoint returns the details for a single program. """
program = self.create_program() program = self.create_program()
with self.assertNumQueries(42): with self.assertNumQueries(37):
response = self.assert_retrieve_success(program) response = self.assert_retrieve_success(program)
# property does not have the right values while being indexed # property does not have the right values while being indexed
del program._course_run_weeks_to_complete del program._course_run_weeks_to_complete
...@@ -96,7 +96,7 @@ class ProgramViewSetTests(SerializationMixin, APITestCase): ...@@ -96,7 +96,7 @@ class ProgramViewSetTests(SerializationMixin, APITestCase):
program = ProgramFactory(courses=course_list, order_courses_by_start_date=order_courses_by_start_date) program = ProgramFactory(courses=course_list, order_courses_by_start_date=order_courses_by_start_date)
# property does not have the right values while being indexed # property does not have the right values while being indexed
del program._course_run_weeks_to_complete del program._course_run_weeks_to_complete
with self.assertNumQueries(29): with self.assertNumQueries(26):
response = self.assert_retrieve_success(program) response = self.assert_retrieve_success(program)
assert response.data == self.serialize_program(program) assert response.data == self.serialize_program(program)
self.assertEqual(course_list, list(program.courses.all())) # pylint: disable=no-member self.assertEqual(course_list, list(program.courses.all())) # pylint: disable=no-member
...@@ -135,7 +135,7 @@ class ProgramViewSetTests(SerializationMixin, APITestCase): ...@@ -135,7 +135,7 @@ class ProgramViewSetTests(SerializationMixin, APITestCase):
""" Verify the endpoint returns a list of all programs. """ """ Verify the endpoint returns a list of all programs. """
expected = [self.create_program() for __ in range(3)] expected = [self.create_program() for __ in range(3)]
expected.reverse() expected.reverse()
self.assert_list_results(self.list_path, expected, 13) self.assert_list_results(self.list_path, expected, 12)
# Verify that repeated list requests use the cache. # Verify that repeated list requests use the cache.
self.assert_list_results(self.list_path, expected, 2) self.assert_list_results(self.list_path, expected, 2)
...@@ -230,7 +230,7 @@ class ProgramViewSetTests(SerializationMixin, APITestCase): ...@@ -230,7 +230,7 @@ class ProgramViewSetTests(SerializationMixin, APITestCase):
""" Verify the endpoint returns marketing URLs without UTM parameters. """ """ Verify the endpoint returns marketing URLs without UTM parameters. """
url = self.list_path + '?exclude_utm=1' url = self.list_path + '?exclude_utm=1'
program = self.create_program() program = self.create_program()
self.assert_list_results(url, [program], 13, extra_context={'exclude_utm': 1}) self.assert_list_results(url, [program], 12, extra_context={'exclude_utm': 1})
def test_minimal_serializer_use(self): def test_minimal_serializer_use(self):
""" Verify that the list view uses the minimal serializer. """ """ Verify that the list view uses the minimal serializer. """
......
...@@ -73,7 +73,6 @@ class CourseFactory(factory.DjangoModelFactory): ...@@ -73,7 +73,6 @@ class CourseFactory(factory.DjangoModelFactory):
level_type = factory.SubFactory(LevelTypeFactory) level_type = factory.SubFactory(LevelTypeFactory)
card_image_url = FuzzyURL() card_image_url = FuzzyURL()
video = factory.SubFactory(VideoFactory) video = factory.SubFactory(VideoFactory)
marketing_url = FuzzyText(prefix='https://example.com/test-course-url')
partner = factory.SubFactory(PartnerFactory) partner = factory.SubFactory(PartnerFactory)
class Meta: class Meta:
......
...@@ -178,7 +178,7 @@ class CreateCourseViewTests(TestCase): ...@@ -178,7 +178,7 @@ class CreateCourseViewTests(TestCase):
self.assertContains( self.assertContains(
response, response,
'<select class="field-input input-select" id="id_organization" name="organization">' '<select class="field-input input-select" id="id_organization" name="organization" required>'
) )
new_organization_extension = factories.OrganizationExtensionFactory() new_organization_extension = factories.OrganizationExtensionFactory()
......
{# Base template for edX-specific pages. #} {# Base template for edX-specific pages. #}
{% load compress %} {% load compress %}
{% load staticfiles %} {% load static %}
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
......
{% load staticfiles %} {% load static %}
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
......
{% load staticfiles %} {% load static %}
{% load i18n %} {% load i18n %}
<header class="header"> <header class="header">
<div class="layout-1q1h1q layout-flush layout-header"> <div class="layout-1q1h1q layout-flush layout-header">
......
{% extends 'publisher/base.html' %} {% extends 'publisher/base.html' %}
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load static %}
{% block title %} {% block title %}
{% trans "Create New Course" %} {% trans "Create New Course" %}
......
{% extends 'publisher/base.html' %} {% extends 'publisher/base.html' %}
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load static %}
{% block title %} {% block title %}
{% trans "New Course Run" %} {% trans "New Course Run" %}
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% load compress %} {% load compress %}
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load static %}
{% block stylesheets %} {% block stylesheets %}
{{ block.super }} {{ block.super }}
......
{% extends 'publisher/base.html' %} {% extends 'publisher/base.html' %}
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load static %}
{% block title %} {% block title %}
{% trans "Course Detail" %} {% trans "Course Detail" %}
{% endblock title %} {% endblock title %}
......
{% extends 'publisher/base.html' %} {% extends 'publisher/base.html' %}
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load static %}
{% block title %} {% block title %}
{% trans "Edit Course" %} {% trans "Edit Course" %}
......
{% extends 'base.html' %} {% extends 'base.html' %}
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load static %}
{% load compress %} {% load compress %}
{% block title %} {% block title %}
......
{% extends 'publisher/base.html' %} {% extends 'publisher/base.html' %}
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load static %}
{% block title %} {% block title %}
{% trans "Edit Course Run" %} {% trans "Edit Course Run" %}
......
{% load compress %} {% load compress %}
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load static %}
<div id="instructorProfileModal" class="modal"> <div id="instructorProfileModal" class="modal">
<div class="modal-content course-information"> <div class="modal-content course-information">
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
{% load compress %} {% load compress %}
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load static %}
{% block title %} {% block title %}
{% trans "Course Run Details" %} {% trans "Course Run Details" %}
......
{% extends 'publisher/base.html' %} {% extends 'publisher/base.html' %}
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load static %}
{% block title %} {% block title %}
{% trans "Dashboard" %} {% trans "Dashboard" %}
......
{% extends 'publisher/base.html' %} {% extends 'publisher/base.html' %}
{% load i18n %} {% load i18n %}
{% load staticfiles %} {% load static %}
{% block title %} {% block title %}
{% trans "Seat Form" %} {% trans "Seat Form" %}
{% endblock title %} {% endblock title %}
......
{% extends 'rest_framework_swagger/base.html' %} {% extends 'rest_framework_swagger/base.html' %}
{% load staticfiles %} {% load static %}
{% block style %} {% block style %}
{{ block.super }} {{ block.super }}
......
beautifulsoup4==4.5.1 beautifulsoup4==4.5.1
boto==2.42.0 boto==2.42.0
cryptography==1.7.1 cryptography==1.7.1
django==1.9.13 django==1.10.7
django-autocomplete-light==3.1.8 django-autocomplete-light==3.1.8
django-choices==1.4.3 django-choices==1.4.3
django-compressor==2.0 django-compressor==2.1.1
django-contrib-comments==1.7.2 django-contrib-comments==1.7.2
django-extensions==1.7.8 django-extensions==1.7.8
django-filter==0.14.0 django-filter==0.14.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment