Gitlab CSE Unil

Commit bc159cb0 authored by Julien Furrer's avatar Julien Furrer
Browse files

Modifié url de admin

parent 00bac00d
...@@ -60,7 +60,6 @@ def essai(request): ...@@ -60,7 +60,6 @@ def essai(request):
:return: :return:
""" """
return render(request, "adim/essai.html", {}) return render(request, "adim/essai.html", {})
# return render(request, "adim_app/essai.html", {})
@login_required @login_required
......
...@@ -2,6 +2,10 @@ from django.conf.urls import include, url, static ...@@ -2,6 +2,10 @@ from django.conf.urls import include, url, static
from django.conf import settings from django.conf import settings
from django.contrib import admin from django.contrib import admin
admin.site.site_header = "ADIM - Site d'administration"
admin.site.site_title = "ADIM"
admin.site.index_title = "Administration"
admin.site.site_url = None
admin.autodiscover() admin.autodiscover()
urlpatterns = [ urlpatterns = [
...@@ -9,9 +13,9 @@ urlpatterns = [ ...@@ -9,9 +13,9 @@ urlpatterns = [
# url(r'^$', 'adim_project.views.home', name='home'), # url(r'^$', 'adim_project.views.home', name='home'),
# url(r'^blog/', include('blog.urls')), # url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)), # url(r'^admin/', include(admin.site.urls)),
url(r'^s-412-5/admin/', include(admin.site.urls)),
# url(r'^admin/', include('django_trap.urls', namespace='django_trap')), # url(r'^admin/', include('django_trap.urls', namespace='django_trap')),
# url(r'^s-412-5/admin/', include(admin.site.urls)),
url(r'^shibauth/', include('shibauth.urls')), url(r'^shibauth/', include('shibauth.urls')),
url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': "adim/home.html"}), url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': "adim/home.html"}),
......
...@@ -95,9 +95,9 @@ ...@@ -95,9 +95,9 @@
{% if settings.BASE_URL and settings.BASE_URL != "/" %} {% if settings.BASE_URL and settings.BASE_URL != "/" %}
RedirectMatch ^{{ settings.BASE_URL|make_list|slice:"-1"|join:"" }}$ {{ settings.BASE_URL }} RedirectMatch ^{{ settings.BASE_URL|make_list|slice:"-1"|join:"" }}$ {{ settings.BASE_URL }}
{% endif %} {% endif %}
{% endblock wsgi %} {% endblock wsgi %}
{% block rewrite_protected %} {% block rewrite_protected %}
<IfModule rewrite_module> <IfModule rewrite_module>
RewriteEngine On RewriteEngine On
## Retourne une 404 pour media/protected au lien d'une 403 ## Retourne une 404 pour media/protected au lien d'une 403
...@@ -107,9 +107,9 @@ ...@@ -107,9 +107,9 @@
#RewriteCond %{REQUEST_URI} !^/static/.*$ #RewriteCond %{REQUEST_URI} !^/static/.*$
#RewriteRule ^.*$ /maintenance.html #RewriteRule ^.*$ /maintenance.html
</IfModule> </IfModule>
{% endblock rewrite_protected %} {% endblock rewrite_protected %}
{% block rewrite_admin_protected %} {% block rewrite_admin_protected %}
<Location "{{ settings.BASE_URL|make_list|slice:"-1"|join:"" }}{% url "admin:index" %}"> <Location "{{ settings.BASE_URL|make_list|slice:"-1"|join:"" }}{% url "admin:index" %}">
<IfModule rewrite_module> <IfModule rewrite_module>
RewriteEngine On RewriteEngine On
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
Deny from all Deny from all
</IfModule> </IfModule>
</Location> </Location>
{% endblock rewrite_admin_protected %} {% endblock rewrite_admin_protected %}
{% endblock main %} {% endblock main %}
</IfModule> </IfModule>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment