This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
2012-11-26 16:09:56 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
import sys
|
2014-08-10 16:58:06 +02:00
|
|
|
import test_settings
|
2012-11-26 16:09:56 +01:00
|
|
|
|
2012-11-28 13:24:39 +01:00
|
|
|
|
2012-11-26 16:09:56 +01:00
|
|
|
def schemamigration():
|
|
|
|
# turn ``schemamigration.py --initial`` into
|
2012-11-28 13:24:39 +01:00
|
|
|
# ``manage.py schemamigration cmsplugin_disqus --initial`` and setup the
|
2012-11-26 16:09:56 +01:00
|
|
|
# enviroment
|
|
|
|
from django.conf import settings
|
|
|
|
|
|
|
|
from django.core.management import ManagementUtility
|
|
|
|
settings.configure(
|
2014-08-10 16:58:06 +02:00
|
|
|
INSTALLED_APPS=test_settings.INSTALLED_APPS,
|
|
|
|
DATABASES=test_settings.DATABASES,
|
|
|
|
TEMPLATE_CONTEXT_PROCESSORS=test_settings.TEMPLATE_CONTEXT_PROCESSORS,
|
|
|
|
ROOT_URLCONF=test_settings.ROOT_URLCONF)
|
2012-11-26 16:09:56 +01:00
|
|
|
argv = list(sys.argv)
|
|
|
|
argv.insert(1, 'schemamigration')
|
|
|
|
argv.insert(2, 'djangocms_text_ckeditor')
|
|
|
|
utility = ManagementUtility(argv)
|
|
|
|
utility.execute()
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
schemamigration()
|