aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--account/extra.py15
-rw-r--r--django_skaschool/settings.py2
-rw-r--r--django_skaschool/settings_mysql.py2
-rw-r--r--django_skaschool/settings_production.py2
4 files changed, 18 insertions, 3 deletions
diff --git a/account/extra.py b/account/extra.py
index 74c11e7..d0f74f2 100644
--- a/account/extra.py
+++ b/account/extra.py
@@ -12,9 +12,12 @@ from django.conf import settings
from django.template.defaultfilters import filesizeformat
from django.utils.translation import ugettext_lazy as _
+from south.modelsinspector import add_introspection_rules
+
import os
+### custom fields ###
class ContentTypeRestrictedFileField(models.FileField):
"""
Same as FileField, but you can specify:
@@ -54,6 +57,18 @@ class ContentTypeRestrictedFileField(models.FileField):
#
return data
+## add custom fields to south inspection
+add_introspection_rules([
+ (
+ [ContentTypeRestrictedFileField], # class these apply to
+ [], # positional arguments
+ { # keyword argument
+ "content_types": ["content_types", {}],
+ "max_upload_size": ["max_upload_size", {}],
+ },
+ ),
+], ["^account\.extra\.ContentTypeRestrictedFileField"])
+
### OverwriteStorage ###
class OverwriteStorage(FileSystemStorage):
diff --git a/django_skaschool/settings.py b/django_skaschool/settings.py
index 9d6cb66..402815f 100644
--- a/django_skaschool/settings.py
+++ b/django_skaschool/settings.py
@@ -43,7 +43,7 @@ DEFAULT_APPS = (
)
# THIRD_PARTY_APPS
THIRD_PARTY_APPS = (
- #'south',
+ 'south',
'bootstrap3',
'registration',
'captcha',
diff --git a/django_skaschool/settings_mysql.py b/django_skaschool/settings_mysql.py
index f5b1977..18c0196 100644
--- a/django_skaschool/settings_mysql.py
+++ b/django_skaschool/settings_mysql.py
@@ -43,7 +43,7 @@ DEFAULT_APPS = (
)
# THIRD_PARTY_APPS
THIRD_PARTY_APPS = (
- #'south',
+ 'south',
'bootstrap3',
'registration',
'captcha',
diff --git a/django_skaschool/settings_production.py b/django_skaschool/settings_production.py
index 92a4528..c447a8d 100644
--- a/django_skaschool/settings_production.py
+++ b/django_skaschool/settings_production.py
@@ -50,7 +50,7 @@ DEFAULT_APPS = (
)
# THIRD_PARTY_APPS
THIRD_PARTY_APPS = (
- #'south',
+ 'south',
'bootstrap3',
'registration',
'captcha',