diff --git a/jauns_projekts/jauns_projekts/urls.py b/jauns_projekts/jauns_projekts/urls.py
index cef3bfc..478a506 100644
--- a/jauns_projekts/jauns_projekts/urls.py
+++ b/jauns_projekts/jauns_projekts/urls.py
@@ -20,8 +20,6 @@ import uzdevumi.views
urlpatterns = [
path('admin/', admin.site.urls),
- path('show-hello', uzdevumi.views.show_hello),
- path('show-html', uzdevumi.views.show_html),
path('university', uzdevumi.views.form),
]
diff --git a/jauns_projekts/templates/hello.html b/jauns_projekts/templates/hello.html
deleted file mode 100644
index 2245177..0000000
--- a/jauns_projekts/templates/hello.html
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
- Title
-
-
- Current datetime: {{ dateadntime }}
-Current datetime: {{ dateadntime }}
-
-
-
\ No newline at end of file
diff --git a/jauns_projekts/uzdevumi/views.py b/jauns_projekts/uzdevumi/views.py
index 5b1a9b1..adb8876 100644
--- a/jauns_projekts/uzdevumi/views.py
+++ b/jauns_projekts/uzdevumi/views.py
@@ -1,47 +1,11 @@
from django.shortcuts import render
from django.http import HttpResponse
-from datetime import datetime
# Create your views here.
-def show_hello(request):
- return HttpResponse('Hello!')
-
-
-def show_html(request):
- context = {
- 'mainigais': 77,
- 'kautkascits': 'čau no konteksta!',
- 'a': sum([1, 5]),
- 'dateadntime': datetime.today()
- }
-
- return render(
- request,
- template_name='hello.html',
- context=context,
- )
-
-
-def show_name(request):
- # ja submit, tad metode POST
- if request.method == 'POST':
- # input nosaukums
- first_name = request.POST['first_name']
- last_name = request.POST['last_name']
-
- return HttpResponse(f'{first_name} {last_name}')
-
- # šis parādās pie metodes GET (kad ievadam /show-name)
- return render(
- request,
- template_name='form.html',
- )
def form(request):
- # ja submit, tad metode POST
if request.method == 'POST':
- # input nosaukums
fullname = request.POST['fullname']
mathematics = int(request.POST['mathematics'])
latvian_lng = int(request.POST['latvian_lng'])
@@ -51,7 +15,6 @@ def form(request):
else:
return HttpResponse(f'Hello, {fullname}! You can apply to our university. Your grades: Mathematics: {mathematics}, Latviesu vld: {latvian_lng}, Svesvaloda: {foreign_lng}')
- # šis parādās pie metodes GET (kad ievadam /show-name)
return render(
request,
template_name='form.html',