summaryrefslogtreecommitdiffstats
path: root/schemamigration.py
diff options
context:
space:
mode:
authorPatrick Lauber <digi@treepy.com>2012-11-26 15:09:56 (GMT)
committerPatrick Lauber <digi@treepy.com>2012-11-26 15:09:56 (GMT)
commit63db1d6d72b3dff0b8be5a48ea4bd84362c69e6c (patch)
tree7666363b21d2eae87a4b0446285eebec149a88c3 /schemamigration.py
parent3c2fa95bc3a4d436e4f5e6159d346887d466d27d (diff)
downloaddjangocms-text-ckeditor-63db1d6d72b3dff0b8be5a48ea4bd84362c69e6c.zip
djangocms-text-ckeditor-63db1d6d72b3dff0b8be5a48ea4bd84362c69e6c.tar.gz
djangocms-text-ckeditor-63db1d6d72b3dff0b8be5a48ea4bd84362c69e6c.tar.bz2
initial commit
Diffstat (limited to 'schemamigration.py')
-rw-r--r--schemamigration.py57
1 files changed, 57 insertions, 0 deletions
diff --git a/schemamigration.py b/schemamigration.py
new file mode 100644
index 0000000..5e918e7
--- /dev/null
+++ b/schemamigration.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import sys
+
+INSTALLED_APPS = [
+ 'django.contrib.contenttypes',
+ 'django.contrib.auth',
+ 'django.contrib.sessions',
+ 'django.contrib.sites',
+ 'django.contrib.admin',
+ 'mptt',
+ 'cms',
+ 'menus',
+ 'djangocms_text_ckeditor',
+ 'south',
+]
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.sqlite3',
+ 'NAME': ':memory:',
+ }
+}
+
+TEMPLATE_CONTEXT_PROCESSORS = [
+ 'django.core.context_processors.auth',
+ 'django.core.context_processors.i18n',
+ 'django.core.context_processors.request',
+ 'django.core.context_processors.media',
+ 'django.core.context_processors.static',
+ 'cms.context_processors.media',
+ 'sekizai.context_processors.sekizai',
+]
+
+ROOT_URLCONF = 'cms.urls'
+
+def schemamigration():
+ # turn ``schemamigration.py --initial`` into
+ # ``manage.py schemamigration cmsplugin_disqus --initial`` and setup the
+ # enviroment
+ from django.conf import settings
+
+ from django.core.management import ManagementUtility
+ settings.configure(
+ INSTALLED_APPS=INSTALLED_APPS,
+ ROOT_URLCONF=ROOT_URLCONF,
+ DATABASES=DATABASES,
+ TEMPLATE_CONTEXT_PROCESSORS=TEMPLATE_CONTEXT_PROCESSORS
+ )
+ argv = list(sys.argv)
+ argv.insert(1, 'schemamigration')
+ argv.insert(2, 'djangocms_text_ckeditor')
+ utility = ManagementUtility(argv)
+ utility.execute()
+
+if __name__ == "__main__":
+ schemamigration()