From 95d09b338ac7aed2b387bf143a5cfd1c4b29f612 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Tue, 15 Dec 2009 17:48:30 +0100 Subject: new Django webinterface(in development), small fixes --- module/web/manage.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 module/web/manage.py (limited to 'module/web/manage.py') diff --git a/module/web/manage.py b/module/web/manage.py new file mode 100644 index 000000000..ae9495854 --- /dev/null +++ b/module/web/manage.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python +from django.core.management import execute_manager + +try: + import settings # Assumed to be in the same directory. +except ImportError: + import sys + 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__) + sys.exit(1) + +if __name__ == "__main__": + execute_manager(settings) -- cgit v1.2.3 From 77ebea73401f00f9150299317bdddaa24beddd2a Mon Sep 17 00:00:00 2001 From: mkaay Date: Sun, 20 Dec 2009 23:22:46 +0100 Subject: file_list fix, webinterface termination fix AGAIN -.-' --- module/web/manage.py | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'module/web/manage.py') diff --git a/module/web/manage.py b/module/web/manage.py index ae9495854..782f6fbe0 100644 --- a/module/web/manage.py +++ b/module/web/manage.py @@ -1,12 +1,21 @@ #!/usr/bin/env python -from django.core.management import execute_manager -try: - import settings # Assumed to be in the same directory. -except ImportError: - import sys - 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__) - sys.exit(1) +import os -if __name__ == "__main__": - execute_manager(settings) +pid = os.fork() + +if pid: + with open("webserver.pid", "w") as f: + f.write(str(pid)) +else: + from django.core.management import execute_manager + + try: + import settings # Assumed to be in the same directory. + except ImportError: + import sys + 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__) + sys.exit(1) + + if __name__ == "__main__": + execute_manager(settings) -- cgit v1.2.3 From b22eaf5d8b1e472eaaebb176234843f38d97e102 Mon Sep 17 00:00:00 2001 From: mkaay Date: Sun, 20 Dec 2009 23:30:43 +0100 Subject: python 2.5 compatibility --- module/web/manage.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/web/manage.py') diff --git a/module/web/manage.py b/module/web/manage.py index 782f6fbe0..6a00ab565 100644 --- a/module/web/manage.py +++ b/module/web/manage.py @@ -1,9 +1,8 @@ #!/usr/bin/env python - +from __future__ import with_statement import os pid = os.fork() - if pid: with open("webserver.pid", "w") as f: f.write(str(pid)) -- cgit v1.2.3 From d56dcab5d48c8c4ec05f200f92bd35a1f977cd4f Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 6 Jan 2010 17:38:53 +0100 Subject: cli fix, webinterface db check --- module/web/manage.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 module/web/manage.py (limited to 'module/web/manage.py') diff --git a/module/web/manage.py b/module/web/manage.py old mode 100644 new mode 100755 -- cgit v1.2.3 From 3d655ddbfbd96abecb9a9c9bebf6e43eb710ab12 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sun, 10 Jan 2010 16:20:31 +0100 Subject: fixed manage.py, addBox working, some code formatted and cleaned --- module/web/manage.py | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) (limited to 'module/web/manage.py') diff --git a/module/web/manage.py b/module/web/manage.py index 6a00ab565..34b964ffc 100755 --- a/module/web/manage.py +++ b/module/web/manage.py @@ -1,20 +1,13 @@ #!/usr/bin/env python -from __future__ import with_statement -import os +# -*- coding: utf-8 -*- +from django.core.management import execute_manager -pid = os.fork() -if pid: - with open("webserver.pid", "w") as f: - f.write(str(pid)) -else: - from django.core.management import execute_manager +try: + import settings # Assumed to be in the same directory. +except ImportError: + import sys + 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__) + sys.exit(1) - try: - import settings # Assumed to be in the same directory. - except ImportError: - import sys - 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__) - sys.exit(1) - - if __name__ == "__main__": - execute_manager(settings) +if __name__ == "__main__": + execute_manager(settings) \ No newline at end of file -- cgit v1.2.3