Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kurs_alx_pcz
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
kurs_alx_pcz
Commits
b657d2f4
Commit
b657d2f4
authored
Dec 12, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spis treści
parent
ce2ca192
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
index.html
mojprojekt/aplikacja/templates/index.html
+26
-0
views.py
mojprojekt/aplikacja/views.py
+4
-0
urls.py
mojprojekt/mojprojekt/urls.py
+1
-0
No files found.
mojprojekt/aplikacja/templates/index.html
0 → 100644
View file @
b657d2f4
<!DOCTYPE html>
<html
lang=
"pl"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Spis treści
</title>
</head>
<body>
<h1>
Aplikacja Django – spis treści
</h1>
<ul>
<li><a
href=
"/"
>
strona główna
</a></li>
<li><a
href=
"/hello"
>
Hello
</a></li>
<li><a
href=
"/czas.txt"
>
czas tekstowo
</a></li>
<li><a
href=
"/czas.html"
>
czas HTML
</a>
- treść w funkcji
</li>
<li><a
href=
"/czas_szablon"
>
czas szablon
</a></li>
<li><a
href=
"/rozmowa"
>
rozmowa
</a></li>
<li><a
href=
"/kalkulator_get"
>
kalkulator
</a>
jako przykład formularza
</li>
<li><a
href=
"/kalkulator_post"
>
kalkulator POST
</a></li>
<li><a
href=
"/sklep/produkty.txt"
>
lista towarów TXT
</a></li>
<li><a
href=
"/sklep/produkty.html"
>
lista towarów HTML
</a></li>
<li><a
href=
"/admin"
>
ADMIN
</a></li>
</ul>
</body>
</html>
\ No newline at end of file
mojprojekt/aplikacja/views.py
View file @
b657d2f4
...
@@ -31,3 +31,7 @@ def czas_szablon(request:HttpRequest) -> HttpResponse:
...
@@ -31,3 +31,7 @@ def czas_szablon(request:HttpRequest) -> HttpResponse:
template_name
=
'szablon_dla_czasu.html'
,
template_name
=
'szablon_dla_czasu.html'
,
context
=
{
'godz'
:
godzina
})
context
=
{
'godz'
:
godzina
})
def
index
(
request
:
HttpRequest
)
->
HttpResponse
:
return
render
(
request
=
request
,
template_name
=
'index.html'
)
mojprojekt/mojprojekt/urls.py
View file @
b657d2f4
...
@@ -20,6 +20,7 @@ from aplikacja.views import *
...
@@ -20,6 +20,7 @@ from aplikacja.views import *
urlpatterns
=
[
urlpatterns
=
[
path
(
"admin/"
,
admin
.
site
.
urls
),
path
(
"admin/"
,
admin
.
site
.
urls
),
path
(
""
,
index
),
path
(
"hello"
,
hello
),
path
(
"hello"
,
hello
),
path
(
"czas.txt"
,
czas_txt
),
path
(
"czas.txt"
,
czas_txt
),
path
(
"czas.html"
,
czas_html
),
path
(
"czas.html"
,
czas_html
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment