From 642c500d60be7a6803079a87f998f1e348a59f75 Mon Sep 17 00:00:00 2001 From: John Eskew Date: Fri, 14 Apr 2017 10:28:53 -0400 Subject: [PATCH 1/2] Fix Django 1.9 deprecation warnings by adding app_label. --- openedx/core/djangoapps/crawlers/models.py | 3 +++ openedx/core/djangoapps/programs/models.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/openedx/core/djangoapps/crawlers/models.py b/openedx/core/djangoapps/crawlers/models.py index 1cb7dcdef3..33f02305e2 100644 --- a/openedx/core/djangoapps/crawlers/models.py +++ b/openedx/core/djangoapps/crawlers/models.py @@ -9,6 +9,9 @@ from config_models.models import ConfigurationModel class CrawlersConfig(ConfigurationModel): """Configuration for the crawlers django app.""" + class Meta(object): + app_label = "crawlers" + known_user_agents = models.TextField( blank=True, help_text="A comma-separated list of known crawler user agents.", diff --git a/openedx/core/djangoapps/programs/models.py b/openedx/core/djangoapps/programs/models.py index 5df88db294..decec1dfe2 100644 --- a/openedx/core/djangoapps/programs/models.py +++ b/openedx/core/djangoapps/programs/models.py @@ -13,6 +13,8 @@ class ProgramsApiConfig(ConfigurationModel): A rename to ProgramsConfig would be more accurate, but costly in terms of developer time. """ + class Meta(object): + app_label = "programs" marketing_path = models.CharField( max_length=255, From 3aa061d4ebf526d993bcc06eb6e1ab9efc683687 Mon Sep 17 00:00:00 2001 From: John Eskew Date: Wed, 19 Apr 2017 15:15:54 -0400 Subject: [PATCH 2/2] Add model migration files for crawlers/programs. --- .../migrations/0002_auto_20170419_0018.py | 18 ++++++++++++++++++ .../migrations/0012_auto_20170419_0018.py | 18 ++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 openedx/core/djangoapps/crawlers/migrations/0002_auto_20170419_0018.py create mode 100644 openedx/core/djangoapps/programs/migrations/0012_auto_20170419_0018.py diff --git a/openedx/core/djangoapps/crawlers/migrations/0002_auto_20170419_0018.py b/openedx/core/djangoapps/crawlers/migrations/0002_auto_20170419_0018.py new file mode 100644 index 0000000000..288c92efb8 --- /dev/null +++ b/openedx/core/djangoapps/crawlers/migrations/0002_auto_20170419_0018.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('crawlers', '0001_initial'), + ] + + operations = [ + migrations.AlterModelOptions( + name='crawlersconfig', + options={}, + ), + ] diff --git a/openedx/core/djangoapps/programs/migrations/0012_auto_20170419_0018.py b/openedx/core/djangoapps/programs/migrations/0012_auto_20170419_0018.py new file mode 100644 index 0000000000..46f60415d7 --- /dev/null +++ b/openedx/core/djangoapps/programs/migrations/0012_auto_20170419_0018.py @@ -0,0 +1,18 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('programs', '0011_auto_20170301_1844'), + ] + + operations = [ + migrations.AlterModelOptions( + name='programsapiconfig', + options={}, + ), + ]