From 0a3c0e1e5043bc9ea6b3fe45be0ce89e6c8bd7bb Mon Sep 17 00:00:00 2001
From: Ruslan Ignatov
Date: Mon, 11 Jul 2022 17:08:47 +0300
Subject: [PATCH] Added main page. Added links page
---
dnd_db_site/settings.py | 4 +-
dnd_db_site/urls.py | 4 +-
faerun_calendar/.views.py.swp | Bin 12288 -> 0 bytes
.../templates/faerun_calendar/index.html | 24 +-
faerun_calendar/views.py | 3 +-
links/__init__.py | 0
links/admin.py | 3 +
links/apps.py | 6 +
links/migrations/__init__.py | 0
links/models.py | 3 +
links/templates/links/index.html | 18 +
links/tests.py | 3 +
links/urls.py | 8 +
links/views.py | 5 +
main/__init__.py | 0
main/admin.py | 3 +
main/apps.py | 6 +
main/migrations/__init__.py | 0
main/models.py | 3 +
main/static/main/css/main.css | 33 ++
main/templates/main/index.html | 11 +
main/templates/main/pagetemplate.html | 30 ++
main/tests.py | 3 +
main/urls.py | 8 +
main/views.py | 5 +
static/iconbig.png | Bin 0 -> 25800 bytes
static/iconsmall.png | Bin 0 -> 2090 bytes
static/ookona.html | 339 ++++++++++++++++++
28 files changed, 504 insertions(+), 18 deletions(-)
delete mode 100644 faerun_calendar/.views.py.swp
create mode 100644 links/__init__.py
create mode 100644 links/admin.py
create mode 100644 links/apps.py
create mode 100644 links/migrations/__init__.py
create mode 100644 links/models.py
create mode 100644 links/templates/links/index.html
create mode 100644 links/tests.py
create mode 100644 links/urls.py
create mode 100644 links/views.py
create mode 100644 main/__init__.py
create mode 100644 main/admin.py
create mode 100644 main/apps.py
create mode 100644 main/migrations/__init__.py
create mode 100644 main/models.py
create mode 100644 main/static/main/css/main.css
create mode 100644 main/templates/main/index.html
create mode 100644 main/templates/main/pagetemplate.html
create mode 100644 main/tests.py
create mode 100644 main/urls.py
create mode 100644 main/views.py
create mode 100644 static/iconbig.png
create mode 100644 static/iconsmall.png
create mode 100644 static/ookona.html
diff --git a/dnd_db_site/settings.py b/dnd_db_site/settings.py
index 9f0b8f2..dd702d0 100644
--- a/dnd_db_site/settings.py
+++ b/dnd_db_site/settings.py
@@ -33,6 +33,8 @@ ALLOWED_HOSTS = [env('HOST_1')]
# Application definition
INSTALLED_APPS = [
+ 'main',
+ 'links',
'faerun_calendar',
'django.contrib.admin',
'django.contrib.auth',
@@ -106,7 +108,7 @@ AUTH_PASSWORD_VALIDATORS = [
# Internationalization
# https://docs.djangoproject.com/en/4.0/topics/i18n/
-LANGUAGE_CODE = 'en-us'
+LANGUAGE_CODE = 'ru-ru'
TIME_ZONE = 'UTC'
diff --git a/dnd_db_site/urls.py b/dnd_db_site/urls.py
index 5804ac6..cff4e56 100644
--- a/dnd_db_site/urls.py
+++ b/dnd_db_site/urls.py
@@ -20,5 +20,7 @@ from django.conf.urls.static import static
urlpatterns = [
path('admin/', admin.site.urls),
- path('', include('faerun_calendar.urls')),
+ path('', include('main.urls')),
+ path('calendar/', include('faerun_calendar.urls')),
+ path('links/', include('links.urls')),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
diff --git a/faerun_calendar/.views.py.swp b/faerun_calendar/.views.py.swp
deleted file mode 100644
index 6d2178af91c7a1bc7cdab47bc9831dceeed7b8d3..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 12288
zcmYc?2=nw+u+TGNU|?VnU|`U^wJYfqPYVOf69$H&(&C)NJdgx_3{j`+VQg;TtLqYM
z?14jh9YmpiKv8~HYH~@jzI$egM`@CNN?wX?N|J7IW=X1kT4HKZX
+{% extends 'main/pagetemplate.html' %}
-{% load static %}
+{% block pagetitle %}
+Календарь
+{% endblock %}
-
-
-
- Calendar
+{% block content %}
+
+
Календарь
+ {% include 'faerun_calendar/calendar.html' %}
+
+{% endblock %}
-
-
-
-
- Календарь
- {% include 'faerun_calendar/calendar.html' %}
-
-
diff --git a/faerun_calendar/views.py b/faerun_calendar/views.py
index fe52267..7436291 100644
--- a/faerun_calendar/views.py
+++ b/faerun_calendar/views.py
@@ -1,7 +1,6 @@
-from django.http import HttpResponse
from django.shortcuts import render
+
def index(request):
return render(request, 'faerun_calendar/index.html')
-# return HttpResponse('Calendar
')
diff --git a/links/__init__.py b/links/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/links/admin.py b/links/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/links/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/links/apps.py b/links/apps.py
new file mode 100644
index 0000000..a36c5c7
--- /dev/null
+++ b/links/apps.py
@@ -0,0 +1,6 @@
+from django.apps import AppConfig
+
+
+class LinksConfig(AppConfig):
+ default_auto_field = 'django.db.models.BigAutoField'
+ name = 'links'
diff --git a/links/migrations/__init__.py b/links/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/links/models.py b/links/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/links/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/links/templates/links/index.html b/links/templates/links/index.html
new file mode 100644
index 0000000..ef666f7
--- /dev/null
+++ b/links/templates/links/index.html
@@ -0,0 +1,18 @@
+{% extends 'main/pagetemplate.html' %}
+
+{% block pagetitle %}
+Полезные ссылки
+{% endblock %}
+
+{% block content %}
+
+{% endblock %}
+
diff --git a/links/tests.py b/links/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/links/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/links/urls.py b/links/urls.py
new file mode 100644
index 0000000..4c9189f
--- /dev/null
+++ b/links/urls.py
@@ -0,0 +1,8 @@
+from django.urls import path
+
+from . import views
+
+urlpatterns = [
+ path('', views.index, name='index'),
+]
+
diff --git a/links/views.py b/links/views.py
new file mode 100644
index 0000000..3ae5791
--- /dev/null
+++ b/links/views.py
@@ -0,0 +1,5 @@
+from django.shortcuts import render
+
+
+def index(request):
+ return render(request, 'links/index.html')
\ No newline at end of file
diff --git a/main/__init__.py b/main/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/main/admin.py b/main/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/main/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/main/apps.py b/main/apps.py
new file mode 100644
index 0000000..167f044
--- /dev/null
+++ b/main/apps.py
@@ -0,0 +1,6 @@
+from django.apps import AppConfig
+
+
+class MainConfig(AppConfig):
+ default_auto_field = 'django.db.models.BigAutoField'
+ name = 'main'
diff --git a/main/migrations/__init__.py b/main/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/main/models.py b/main/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/main/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/main/static/main/css/main.css b/main/static/main/css/main.css
new file mode 100644
index 0000000..eba2d47
--- /dev/null
+++ b/main/static/main/css/main.css
@@ -0,0 +1,33 @@
+aside.menu {
+ border: 3px solid black;
+ border-radius: 10px;
+ display: flex;
+ flex-direction: column;
+ padding: 15px;
+ margin: 25px;
+}
+
+aside.menu ul {
+ list-style-type: none;
+ margin: 0;
+ padding: 0;
+ display: flex;
+}
+
+aside.menu li {
+ display: flex;
+ margin: 10px;
+}
+
+aside.menu a {
+ border-radius: 10px;
+ text-decoration: none;
+ color: black;
+ font-weight: bold;
+ background: DeepSkyBlue;
+ padding: 10px;
+}
+
+aside.menu a:hover {
+ background: DodgerBlue;
+}
\ No newline at end of file
diff --git a/main/templates/main/index.html b/main/templates/main/index.html
new file mode 100644
index 0000000..41d1717
--- /dev/null
+++ b/main/templates/main/index.html
@@ -0,0 +1,11 @@
+{% extends 'main/pagetemplate.html' %}
+
+{% block pagetitle %}
+Главная страница
+{% endblock %}
+
+{% block content %}
+
+
Главная страница
+
+{% endblock %}
\ No newline at end of file
diff --git a/main/templates/main/pagetemplate.html b/main/templates/main/pagetemplate.html
new file mode 100644
index 0000000..583dde0
--- /dev/null
+++ b/main/templates/main/pagetemplate.html
@@ -0,0 +1,30 @@
+
+
+{% load static %}
+
+
+
+
+ {% block pagetitle %}{% endblock %}
+
+
+
+
+
+
+
+
+
+
+
+ {% block content %}
+ {% endblock %}
+
+
\ No newline at end of file
diff --git a/main/tests.py b/main/tests.py
new file mode 100644
index 0000000..7ce503c
--- /dev/null
+++ b/main/tests.py
@@ -0,0 +1,3 @@
+from django.test import TestCase
+
+# Create your tests here.
diff --git a/main/urls.py b/main/urls.py
new file mode 100644
index 0000000..4c9189f
--- /dev/null
+++ b/main/urls.py
@@ -0,0 +1,8 @@
+from django.urls import path
+
+from . import views
+
+urlpatterns = [
+ path('', views.index, name='index'),
+]
+
diff --git a/main/views.py b/main/views.py
new file mode 100644
index 0000000..29a00de
--- /dev/null
+++ b/main/views.py
@@ -0,0 +1,5 @@
+from django.shortcuts import render
+
+
+def index(request):
+ return render(request, 'main/index.html')
diff --git a/static/iconbig.png b/static/iconbig.png
new file mode 100644
index 0000000000000000000000000000000000000000..6759c51bc1742398cbd080bbadeac9d23223a662
GIT binary patch
literal 25800
zcmeAS@N?(olHy`uVBq!ia0y~yU^oE69Bd2>3_*8t*cliY*pj^6T^Rm@;DWu&Co?cG
za29w(7Bet#3xhBt!>l
+
+
+
+
+
+
+ Осталось (осн/доп): /
+
+
+
+
+
+
+
+
+