Last change
on this file since 9006 was 9006, checked in by dennisw, 14 years ago |
django_gheat - versie van gheat die gebruik maakt van django framework, ondersteunt SQL connecties in tegenstelling tot gheat dat gebruik maakt van sqlite
|
File size:
924 bytes
|
Line | |
---|
1 | #!/usr/bin/env python
|
---|
2 | from django.core.management import execute_manager
|
---|
3 | import sys
|
---|
4 | from os.path import dirname, abspath, join
|
---|
5 |
|
---|
6 | # Importing gheat folder to be more easy to test this application. In a real
|
---|
7 | # application should be done with python_path
|
---|
8 | sys.path.append(dirname(dirname(dirname(abspath(__file__)))))
|
---|
9 |
|
---|
10 | # Importing also django extenions
|
---|
11 |
|
---|
12 | sys.path.append(join(dirname(dirname(dirname(abspath(__file__)))),'external','django-extensions'))
|
---|
13 |
|
---|
14 |
|
---|
15 | try:
|
---|
16 | import settings # Assumed to be in the same directory.
|
---|
17 | except ImportError:
|
---|
18 | import sys
|
---|
19 | sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
|
---|
20 | sys.exit(1)
|
---|
21 |
|
---|
22 | if __name__ == "__main__":
|
---|
23 | execute_manager(settings)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.