Create main WebHob project
PATCH 1/1 Create main WebHob project
This commit creates a basic Django project where the WebHob code will live.
--- bitbake/lib/webhob/manage.py | 10 +++ bitbake/lib/webhob/webhob/__init__.py | 0 bitbake/lib/webhob/webhob/settings.py | 156 ++++++++++++++++++++++++++++++++++ bitbake/lib/webhob/webhob/urls.py | 17 ++++ bitbake/lib/webhob/webhob/wsgi.py | 32 +++++++ 5 files changed, 215 insertions(+) create mode 100755 bitbake/lib/webhob/manage.py create mode 100644 bitbake/lib/webhob/webhob/__init__.py create mode 100644 bitbake/lib/webhob/webhob/settings.py create mode 100644 bitbake/lib/webhob/webhob/urls.py create mode 100644 bitbake/lib/webhob/webhob/wsgi.py
bitbake/lib/webhob/manage.py new file +10 -0
@@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webhob.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv)
bitbake/lib/webhob/webhob/__init__.py new file +0 -0
bitbake/lib/webhob/webhob/settings.py new file +156 -0
156 lines not on this page · raw message
bitbake/lib/webhob/webhob/urls.py new file +17 -0
@@ -0,0 +1,17 @@ +from django.conf.urls import patterns, include, url + +# Uncomment the next two lines to enable the admin: +# from django.contrib import admin +# admin.autodiscover() + +urlpatterns = patterns('', + # Examples: + # url(r'^$', 'webhob.views.home', name='home'), + # url(r'^webhob/', include('webhob.foo.urls')), + + # Uncomment the admin/doc line below to enable admin documentation: + # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), + + # Uncomment the next line to enable the admin: + # url(r'^admin/', include(admin.site.urls)), +)
bitbake/lib/webhob/webhob/wsgi.py new file +32 -0
@@ -0,0 +1,32 @@ +""" +WSGI config for webhob project. + +This module contains the WSGI application used by Django's development server +and any production WSGI deployments. It should expose a module-level variable +named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover +this application via the ``WSGI_APPLICATION`` setting. + +Usually you will have the standard Django WSGI application here, but it also +might make sense to replace the whole Django WSGI application with a custom one +that later delegates to the Django one. For example, you could introduce WSGI +middleware here, or combine a Django application with an application of another +framework. + +""" +import os + +# We defer to a DJANGO_SETTINGS_MODULE already in the environment. This breaks +# if running multiple sites in the same mod_wsgi process. To fix this, use +# mod_wsgi daemon mode with each site in its own daemon process, or use +# os.environ["DJANGO_SETTINGS_MODULE"] = "webhob.settings" +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "webhob.settings") + +# This application object is used by any WSGI server configured to use this +# file. This includes Django's development server, if the WSGI_APPLICATION +# setting points here. +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application() + +# Apply WSGI middleware here. +# from helloworld.wsgi import HelloWorldApplication +# application = HelloWorldApplication(application)
Signature · 1 line
1.8.1.2