From 75f75e986da6f40ee0d1c517412478291994dcd8 Mon Sep 17 00:00:00 2001 From: sanj Date: Sun, 24 Oct 2010 16:28:13 +0200 Subject: [PATCH] added init data json --- rizk/rizk241010.json | 1 + wsgi/django.wsgi | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 rizk/rizk241010.json create mode 100644 wsgi/django.wsgi diff --git a/rizk/rizk241010.json b/rizk/rizk241010.json new file mode 100644 index 0000000..4c241f1 --- /dev/null +++ b/rizk/rizk241010.json @@ -0,0 +1 @@ +[{"pk": 1, "model": "egypt.location", "fields": {"txt": "", "name": "test", "point": "POINT (20.2148437471857001 -3.4256915239417398)"}}, {"pk": 2, "model": "egypt.location", "fields": {"txt": "", "name": "mahalla", "point": "POINT (31.1719036058902006 30.9636998440801001)"}}, {"pk": 1, "model": "egypt.event", "fields": {"start_time": "2010-10-24", "end_time": "2010-10-24", "name": "test event", "description": ""}}] \ No newline at end of file diff --git a/wsgi/django.wsgi b/wsgi/django.wsgi new file mode 100644 index 0000000..ecd30f5 --- /dev/null +++ b/wsgi/django.wsgi @@ -0,0 +1,27 @@ +# django.wsgi for vurbanism +import os +import sys +import site + +project_module = 'vurbanism' + +root_dir = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) + +#using virtualenv's activate_this.py to reorder sys.path +activate_this = os.path.join(root_dir, 'bin', 'activate_this.py') +execfile(activate_this, dict(__file__=activate_this)) + +sys.path.append(root_dir) +sys.path.append(os.path.join(root_dir, project_module)) + +#reload if this django.wsgi gets touched +from oxdjango import monitor +monitor.start(interval=1.0) +sys.stdout = sys.stderr +monitor.track(os.path.abspath(os.path.dirname(__file__))) + +os.environ['DJANGO_SETTINGS_MODULE'] = project_module + '.settings' + +import django.core.handlers.wsgi + +application = django.core.handlers.wsgi.WSGIHandler()