feat: Add sites for the main actions

This commit is contained in:
moanos [he/him] 2024-03-18 16:36:45 +01:00
parent 85d51c6cee
commit ded1aa77cf
7 changed files with 30 additions and 6 deletions

View File

@ -2,10 +2,11 @@ from django.contrib import admin
from django.contrib import admin
from .models import Animal, Species, RescueOrganization, AdoptionNotice, Location
from .models import Animal, Species, RescueOrganization, AdoptionNotice, Location, MarkdownContent
admin.site.register(Animal)
admin.site.register(Species)
admin.site.register(RescueOrganization)
admin.site.register(Location)
admin.site.register(AdoptionNotice)
admin.site.register(AdoptionNotice)
admin.site.register(MarkdownContent)

View File

@ -0,0 +1,6 @@
{% extends "fellchensammlung/base_generic.html" %}
{% load i18n %}
{% block content %}
Work in Progress: Vermitteln
{% endblock %}

View File

@ -8,9 +8,9 @@
<a href="" class="logo"><img src={% static 'fellchensammlung/img/logo_transparent.png' %}></a>
<nav id="nav" class="nav justify-content-center">
<a class="nav-link nav-link-active" href="/"><i data-feather="home"></i> Home</a>
<a class="nav-link " href="/feed/"><i class="fas fa-search"></i> Suchen</a>
<a class="nav-link " href="/info/"><i class="fas fa-"></i> Vermitteln</a>
<a class="nav-link " href="/download/"><i class="fas fa-info"></i> Über uns</a>
<a class="nav-link " href="{% url "search" %}"><i class="fas fa-search"></i> Suchen</a>
<a class="nav-link " href="/vermitteln/"><i class="fas fa-"></i> Vermitteln</a>
<a class="nav-link " href="/ueber-uns/"><i class="fas fa-info"></i> Über uns</a>
<a class="nav-link " href=""><i class="fas fa-feather"></i> RSS</a>
</nav>

View File

@ -0,0 +1,6 @@
{% extends "fellchensammlung/base_generic.html" %}
{% load i18n %}
{% block content %}
Suche...
{% endblock %}

View File

@ -8,4 +8,9 @@ urlpatterns = [
path("<int:animal_id>/", views.animal_detail, name="animal-detail"),
# ex: /adoption_notice/7/
path("<int:adoption_notice_id>/", views.adoption_notice_detail, name="adoption-notice-detail"),
# ex: /search/
path("suchen/", views.search, name="search"),
# ex: /vermitteln/
path("vermitteln/", views.add_adoption, name="add-adoption"),
]

View File

@ -19,3 +19,9 @@ def adoption_notice_detail(request, adoption_notice_id):
def animal_detail(request, animal_id):
response = "You're looking at animal %s."
return HttpResponse(response % animal_id)
def search(request):
return render(request, 'fellchensammlung/search.html')
def add_adoption(request):
return render(request, 'fellchensammlung/add_adoption.html')

View File

@ -18,6 +18,6 @@ from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path("fellchensammlung/", include("fellchensammlung.urls")),
path("", include("fellchensammlung.urls")),
path('admin/', admin.site.urls),
]