summaryrefslogtreecommitdiff
path: root/Scipy2018
diff options
context:
space:
mode:
authorprashantsinalkar2018-08-02 22:50:23 +0530
committerprashantsinalkar2018-08-02 22:50:23 +0530
commit0a4b8cc4c3df7521cda17b42cc78218ac4e1b38a (patch)
tree82b478ca6f7bc478cac5f4ce88d33af195445bc7 /Scipy2018
parent93672d14045bc03d5a8ff66edb45c416d1a426ec (diff)
downloadSciPy2018-0a4b8cc4c3df7521cda17b42cc78218ac4e1b38a.tar.gz
SciPy2018-0a4b8cc4c3df7521cda17b42cc78218ac4e1b38a.tar.bz2
SciPy2018-0a4b8cc4c3df7521cda17b42cc78218ac4e1b38a.zip
added app website
Diffstat (limited to 'Scipy2018')
-rw-r--r--Scipy2018/settings.py14
-rw-r--r--Scipy2018/urls.py3
2 files changed, 13 insertions, 4 deletions
diff --git a/Scipy2018/settings.py b/Scipy2018/settings.py
index 3437c61..cf5faf4 100644
--- a/Scipy2018/settings.py
+++ b/Scipy2018/settings.py
@@ -15,6 +15,7 @@ from Scipy2018.config import *
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+PROJECT_DIR = os.path.abspath(os.path.dirname(__file__) + '/../')
# Quick-start development settings - unsuitable for production
@@ -38,6 +39,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
+ 'website',
]
MIDDLEWARE = [
@@ -51,11 +53,11 @@ MIDDLEWARE = [
]
ROOT_URLCONF = 'Scipy2018.urls'
-
+ROOT_URL = 'http://127.0.0.1:8000'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
- 'DIRS': [],
+ 'DIRS': [PROJECT_DIR + '/static/website/templates',],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
@@ -63,6 +65,7 @@ TEMPLATES = [
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
+ "website.context_processors.root_url"
],
},
},
@@ -120,5 +123,10 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/2.1/howto/static-files/
-
STATIC_URL = '/static/'
+
+STATICFILES_DIRS = [
+ os.path.join(BASE_DIR, "static"),
+ '/../static/',
+]
+
diff --git a/Scipy2018/urls.py b/Scipy2018/urls.py
index a4370aa..291cf38 100644
--- a/Scipy2018/urls.py
+++ b/Scipy2018/urls.py
@@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
-from django.urls import path
+from django.urls import include, path
urlpatterns = [
+ path('', include('website.urls')),
path('admin/', admin.site.urls),
]