diff --git a/pandora/annotation/management/commands/import_srt.py b/pandora/annotation/management/commands/import_srt.py index fa65cb45e..11196716f 100644 --- a/pandora/annotation/management/commands/import_srt.py +++ b/pandora/annotation/management/commands/import_srt.py @@ -7,7 +7,7 @@ from django.conf import settings import ox -import monkey_patch.models +import app.monkey_patch from item.models import Item from user.models import User diff --git a/pandora/app/models.py b/pandora/app/models.py index d438dfaa1..d2ac59ed0 100644 --- a/pandora/app/models.py +++ b/pandora/app/models.py @@ -6,6 +6,8 @@ from django.db import models from changelog.models import Changelog +import monkey_patch + class Page(models.Model): created = models.DateTimeField(auto_now_add=True) modified = models.DateTimeField(auto_now=True) diff --git a/pandora/archive/management/commands/extract_derivatives.py b/pandora/archive/management/commands/extract_derivatives.py index a6010cc63..38ec941ea 100644 --- a/pandora/archive/management/commands/extract_derivatives.py +++ b/pandora/archive/management/commands/extract_derivatives.py @@ -4,7 +4,7 @@ from optparse import make_option from django.core.management.base import BaseCommand -import monkey_patch.models +import app.monkey_patch from ... import models from ...tasks import extract_derivatives diff --git a/pandora/archive/management/commands/import_streams.py b/pandora/archive/management/commands/import_streams.py index 255db0f1e..ad69da6e4 100644 --- a/pandora/archive/management/commands/import_streams.py +++ b/pandora/archive/management/commands/import_streams.py @@ -4,7 +4,7 @@ from django.core.management.base import BaseCommand from django.conf import settings import os -import monkey_patch.models +import app.monkey_patch from ... import models from ...tasks import update_stream diff --git a/pandora/archive/management/commands/migrate_timelines.py b/pandora/archive/management/commands/migrate_timelines.py index 89f5f7218..f3bfee843 100644 --- a/pandora/archive/management/commands/migrate_timelines.py +++ b/pandora/archive/management/commands/migrate_timelines.py @@ -5,7 +5,7 @@ import re from django.core.management.base import BaseCommand from django.conf import settings -import monkey_patch.models +import app.monkey_patch from ... import models diff --git a/pandora/item/management/commands/rebuild_timelines.py b/pandora/item/management/commands/rebuild_timelines.py index 2d2d37fc0..9382cbace 100644 --- a/pandora/item/management/commands/rebuild_timelines.py +++ b/pandora/item/management/commands/rebuild_timelines.py @@ -6,7 +6,7 @@ from glob import glob from django.core.management.base import BaseCommand -import monkey_patch.models +import app.monkey_patch from ... import models from ... import tasks diff --git a/pandora/item/management/commands/rebuildcache.py b/pandora/item/management/commands/rebuildcache.py index f9d4ac0d0..a10797e1a 100644 --- a/pandora/item/management/commands/rebuildcache.py +++ b/pandora/item/management/commands/rebuildcache.py @@ -5,7 +5,7 @@ import time from django.core.management.base import BaseCommand -import monkey_patch.models +import app.monkey_patch from ... import models diff --git a/pandora/item/management/commands/sqlfindindex.py b/pandora/item/management/commands/sqlfindindex.py index 48e576759..5dbaabc98 100644 --- a/pandora/item/management/commands/sqlfindindex.py +++ b/pandora/item/management/commands/sqlfindindex.py @@ -6,7 +6,7 @@ from django.core.management.base import BaseCommand from django.db import connection, transaction from django.conf import settings -import monkey_patch.models +import app.monkey_patch from ... import models diff --git a/pandora/item/management/commands/sync_itemsort.py b/pandora/item/management/commands/sync_itemsort.py index 067a011e1..e5f94fd03 100644 --- a/pandora/item/management/commands/sync_itemsort.py +++ b/pandora/item/management/commands/sync_itemsort.py @@ -6,7 +6,7 @@ from django.core.management.base import BaseCommand from django.db import connection, transaction from django.db.models import fields -import monkey_patch.models +import app.monkey_patch from ... import models import clip.models diff --git a/pandora/item/management/commands/update_external.py b/pandora/item/management/commands/update_external.py index b68b3790c..bb02fc801 100644 --- a/pandora/item/management/commands/update_external.py +++ b/pandora/item/management/commands/update_external.py @@ -4,7 +4,7 @@ from optparse import make_option from django.core.management.base import BaseCommand -import monkey_patch.models +import app.monkey_patch from ... import models diff --git a/pandora/monkey_patch/__init__.py b/pandora/monkey_patch/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/pandora/monkey_patch/migrations/0001_initial.py b/pandora/monkey_patch/migrations/0001_initial.py deleted file mode 100644 index 5f2329d46..000000000 --- a/pandora/monkey_patch/migrations/0001_initial.py +++ /dev/null @@ -1,20 +0,0 @@ -# -*- coding: utf-8 -*- -import datetime -from south.db import db -from south.v2 import SchemaMigration -from django.db import models - - -class Migration(SchemaMigration): - - def forwards(self, orm): - pass - - def backwards(self, orm): - pass - - models = { - - } - - complete_apps = ['monkey_patch'] \ No newline at end of file diff --git a/pandora/monkey_patch/migrations/__init__.py b/pandora/monkey_patch/migrations/__init__.py deleted file mode 100644 index e69de29bb..000000000 diff --git a/pandora/monkey_patch/models.py b/pandora/monkey_patch/models.py deleted file mode 100644 index 986ac9d96..000000000 --- a/pandora/monkey_patch/models.py +++ /dev/null @@ -1,28 +0,0 @@ -from django.contrib.auth.models import User, Group -from django.core.validators import MaxLengthValidator - -#load config from json -import app.config -app.config.init() - -NEW_LENGTH = { - 'username': 255, - 'email': 255, - 'password': 255, -} - -def monkey_patch_username(): - for field in NEW_LENGTH: - f = User._meta.get_field(field) - f.max_length = NEW_LENGTH[field] - for v in f.validators: - if isinstance(v, MaxLengthValidator): - v.limit_value = NEW_LENGTH[field] - - f = Group._meta.get_field('name') - f.max_length = 255 - for v in f.validators: - if isinstance(v, MaxLengthValidator): - v.limit_value = 255 - -monkey_patch_username() diff --git a/pandora/settings.py b/pandora/settings.py index 08215d56d..ec0afc699 100644 --- a/pandora/settings.py +++ b/pandora/settings.py @@ -94,7 +94,6 @@ TEMPLATE_DIRS = ( ) INSTALLED_APPS = ( - 'monkey_patch', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', @@ -112,7 +111,6 @@ INSTALLED_APPS = ( 'djcelery', 'app', 'log', - 'annotation', 'clip', 'sequence', diff --git a/pandora/urls.py b/pandora/urls.py index cef1d8ac4..4503ae35d 100644 --- a/pandora/urls.py +++ b/pandora/urls.py @@ -11,7 +11,7 @@ from django.conf import settings from django.contrib import admin admin.autodiscover() -import monkey_patch.models +import app.monkey_patch import ox.django.api.urls diff --git a/pandora/user/management/commands/update_useragents.py b/pandora/user/management/commands/update_useragents.py index 789a3ec51..389d28ee6 100644 --- a/pandora/user/management/commands/update_useragents.py +++ b/pandora/user/management/commands/update_useragents.py @@ -3,7 +3,7 @@ from django.core.management.base import BaseCommand -import monkey_patch.models +import app.monkey_patch from ... import models