Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python_django_2025
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
python_django_2025
Commits
e7fd5793
Commit
e7fd5793
authored
May 15, 2025
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kalkulator - wersja robocza
parent
5907a8ce
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
kalkulator.html
aplikacja/templates/kalkulator.html
+29
-0
views.py
aplikacja/views.py
+7
-0
urls.py
webowy/urls.py
+1
-0
No files found.
aplikacja/templates/kalkulator.html
0 → 100644
View file @
e7fd5793
<!DOCTYPE html>
<html
lang=
"pl"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Kalkulator
</title>
</head>
<body>
<h1>
Kalkulator ze szkolenia
</h1>
<p>
Podaj dwie liczby i wybierz działanie:
</p>
<form>
<input
type=
"number"
name=
"arg1"
>
<select
name=
"operacja"
>
<option
value=
"+"
>
+
</option>
<option
value=
"-"
>
-
</option>
<option
value=
"*"
>
*
</option>
<option
value=
"/"
>
/
</option>
<option
value=
"^"
>
^
</option>
</select>
<input
type=
"number"
name=
"arg2"
><br>
<button>
Oblicz
</button>
</form>
<div
class=
"wynik"
>
{{wynik}}
</div>
</body>
</html>
aplikacja/views.py
View file @
e7fd5793
...
...
@@ -55,3 +55,9 @@ def rozmowa(request:HttpRequest) -> HttpResponse:
return
render
(
request
,
'rozmowa.html'
,
context
=
{
'message'
:
powitanie
})
def
kalkulator
(
request
:
HttpRequest
)
->
HttpResponse
:
wynik
=
1313
return
render
(
request
,
'kalkulator.html'
,
context
=
{
'wynik'
:
wynik
})
\ No newline at end of file
webowy/urls.py
View file @
e7fd5793
...
...
@@ -28,4 +28,5 @@ urlpatterns = [
path
(
"czas_html"
,
czas_html
),
path
(
"czas_szablon"
,
czas_szablon
),
path
(
"rozmowa"
,
rozmowa
),
path
(
"kalkulator"
,
kalkulator
),
]
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