Don't add an <akap> in a vocab entry
[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/librarian'),
15         (PROJECT_ROOT, '..', 'lib')
16 )]
17
18 try:
19     import localsettings  # Assumed to be in the same directory.
20 except ImportError:
21     logging.exception("Failed to import settings")
22     import sys
23     sys.exit(1)
24
25 if __name__ == "__main__":
26     execute_manager(localsettings)