general: change homepage to redirect to /manage/ (#11205)

This commit is contained in:
Frédéric Péters 2016-06-05 10:16:10 +02:00
parent 559ac09b97
commit 714a857e55
2 changed files with 3 additions and 38 deletions

View File

@ -1,27 +0,0 @@
{% extends "passerelle/base.html" %}
{% load i18n %}
{% load url from future %}
{% block page-title %}
Passerelle
{% endblock %}
{% block appbar %}
<h2>{% trans 'Welcome' %}</h2>
{% endblock %}
{% block content %}
<p>
{% blocktrans %}
Passerelle provides an uniform access to multiple data sources and services.
{% endblocktrans %}
</p>
<ul class="apps">
{% for a in apps %}
<li class="{{ a.get_icon_class }}"><a href="{{ a.get_absolute_url }}">{{ a.get_verbose_name }}</a></li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -3,7 +3,7 @@ import json
from django.contrib.auth import logout as auth_logout
from django.contrib.auth import views as auth_views
from django.http import HttpResponseRedirect, HttpResponse
from django.views.generic.base import TemplateView
from django.views.generic.base import RedirectView, TemplateView
from django.conf import settings
from django.db import models
from django.shortcuts import resolve_url
@ -41,16 +41,8 @@ def logout(request, next_page=None):
return HttpResponseRedirect(next_page)
class HomePageView(TemplateView):
template_name = 'passerelle/homepage.html'
def get_context_data(self, **kwargs):
context = super(HomePageView, self).get_context_data(**kwargs)
# get all app instances
context['apps'] = []
for app in get_all_apps():
context['apps'].extend(app.objects.all())
return context
class HomePageView(RedirectView):
pattern_name = 'manage-home'
class ManageView(TemplateView):