Basic functional website
This commit is contained in:
parent
4a31327d3b
commit
4b07eb4b36
5 changed files with 68 additions and 0 deletions
5
base_app/templates/index.html
Normal file
5
base_app/templates/index.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{% extends "layout.html" %}
|
||||
|
||||
{% block content %}
|
||||
hello
|
||||
{% endblock %}
|
48
base_app/templates/layout.html
Normal file
48
base_app/templates/layout.html
Normal file
|
@ -0,0 +1,48 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{% load static %}
|
||||
|
||||
<title>{{ title }}</title>
|
||||
<link rel="icon" type="image/png" href="">
|
||||
|
||||
<!-- REQUIRED META TAGS -->
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
||||
<!-- CSS -->
|
||||
<link rel="stylesheet" href="{% static "base_app/css/master.css" %}">
|
||||
|
||||
{% block headerExtension %}
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="navbar">
|
||||
<div class="navbar-block">
|
||||
HOME
|
||||
</div>
|
||||
<div class="navbar-block">
|
||||
DOPRDELE
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="page">
|
||||
<!-- NAVBAR -->
|
||||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
<!-- FOOTER -->
|
||||
<footer class="ftr">
|
||||
<div id="contactHeader">
|
||||
<h3>Marcel Plch</h3>
|
||||
</div>
|
||||
<div class="contactBlockWrapper">
|
||||
<div class="contactBlock">
|
||||
<h4>Lorem ipsum</h4>
|
||||
</div>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,3 +1,12 @@
|
|||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
||||
from django.shortcuts import render, redirect
|
||||
from django.views.generic import TemplateView, FormView
|
||||
|
||||
class IndexView(TemplateView):
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
return render(request, "index.html", {})
|
||||
|
||||
|
||||
|
|
|
@ -37,6 +37,7 @@ INSTALLED_APPS = [
|
|||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'base_app',
|
||||
]
|
||||
|
||||
MIDDLEWARE = [
|
||||
|
@ -118,3 +119,6 @@ USE_TZ = True
|
|||
# https://docs.djangoproject.com/en/3.0/howto/static-files/
|
||||
|
||||
STATIC_URL = '/static/'
|
||||
MEDIA_URL = "/media/"
|
||||
STATIC_ROOT = os.path.join(BASE_DIR, "static/")
|
||||
MEDIA_ROOT = os.path.join(BASE_DIR, "media/")
|
||||
|
|
|
@ -15,7 +15,9 @@ Including another URLconf
|
|||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from base_app.views import IndexView
|
||||
|
||||
urlpatterns = [
|
||||
path('admin/', admin.site.urls),
|
||||
path('', IndexView.as_view()),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue