diff --git a/gawa/start/templates/start/index.html b/gawa/start/templates/start/index.html
index c001df7..9b23efc 100644
--- a/gawa/start/templates/start/index.html
+++ b/gawa/start/templates/start/index.html
@@ -4,10 +4,34 @@
{% block languagecode %}{{ LANGUAGE_CODE }}{% endblock languagecode %}
{% block title %}{% translate "cscherr.de" %} - {% translate "startpage" %}{% endblock title %}
{% block main %}
-
-
My First Bootstrap Page
-
Resize this responsive page to see the effect!
-
+
+
+
My First Bootstrap Page
+
Resize this responsive page to see the effect!
+
+
+
+ Column
+
+
+ Column
+
+
+
+
+ Column
+
+
+ Column
+
+
+
+
+ Column
+
+
+ Column
+
+
{% endblock main %}
diff --git a/gawa/start/templates/start/legalinfo.html b/gawa/start/templates/start/legalinfo.html
new file mode 100644
index 0000000..b81a0c8
--- /dev/null
+++ b/gawa/start/templates/start/legalinfo.html
@@ -0,0 +1,36 @@
+{% extends 'start/base.html' %}
+{% load i18n %}
+{% get_current_language as LANGUAGE_CODE %}
+{% block languagecode %}{{ LANGUAGE_CODE }}{% endblock languagecode %}
+{% block title %}{% translate "cscherr.de" %} - {% translate "startpage" %}{% endblock title %}
+{% block main %}
+
+
+
{% translate "Search for: " %}
+
+
+
+ Column
+
+
+ Column
+
+
+
+
+ Column
+
+
+ Column
+
+
+
+
+ Column
+
+
+ Column
+
+
+
+{% endblock main %}
diff --git a/gawa/start/templates/start/mainsearch_snippet.html b/gawa/start/templates/start/mainsearch_snippet.html
new file mode 100644
index 0000000..e69de29
diff --git a/gawa/start/templates/start/search.html b/gawa/start/templates/start/search.html
new file mode 100644
index 0000000..e25b09e
--- /dev/null
+++ b/gawa/start/templates/start/search.html
@@ -0,0 +1,36 @@
+{% extends 'start/base.html' %}
+{% load i18n %}
+{% get_current_language as LANGUAGE_CODE %}
+{% block languagecode %}{{ LANGUAGE_CODE }}{% endblock languagecode %}
+{% block title %}{% translate "cscherr.de" %} - {% translate "startpage" %}{% endblock title %}
+{% block main %}
+
+
+
{% translate "Search for:" %} {{ searchstr }}
+
+
+
+ Column
+
+
+ Column
+
+
+
+
+ Column
+
+
+ Column
+
+
+
+
+ Column
+
+
+ Column
+
+
+
+{% endblock main %}
diff --git a/gawa/start/urls.py b/gawa/start/urls.py
index 1249c1c..ec2b465 100644
--- a/gawa/start/urls.py
+++ b/gawa/start/urls.py
@@ -3,5 +3,7 @@ from django.urls import path
from . import views
urlpatterns = [
- path("", views.IndexView.as_view(), name="index"),
+ path("", views.IndexView.as_view(), name="StartIndex"),
+ path("search/", views.MainSearchView.as_view(), name="StartMainSearch"),
+ path("legal/", views.LegalInfoView.as_view(), name="StartLegalInfo"),
]
diff --git a/gawa/start/views.py b/gawa/start/views.py
index b872669..595903d 100644
--- a/gawa/start/views.py
+++ b/gawa/start/views.py
@@ -1,8 +1,13 @@
-from django.http import HttpResponse
-from django.views.generic.base import TemplateView
+from http.client import HTTPResponse
+from django.apps import AppConfig
+from django.http import Http404, HttpResponse, HttpResponseBadRequest, response
+from django.urls import Resolver404
+from django.views.generic import TemplateView, ListView
from django.views import View
-from django.template import Template, loader
-
+from django.template import Template, context, loader
+from django.http import HttpResponseRedirect
+from django.shortcuts import render
+from .forms import MainSearchForm
class IndexView(TemplateView):
"""
@@ -14,3 +19,36 @@ class IndexView(TemplateView):
template_name: str = "start/index.html"
+ def get_context_data(self, **kwargs):
+ context = super().get_context_data(**kwargs)
+ context["MainSearchForm"] = MainSearchForm()
+ return context
+
+class LegalInfoView(TemplateView):
+ """
+ Legal info that the german authorities want.
+ """
+
+ template_name: str = "start/legalinfo.html"
+
+ def get_context_data(self, **kwargs):
+ context = super().get_context_data(**kwargs)
+ context["MainSearchForm"] = MainSearchForm()
+ return context
+
+class MainSearchView(TemplateView):
+ """
+ Search for anything.
+ """
+
+ template_name: str = "start/search.html"
+
+ def get(self, request, *args, **kwargs):
+ form = MainSearchForm(request.GET)
+ if not form.is_valid():
+ return render(request, "errors/bad_request.html")
+ context = {
+ "searchstr": form.cleaned_data['search'],
+ "MainSearchForm": MainSearchForm()
+ }
+ return render(request=request, template_name=self.template_name, context=context)