refactor: Remove index
This commit is contained in:
		@@ -4,7 +4,7 @@
 | 
			
		||||
 | 
			
		||||
<nav class="navbar" role="navigation" aria-label="main navigation">
 | 
			
		||||
    <div class="navbar-brand">
 | 
			
		||||
        <a class="navbar-item" href="{% url 'index-bulma' %}">
 | 
			
		||||
        <a class="navbar-item" href="{% url 'index' %}">
 | 
			
		||||
            <img src="{% static 'fellchensammlung/img/logo_transparent.png' %}" alt="{% trans 'Notfellchen Logo' %}">
 | 
			
		||||
            <h1 class="title is-4">notfellchen.org</h1>
 | 
			
		||||
        </a>
 | 
			
		||||
 
 | 
			
		||||
@@ -18,7 +18,6 @@ sitemaps = {
 | 
			
		||||
 | 
			
		||||
urlpatterns = [
 | 
			
		||||
    path("", views.index, name="index"),
 | 
			
		||||
    path("bulma/", views.index_bulma, name="index-bulma"),
 | 
			
		||||
    path("rss/", LatestAdoptionNoticesFeed(), name="rss"),
 | 
			
		||||
    path("metrics/", views.metrics, name="metrics"),
 | 
			
		||||
    # ex: /animal/5/
 | 
			
		||||
 
 | 
			
		||||
@@ -47,7 +47,6 @@ def fail_if_user_not_owner_or_trust_level(user, django_object, trust_level=Trust
 | 
			
		||||
    if not user_is_owner_or_trust_level(user, django_object, trust_level):
 | 
			
		||||
        raise PermissionDenied
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def index(request):
 | 
			
		||||
    """View function for home page of site."""
 | 
			
		||||
    latest_adoption_list = AdoptionNotice.objects.filter(
 | 
			
		||||
@@ -61,22 +60,6 @@ def index(request):
 | 
			
		||||
               "announcements": active_announcements}
 | 
			
		||||
    Text.get_texts(["how_to", "introduction"], lang, context)
 | 
			
		||||
 | 
			
		||||
    return render(request, 'fellchensammlung/index.html', context=context)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
def index_bulma(request):
 | 
			
		||||
    """View function for home page of site."""
 | 
			
		||||
    latest_adoption_list = AdoptionNotice.objects.filter(
 | 
			
		||||
        adoptionnoticestatus__major_status=AdoptionNoticeStatus.ACTIVE).order_by("-created_at")
 | 
			
		||||
    active_adoptions = [adoption for adoption in latest_adoption_list if adoption.is_active]
 | 
			
		||||
    language_code = translation.get_language()
 | 
			
		||||
    lang = Language.objects.get(languagecode=language_code)
 | 
			
		||||
    active_announcements = Announcement.get_active_announcements(lang)
 | 
			
		||||
 | 
			
		||||
    context = {"adoption_notices": active_adoptions[:5], "adoption_notices_map": active_adoptions,
 | 
			
		||||
               "announcements": active_announcements}
 | 
			
		||||
    Text.get_texts(["how_to", "introduction"], lang, context)
 | 
			
		||||
 | 
			
		||||
    return render(request, 'fellchensammlung/bulma-index.html', context=context)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user