OpenSlides/manage.py

24 lines
585 B
Python
Raw Normal View History

2011-07-31 10:46:29 +02:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Django's execute manager.
2012-04-25 22:29:19 +02:00
:copyright: 2011, 2012 by OpenSlides team, see AUTHORS.
2011-07-31 10:46:29 +02:00
:license: GNU GPL, see LICENSE for more details.
"""
2012-11-01 10:56:38 +01:00
import os, sys
2011-07-31 10:46:29 +02:00
from django.core.management import execute_manager
2012-11-01 10:56:38 +01:00
sys.path.append(os.path.join(os.path.expanduser('~'), '.config'))
2011-07-31 10:46:29 +02:00
try:
2012-11-01 10:56:38 +01:00
from openslides_config import settings
2011-07-31 10:46:29 +02:00
except ImportError:
2012-11-01 10:56:38 +01:00
sys.stderr.write("Error: Can not find the file 'settings.py'. Please create it with the start-script\n")
2011-07-31 10:46:29 +02:00
sys.exit(1)
2012-11-01 10:56:38 +01:00
2011-07-31 10:46:29 +02:00
if __name__ == "__main__":
execute_manager(settings)