diff --git a/smash/smash/settings.py b/smash/smash/settings.py index f9736f16822ff8cb04c50d61f3884aa152969043..327f508e03bc334bc955e51e848e9a813f63865f 100644 --- a/smash/smash/settings.py +++ b/smash/smash/settings.py @@ -62,34 +62,6 @@ TEMPLATES = [ }, ] - -# SECURITY WARNING: keep the secret key used in production secret! -SECRET_KEY = '@u6t&w7yw&i!dcrm97y1bg*pt9e@s240dc@*b6d9_#b^bqr%+^' - -# SECURITY WARNING: don't run with debug turned on in production! -DEBUG = True - -WSGI_APPLICATION = 'smash.wsgi.application' - - -# Database -# https://docs.djangoproject.com/en/1.10/ref/settings/#databases - -DATABASES = { - 'default': { - 'ENGINE': 'django.db.backends.postgresql_psycopg2', - 'NAME': 'smashdb', - 'PASSWORD': '---', - 'HOST': 'localhost', - 'PORT': '' # '' === default one - - # If to use sqlite - # 'ENGINE': 'django.db.backends.sqlite3', - # 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), - } -} - - # Password validation # https://docs.djangoproject.com/en/1.10/ref/settings/#auth-password-validators diff --git a/smash/smash/urls.py b/smash/smash/urls.py index c2a2104dd5bf1c95c7a1e72646dd03a8e05b9019..b26bd97983ee12f2c3ad28feebf6233562b0b7d1 100644 --- a/smash/smash/urls.py +++ b/smash/smash/urls.py @@ -13,9 +13,13 @@ Including another URLconf 1. Import the include() function: from django.conf.urls import url, include 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ -from django.conf.urls import url + +from django.conf.urls import url, include from django.contrib import admin +import web.urls + urlpatterns = [ url(r'^admin/', admin.site.urls), + url(r'^', include(web.urls)) ] diff --git a/smash/web/static/.touch b/smash/web/static/.touch new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/smash/web/templates/_base.html b/smash/web/templates/_base.html new file mode 100644 index 0000000000000000000000000000000000000000..b74483297e49bc79e14c79be8e3ac6f3b4b66628 --- /dev/null +++ b/smash/web/templates/_base.html @@ -0,0 +1,25 @@ +{% load static %} +<!DOCTYPE html> +<html lang="en"> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0"/> + <title>{% block title %}Scheduling system{% endblock title %}</title> + + {% block styles %} + <!-- links rel=stylesheet here --> + {% endblock styles %} +</head> +<body> + {% block content %} + {% endblock content %} + + + {% block footer %} + {% endblock footer %} + + {% block scripts %} + <script src="https://code.jquery.com/jquery-2.1.1.min.js"></script> + {% endblock scripts %} +</body> +</html> diff --git a/smash/web/templates/index.html b/smash/web/templates/index.html new file mode 100644 index 0000000000000000000000000000000000000000..5e1abb2c293f5bc782df2790a184b87c706aa822 --- /dev/null +++ b/smash/web/templates/index.html @@ -0,0 +1,5 @@ +{% extends "_base.html" %} + +{% block content %} + <h3>Smart scheduling</h3> +{% endblock content %} diff --git a/smash/web/urls.py b/smash/web/urls.py new file mode 100644 index 0000000000000000000000000000000000000000..becbb07eda072b4cb8e5d508475357afa7b40a19 --- /dev/null +++ b/smash/web/urls.py @@ -0,0 +1,21 @@ +"""smash URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.10/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Import the include() function: from django.conf.urls import url, include + 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) +""" +from django.conf.urls import url +from web import views + +urlpatterns = [ + url(r'$', views.index) +] diff --git a/smash/web/views.py b/smash/web/views.py index 91ea44a218fbd2f408430959283f0419c921093e..273719061e710e477453edb0f24f39f1f7861bac 100644 --- a/smash/web/views.py +++ b/smash/web/views.py @@ -1,3 +1,10 @@ from django.shortcuts import render +from django.http import HttpResponse +from django.template import loader + # Create your views here. +def index(request): + template = loader.get_template("index.html") + return HttpResponse(template.render({}), request) +