Basic functional website

This commit is contained in:
Marcel Plch 2021-07-19 15:13:27 +02:00
parent 4a31327d3b
commit 4b07eb4b36
Signed by untrusted user who does not match committer: dormouse
GPG key ID: C731A783983CB9D9
5 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,5 @@
{% extends "layout.html" %}
{% block content %}
hello
{% endblock %}

View 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>

View file

@ -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", {})

View file

@ -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/")

View file

@ -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()),
]