瀏覽代碼

[core] Add wsgi.py script to simplify deployment to Apache

Erick Tryzelaar 11 年之前
父節點
當前提交
b2a78ae722
共有 1 個文件被更改,包括 24 次插入0 次删除
  1. 24 0
      desktop/core/src/desktop/wsgi.py

+ 24 - 0
desktop/core/src/desktop/wsgi.py

@@ -0,0 +1,24 @@
+# Licensed to Cloudera, Inc. under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  Cloudera, Inc. licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import os
+
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "desktop.settings")
+
+# This application object is used by the development server
+# as well as any WSGI server configured to use this file.
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()