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):
:return:
"""
return render(request, "adim/essai.html", {})
# return render(request, "adim_app/essai.html", {})
@login_required
......
......@@ -2,6 +2,10 @@ from django.conf.urls import include, url, static
from django.conf import settings
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()
urlpatterns = [
......@@ -9,9 +13,9 @@ urlpatterns = [
# url(r'^$', 'adim_project.views.home', name='home'),
# 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'^s-412-5/admin/', include(admin.site.urls)),
url(r'^shibauth/', include('shibauth.urls')),
url(r'^accounts/login/$', 'django.contrib.auth.views.login', {'template_name': "adim/home.html"}),
......
......@@ -95,9 +95,9 @@
{% if settings.BASE_URL and settings.BASE_URL != "/" %}
RedirectMatch ^{{ settings.BASE_URL|make_list|slice:"-1"|join:"" }}$ {{ settings.BASE_URL }}
{% endif %}
{% endblock wsgi %}
{% endblock wsgi %}
{% block rewrite_protected %}
{% block rewrite_protected %}
<IfModule rewrite_module>
RewriteEngine On
## Retourne une 404 pour media/protected au lien d'une 403
......@@ -107,9 +107,9 @@
#RewriteCond %{REQUEST_URI} !^/static/.*$
#RewriteRule ^.*$ /maintenance.html
</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" %}">
<IfModule rewrite_module>
RewriteEngine On
......@@ -122,7 +122,7 @@
Deny from all
</IfModule>
</Location>
{% endblock rewrite_admin_protected %}
{% endblock rewrite_admin_protected %}
{% endblock main %}
</IfModule>
Markdown is supported
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