From 89394466360acd101fdd5b841003bd030778b063 Mon Sep 17 00:00:00 2001 From: Ruslan Ignatov Date: Tue, 28 Jun 2022 16:54:43 +0300 Subject: [PATCH] First version of calendar --- .gitignore | 2 + dnd_db_site/settings.py | 2 + dnd_db_site/urls.py | 1 + faerun_calendar/.views.py.swp | Bin 0 -> 12288 bytes faerun_calendar/__init__.py | 0 faerun_calendar/admin.py | 3 ++ faerun_calendar/apps.py | 6 +++ faerun_calendar/migrations/__init__.py | 0 faerun_calendar/models.py | 3 ++ .../templates/faerun_calendar/calendar.html | 22 ++++++++ .../templates/faerun_calendar/index.html | 23 +++++++++ .../templates/faerun_calendar/month.html | 48 ++++++++++++++++++ faerun_calendar/tests.py | 3 ++ faerun_calendar/urls.py | 8 +++ faerun_calendar/views.py | 7 +++ 15 files changed, 128 insertions(+) create mode 100644 faerun_calendar/.views.py.swp create mode 100644 faerun_calendar/__init__.py create mode 100644 faerun_calendar/admin.py create mode 100644 faerun_calendar/apps.py create mode 100644 faerun_calendar/migrations/__init__.py create mode 100644 faerun_calendar/models.py create mode 100644 faerun_calendar/templates/faerun_calendar/calendar.html create mode 100644 faerun_calendar/templates/faerun_calendar/index.html create mode 100644 faerun_calendar/templates/faerun_calendar/month.html create mode 100644 faerun_calendar/tests.py create mode 100644 faerun_calendar/urls.py create mode 100644 faerun_calendar/views.py diff --git a/.gitignore b/.gitignore index b6e4761..b97131e 100644 --- a/.gitignore +++ b/.gitignore @@ -127,3 +127,5 @@ dmypy.json # Pyre type checker .pyre/ + +.idea/ diff --git a/dnd_db_site/settings.py b/dnd_db_site/settings.py index ced426e..137d9c9 100644 --- a/dnd_db_site/settings.py +++ b/dnd_db_site/settings.py @@ -32,6 +32,8 @@ ALLOWED_HOSTS = [env('HOST_1')] # Application definition INSTALLED_APPS = [ + 'helloworld', + 'faerun_calendar', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', diff --git a/dnd_db_site/urls.py b/dnd_db_site/urls.py index b32ea59..562e786 100644 --- a/dnd_db_site/urls.py +++ b/dnd_db_site/urls.py @@ -19,4 +19,5 @@ from django.urls import include, path urlpatterns = [ path('admin/', admin.site.urls), path('', include('helloworld.urls')), + path('calendar/', include('faerun_calendar.urls')), ] diff --git a/faerun_calendar/.views.py.swp b/faerun_calendar/.views.py.swp new file mode 100644 index 0000000000000000000000000000000000000000..6d2178af91c7a1bc7cdab47bc9831dceeed7b8d3 GIT binary patch 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 + + + + Calendar + + + +

Календарь

+ {% extends 'faerun_calendar/calendar.html' %} + + diff --git a/faerun_calendar/templates/faerun_calendar/month.html b/faerun_calendar/templates/faerun_calendar/month.html new file mode 100644 index 0000000..39ac52f --- /dev/null +++ b/faerun_calendar/templates/faerun_calendar/month.html @@ -0,0 +1,48 @@ + + + + + {% if subtitle %} + + + + {% endif %} + {% if oneday != 1 %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% endif %} +
{{title}}
{{subtitle}}
12345678910
11121314151617181920
21222324252627282930
\ No newline at end of file diff --git a/faerun_calendar/tests.py b/faerun_calendar/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/faerun_calendar/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/faerun_calendar/urls.py b/faerun_calendar/urls.py new file mode 100644 index 0000000..4c9189f --- /dev/null +++ b/faerun_calendar/urls.py @@ -0,0 +1,8 @@ +from django.urls import path + +from . import views + +urlpatterns = [ + path('', views.index, name='index'), +] + diff --git a/faerun_calendar/views.py b/faerun_calendar/views.py new file mode 100644 index 0000000..fe52267 --- /dev/null +++ b/faerun_calendar/views.py @@ -0,0 +1,7 @@ +from django.http import HttpResponse +from django.shortcuts import render + +def index(request): + return render(request, 'faerun_calendar/index.html') +# return HttpResponse('

Calendar

') +