summaryrefslogtreecommitdiff
path: root/scipy
diff options
context:
space:
mode:
authorJayaram R Pai2014-09-10 14:57:59 +0530
committerJayaram R Pai2014-09-10 14:57:59 +0530
commitf5d42c76e60d095c9f6362d206cf256de2c8ecb7 (patch)
tree025766970199be6b5cea4e74065d007c8fed9895 /scipy
downloadscipy2014-f5d42c76e60d095c9f6362d206cf256de2c8ecb7.tar.gz
scipy2014-f5d42c76e60d095c9f6362d206cf256de2c8ecb7.tar.bz2
scipy2014-f5d42c76e60d095c9f6362d206cf256de2c8ecb7.zip
initial commit
Diffstat (limited to 'scipy')
-rw-r--r--scipy/__init__.py0
-rw-r--r--scipy/settings.py89
-rw-r--r--scipy/urls.py7
-rw-r--r--scipy/views.py6
-rw-r--r--scipy/wsgi.py14
5 files changed, 116 insertions, 0 deletions
diff --git a/scipy/__init__.py b/scipy/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/scipy/__init__.py
diff --git a/scipy/settings.py b/scipy/settings.py
new file mode 100644
index 0000000..353fa4f
--- /dev/null
+++ b/scipy/settings.py
@@ -0,0 +1,89 @@
+"""
+Django settings for scipy project.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.7/topics/settings/
+
+For the full list of settings and their values, see
+https://docs.djangoproject.com/en/1.7/ref/settings/
+"""
+
+# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
+import os
+from config import *
+
+BASE_DIR = os.path.dirname(os.path.dirname(__file__))
+
+# Quick-start development settings - unsuitable for production
+# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
+
+# SECURITY WARNING: don't run with debug turned on in production!
+DEBUG = True
+
+TEMPLATE_DEBUG = True
+
+ALLOWED_HOSTS = []
+
+
+# Application definition
+
+INSTALLED_APPS = (
+ 'django.contrib.admin',
+ 'django.contrib.auth',
+ 'django.contrib.contenttypes',
+ 'django.contrib.sessions',
+ 'django.contrib.messages',
+ 'django.contrib.staticfiles',
+ 'website',
+)
+
+MIDDLEWARE_CLASSES = (
+ 'django.contrib.sessions.middleware.SessionMiddleware',
+ 'django.middleware.common.CommonMiddleware',
+ 'django.middleware.csrf.CsrfViewMiddleware',
+ 'django.contrib.auth.middleware.AuthenticationMiddleware',
+ 'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
+ 'django.contrib.messages.middleware.MessageMiddleware',
+ 'django.middleware.clickjacking.XFrameOptionsMiddleware',
+)
+
+ROOT_URLCONF = 'scipy.urls'
+
+WSGI_APPLICATION = 'scipy.wsgi.application'
+
+# Database
+# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
+
+DATABASES = {
+ 'default': {
+ 'ENGINE': 'django.db.backends.mysql',
+ 'NAME': DB_NAME,
+ 'USER': DB_USER,
+ 'PASSWORD': DB_PASS
+ }
+}
+
+# Internationalization
+# https://docs.djangoproject.com/en/1.7/topics/i18n/
+
+LANGUAGE_CODE = 'en-us'
+
+TIME_ZONE = 'Asia/Kolkata'
+
+USE_I18N = True
+
+USE_L10N = True
+
+USE_TZ = True
+
+
+# Static files (CSS, JavaScript, Images)
+# https://docs.djangoproject.com/en/1.7/howto/static-files/
+
+STATIC_URL = '/static/'
+STATICFILES_DIRS = (
+ os.path.join(BASE_DIR, 'static'),
+)
+TEMPLATE_DIRS = (
+ os.path.join(BASE_DIR, 'static'),
+)
diff --git a/scipy/urls.py b/scipy/urls.py
new file mode 100644
index 0000000..ff46bce
--- /dev/null
+++ b/scipy/urls.py
@@ -0,0 +1,7 @@
+from django.conf.urls import patterns, include, url
+from django.contrib import admin
+
+urlpatterns = patterns('',
+ url(r'^', include('website.urls', namespace='website')),
+ url(r'^admin/', include(admin.site.urls)),
+)
diff --git a/scipy/views.py b/scipy/views.py
new file mode 100644
index 0000000..9387ea1
--- /dev/null
+++ b/scipy/views.py
@@ -0,0 +1,6 @@
+from django.http import HttpResponse, HttpResponseRedirect
+from django.core.context_processors import csrf
+from django.shortcuts import render
+from django.contrib.auth.models import User
+from django.contrib.auth import authenticate, login, logout
+from django.contrib.auth.decorators import login_required
diff --git a/scipy/wsgi.py b/scipy/wsgi.py
new file mode 100644
index 0000000..c70ddd1
--- /dev/null
+++ b/scipy/wsgi.py
@@ -0,0 +1,14 @@
+"""
+WSGI config for scipy project.
+
+It exposes the WSGI callable as a module-level variable named ``application``.
+
+For more information on this file, see
+https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
+"""
+
+import os
+os.environ.setdefault("DJANGO_SETTINGS_MODULE", "scipy.settings")
+
+from django.core.wsgi import get_wsgi_application
+application = get_wsgi_application()