move monkey_patch into app, no need for extra app

This commit is contained in:
j 2013-05-18 21:43:52 +00:00
parent 7c1c4c7737
commit 5f209cf92b
17 changed files with 13 additions and 61 deletions

View file

@ -7,7 +7,7 @@ from django.conf import settings
import ox import ox
import monkey_patch.models import app.monkey_patch
from item.models import Item from item.models import Item
from user.models import User from user.models import User

View file

@ -6,6 +6,8 @@ from django.db import models
from changelog.models import Changelog from changelog.models import Changelog
import monkey_patch
class Page(models.Model): class Page(models.Model):
created = models.DateTimeField(auto_now_add=True) created = models.DateTimeField(auto_now_add=True)
modified = models.DateTimeField(auto_now=True) modified = models.DateTimeField(auto_now=True)

View file

@ -4,7 +4,7 @@ from optparse import make_option
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
import monkey_patch.models import app.monkey_patch
from ... import models from ... import models
from ...tasks import extract_derivatives from ...tasks import extract_derivatives

View file

@ -4,7 +4,7 @@ from django.core.management.base import BaseCommand
from django.conf import settings from django.conf import settings
import os import os
import monkey_patch.models import app.monkey_patch
from ... import models from ... import models
from ...tasks import update_stream from ...tasks import update_stream

View file

@ -5,7 +5,7 @@ import re
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
from django.conf import settings from django.conf import settings
import monkey_patch.models import app.monkey_patch
from ... import models from ... import models

View file

@ -6,7 +6,7 @@ from glob import glob
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
import monkey_patch.models import app.monkey_patch
from ... import models from ... import models
from ... import tasks from ... import tasks

View file

@ -5,7 +5,7 @@ import time
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
import monkey_patch.models import app.monkey_patch
from ... import models from ... import models

View file

@ -6,7 +6,7 @@ from django.core.management.base import BaseCommand
from django.db import connection, transaction from django.db import connection, transaction
from django.conf import settings from django.conf import settings
import monkey_patch.models import app.monkey_patch
from ... import models from ... import models

View file

@ -6,7 +6,7 @@ from django.core.management.base import BaseCommand
from django.db import connection, transaction from django.db import connection, transaction
from django.db.models import fields from django.db.models import fields
import monkey_patch.models import app.monkey_patch
from ... import models from ... import models
import clip.models import clip.models

View file

@ -4,7 +4,7 @@ from optparse import make_option
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
import monkey_patch.models import app.monkey_patch
from ... import models from ... import models

View file

@ -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']

View file

@ -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()

View file

@ -94,7 +94,6 @@ TEMPLATE_DIRS = (
) )
INSTALLED_APPS = ( INSTALLED_APPS = (
'monkey_patch',
'django.contrib.auth', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.contenttypes',
'django.contrib.sessions', 'django.contrib.sessions',
@ -112,7 +111,6 @@ INSTALLED_APPS = (
'djcelery', 'djcelery',
'app', 'app',
'log', 'log',
'annotation', 'annotation',
'clip', 'clip',
'sequence', 'sequence',

View file

@ -11,7 +11,7 @@ from django.conf import settings
from django.contrib import admin from django.contrib import admin
admin.autodiscover() admin.autodiscover()
import monkey_patch.models import app.monkey_patch
import ox.django.api.urls import ox.django.api.urls

View file

@ -3,7 +3,7 @@
from django.core.management.base import BaseCommand from django.core.management.base import BaseCommand
import monkey_patch.models import app.monkey_patch
from ... import models from ... import models