mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2025-06-30 07:11:09 +02:00
New admin theme
This commit is contained in:
@ -29,6 +29,9 @@ ALLOWED_HOSTS = []
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
# Theme overrides Django Admin templates
|
||||
'theme',
|
||||
|
||||
# External apps
|
||||
'bootstrap3',
|
||||
'reversion',
|
||||
@ -177,7 +180,6 @@ LOGIN_REDIRECT_URL = '/'
|
||||
SITE_NAME = "Med"
|
||||
|
||||
# Association information
|
||||
LOGO_PATH = "static_files/logo.png"
|
||||
ASSO_NAME = "Med"
|
||||
ASSO_ADDRESS_LINE1 = "61 Avenue du président Wilson"
|
||||
ASSO_ADDRESS_LINE2 = "94230 Cachan"
|
||||
@ -185,9 +187,6 @@ ASSO_SIRET = ""
|
||||
ASSO_EMAIL = "med@lists.crans.org"
|
||||
ASSO_PHONE = "01 02 03 04 05"
|
||||
|
||||
services_urls = {
|
||||
}
|
||||
|
||||
# Number of hours a token remains valid after having been created. Numeric and string
|
||||
# versions should have the same meaning.
|
||||
REQ_EXPIRE_HRS = 48
|
||||
|
@ -1,26 +1,6 @@
|
||||
{% extends "med/sidebar.html" %}
|
||||
{% comment %}
|
||||
Re2o est un logiciel d'administration développé initiallement au rezometz. Il
|
||||
se veut agnostique au réseau considéré, de manière à être installable en
|
||||
quelques clics.
|
||||
|
||||
Copyright © 2017 Gabriel Détraz
|
||||
Copyright © 2017 Goulven Kermarec
|
||||
Copyright © 2017 Augustin Lemesle
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
@ -30,15 +10,16 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
|
||||
{% block content %}
|
||||
<h1>Bienvenue sur {{ site_name }}, notre base de données.</h1>
|
||||
<h1>Welcome to procrastination heaven !</h1>
|
||||
|
||||
<h1>Welcome to procrastination heaven ! </h1>
|
||||
|
||||
<center>
|
||||
<div class="thumbnail">
|
||||
<img src="/static/logo/logo.png" alt="logo">
|
||||
</div>
|
||||
</center>
|
||||
|
||||
<p class="lead">
|
||||
Le site va subir progressivement des mises à jour pendant ces vacances.
|
||||
Si vous rencontrez des instabilités,
|
||||
veuillez nous faire remonter les problèmes <a href="mailto:a@crans.org,club-med@crans.org">au webmaster</a>.
|
||||
</p>
|
||||
|
||||
<div class="text-center">
|
||||
<img src="{% static "images/splash.png" %}" class="img-responsive" alt="Poulpy">
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
|
27
med/urls.py
27
med/urls.py
@ -4,17 +4,32 @@
|
||||
|
||||
from django.conf.urls import include, url
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth import views as auth_views
|
||||
from django.shortcuts import render
|
||||
from django.views.generic import RedirectView
|
||||
|
||||
|
||||
def index(request):
|
||||
"""
|
||||
Static home page
|
||||
"""
|
||||
return render(request, 'med/index.html', {})
|
||||
|
||||
from .views import index
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^$', index),
|
||||
url('^logout/', auth_views.logout, {'next_page': '/'}),
|
||||
url('^', include('django.contrib.auth.urls')),
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
url(r'^$', index, name='index'),
|
||||
|
||||
# Include project routers
|
||||
url(r'^users/', include('users.urls', namespace='users')),
|
||||
url(r'^media/', include('media.urls', namespace='media')),
|
||||
url(r'^search/', include('search.urls', namespace='search')),
|
||||
url(r'^logs/', include('logs.urls', namespace='logs')),
|
||||
|
||||
# Include Django Contrib and Core routers
|
||||
# admin/login/ is redirected to the non-admin login page
|
||||
url(r'^i18n/', include('django.conf.urls.i18n')),
|
||||
url(r'^accounts/', include('django.contrib.auth.urls')),
|
||||
url(r'^accounts/profile/',
|
||||
RedirectView.as_view(pattern_name='index')),
|
||||
url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
|
||||
url(r'^admin/', admin.site.urls),
|
||||
]
|
||||
|
26
med/views.py
26
med/views.py
@ -1,26 +0,0 @@
|
||||
# -*- mode: python; coding: utf-8 -*-
|
||||
# Copyright (C) 2017-2019 by BDE ENS Paris-Saclay
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
from django.shortcuts import render
|
||||
from django.template.context_processors import csrf
|
||||
|
||||
from med.settings import services_urls
|
||||
|
||||
|
||||
def form(ctx, template, request):
|
||||
c = ctx
|
||||
c.update(csrf(request))
|
||||
return render(request, template, c)
|
||||
|
||||
|
||||
def index(request):
|
||||
i = 0
|
||||
services = [{}]
|
||||
for key, s in services_urls.items():
|
||||
if len(services) <= i:
|
||||
services += [{}]
|
||||
services[i][key] = s
|
||||
i = i + 1 if i < 2 else 0
|
||||
|
||||
return form({'services_urls': services}, 'med/index.html', request)
|
Reference in New Issue
Block a user