total mess: some random experiments with images and lqc's dvcs
[redakcja.git] / redakcja / manage.py
1 #!/usr/bin/env python
2 from django.core.management import execute_manager
3
4 import logging
5 import sys
6 import os
7
8 logging.basicConfig(level=logging.DEBUG, stream=sys.stderr)
9
10 PROJECT_ROOT = os.path.realpath(os.path.dirname(__file__))
11 sys.path += [os.path.realpath(os.path.join(*x)) for x in (
12         (PROJECT_ROOT, '..'),
13         (PROJECT_ROOT, '..', 'apps'),
14         (PROJECT_ROOT, '..', 'lib')
15 )]
16
17 try:
18     import localsettings  # Assumed to be in the same directory.
19 except ImportError:
20     logging.exception("Failed to import settings")
21     import sys
22     sys.exit(1)
23
24 if __name__ == "__main__":
25     execute_manager(localsettings)