From 3cd34c0169c08dacaa3e088ae5d3154b80982138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20=C5=A0krab=C3=A1nek?= Date: Fri, 24 Sep 2021 09:39:09 +0200 Subject: [PATCH] foo --- foo/__init__.py | 0 foo/admin.py | 3 +++ foo/apps.py | 6 ++++++ foo/migrations/__init__.py | 0 foo/models.py | 3 +++ foo/templates/foo/index.html | 3 +++ foo/templates/foo/page.html | 3 +++ foo/tests.py | 3 +++ foo/views.py | 8 ++++++++ pokus/settings.py | 5 +++-- pokus/urls.py | 4 ++++ 11 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 foo/__init__.py create mode 100644 foo/admin.py create mode 100644 foo/apps.py create mode 100644 foo/migrations/__init__.py create mode 100644 foo/models.py create mode 100644 foo/templates/foo/index.html create mode 100644 foo/templates/foo/page.html create mode 100644 foo/tests.py create mode 100644 foo/views.py diff --git a/foo/__init__.py b/foo/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/foo/admin.py b/foo/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/foo/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/foo/apps.py b/foo/apps.py new file mode 100644 index 0000000..6e0ca3e --- /dev/null +++ b/foo/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class FooConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'foo' diff --git a/foo/migrations/__init__.py b/foo/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/foo/models.py b/foo/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/foo/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/foo/templates/foo/index.html b/foo/templates/foo/index.html new file mode 100644 index 0000000..00afc4c --- /dev/null +++ b/foo/templates/foo/index.html @@ -0,0 +1,3 @@ +

Scooby Doo

+ +odkaz page \ No newline at end of file diff --git a/foo/templates/foo/page.html b/foo/templates/foo/page.html new file mode 100644 index 0000000..1af3764 --- /dev/null +++ b/foo/templates/foo/page.html @@ -0,0 +1,3 @@ +

Shaggy

+ +odkaz index \ No newline at end of file diff --git a/foo/tests.py b/foo/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/foo/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/foo/views.py b/foo/views.py new file mode 100644 index 0000000..e55f78d --- /dev/null +++ b/foo/views.py @@ -0,0 +1,8 @@ +from django.shortcuts import render + +# Create your views here. +def foo_index(request): + return render(request, "foo/index.html") + +def foo_page(request): + return render(request, "foo/page.html") \ No newline at end of file diff --git a/pokus/settings.py b/pokus/settings.py index d648581..86823e4 100644 --- a/pokus/settings.py +++ b/pokus/settings.py @@ -37,6 +37,7 @@ INSTALLED_APPS = [ 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', + 'foo', ] MIDDLEWARE = [ @@ -103,9 +104,9 @@ AUTH_PASSWORD_VALIDATORS = [ # Internationalization # https://docs.djangoproject.com/en/3.2/topics/i18n/ -LANGUAGE_CODE = 'en-us' +LANGUAGE_CODE = 'cs' -TIME_ZONE = 'UTC' +TIME_ZONE = 'Europe/Prague' USE_I18N = True diff --git a/pokus/urls.py b/pokus/urls.py index 13d7873..86f9421 100644 --- a/pokus/urls.py +++ b/pokus/urls.py @@ -16,6 +16,10 @@ Including another URLconf from django.contrib import admin from django.urls import path +from foo.views import foo_index, foo_page + urlpatterns = [ path('admin/', admin.site.urls), + path('page/', foo_page), + path("", foo_index), ]