Commit eb1f5af3 authored by fred's avatar fred

update for django 1.11

parent f9dc0541
......@@ -141,9 +141,6 @@ INSTALLED_APPS = (
'ckeditor',
'haystack',
'taggit',
'jquery',
'datetimewidget',
'django_bootstrap_staticfiles',
'emissions',
'newsletter',
'matos',
......
......@@ -14,7 +14,10 @@
{% block css %}
{{ block.super }}
{% import_django_select2_js_css %}
<link href="/static/django_select2/css/select2.css" rel="stylesheet">
<link href="/static/django_select2/css/extra.css" rel="stylesheet"><script type="text/javascript" src="/static/django_select2/js/select2.js"></script>
<script type="text/javascript" src="/static/django_select2/js/heavy_data.js"></script>
<link href="{{ STATIC_URL }}css/datetimepicker.css" rel="stylesheet" type="text/css"/>
{% endblock %}
......
......@@ -63,7 +63,7 @@
<ul class="episode-list">
{% for newsitem in emission.get_sorted_newsitems|slice:":5" %}
<li>{{ newsitem.date|date:"d E o H:i"|lower }}
<li>{{ newsitem.date|date:"d E o"|lower }}
<a href="{% url 'newsitem-view' slug=newsitem.slug %}">{{ newsitem.title }}</a>
</li>
{% empty %}
......@@ -87,7 +87,7 @@ Aucune actu.
<ul class="episode-list">
{% for newsitem in news_category.get_sorted_newsitems|slice:":10" %}
<li>{{ newsitem.date|date:"d E o H:i"|lower }}
<li>{{ newsitem.date|date:"d E o"|lower }}
<a href="{% url 'newsitem-view' slug=newsitem.slug %}">{{ newsitem.title }}</a>
</li>
{% empty %}
......
{% extends "registration/base.html" %}
{% load url from future %}
{% block user-links %}{% endblock %}
{% block bodyargs %}{{block.super}} class="login"{% endblock %}
......@@ -22,7 +21,7 @@ de nouveaux épisodes et nouvelles actualités.
<p>Mot de passe incorrect. Essayez encore.</p>
{% endif %}
<form method="post" id="login-form" action="{% url 'django.contrib.auth.views.login' %}">
<form method="post" id="login-form" action="{% url 'auth_login' %}">
{% csrf_token %}
<p>
......
from django.conf.urls import patterns, include, url
from django.conf.urls import include, url
from django.conf import settings
from django.views.generic import RedirectView
from django.core.urlresolvers import reverse_lazy
from django.contrib.auth.decorators import login_required
from django.contrib.auth.views import logout_then_login
from django.contrib import admin
......@@ -18,6 +19,10 @@ from emissions.models import Emission, Episode, NewsItem
from newsletter.urls import management_patterns as newsletter_urlpatterns
from matos.urls import urlpatterns as matos_urlpatterns
from nonstop.urls import urlpatterns as nonstop_urlpatterns
import panikombo.views
from .poll import views as poll_views
from . import views
from combo.manager.urls import urlpatterns as combo_manager_urls
......@@ -26,14 +31,14 @@ from urls_utils import decorated_includes, cms_permission_required
sqs = SearchQuerySet().models(Emission, Episode, NewsItem).facet('categories').facet('tags')
urlpatterns = patterns('',
url(r'^$', 'panikdb.views.home', name='home'),
urlpatterns = [
url(r'^$', views.home, name='home'),
url(r'^ckeditor/upload/', login_required(ckeditor_upload)),
url(r'^ckeditor/browse/', login_required(ckeditor_browse)),
url(r'^search/', search_view_factory(view_class=FacetedSearchView,
form_class=FacetedSearchForm, searchqueryset=sqs), name='haystack_search'),
url(r'^emissions/$', 'panikdb.views.emissions_list', name='emission-list'),
url(r'^emissions/$', views.emissions_list, name='emission-list'),
url(r'^emissions/',
decorated_includes(login_required, include(emissions_urlpatterns))),
......@@ -44,36 +49,36 @@ urlpatterns = patterns('',
url(r'^nonstop/',
decorated_includes(login_required, include(nonstop_urlpatterns))),
url(r'^newsletters/add$', 'panikdb.views.newsletter_create', name='newsletter-create'),
url(r'^newsletters/add$', views.newsletter_create, name='newsletter-create'),
url(r'^newsletters/',
decorated_includes(login_required, include(newsletter_urlpatterns))),
url(r'^cms/',
decorated_includes(cms_permission_required, include(combo_manager_urls))),
url(r'^news/$', 'panikdb.views.news', name='news-list'),
url(r'^news/$', views.news, name='news-list'),
url(r'^focus/set/(?P<object_type>[\w,-]+)/(?P<object_id>\d+)$',
'panikdb.views.focus_set', name='focus-set'),
views.focus_set, name='focus-set'),
url(r'^focus/unset/(?P<object_type>[\w,-]+)/(?P<object_id>\d+)$',
'panikdb.views.focus_unset', name='focus-unset'),
views.focus_unset, name='focus-unset'),
url(r'^cms/pages/(?P<page_pk>\w+)/make-topik$', 'panikdb.views.make_topik',
url(r'^cms/pages/(?P<page_pk>\w+)/make-topik$', views.make_topik,
name='make-topik'),
url(r'^cms/pages/topik/(?P<pk>\w+)/edit-topik$', 'panikombo.views.topik_edit',
url(r'^cms/pages/topik/(?P<pk>\w+)/edit-topik$', panikombo.views.topik_edit,
name='edit-topik'),
url(r'^accounts/logout/', 'django.contrib.auth.views.logout_then_login', name='logout'),
url(r'^accounts/logout/', logout_then_login, name='logout'),
url(r'^accounts/', include('registration.backends.default.urls')),
url(r'^combok/soundfiles/', 'panikombo.views.soundfiles'),
url(r'^combok/episodes/', 'panikombo.views.episodes'),
url(r'^combok/soundfiles/', panikombo.views.soundfiles),
url(r'^combok/episodes/', panikombo.views.episodes),
url(r'^vote/$', 'panikdb.poll.views.vote', name='vote'),
url(r'^vote/results/$', 'panikdb.poll.views.vote_results', name='vote-results'),
url(r'^vote/$', poll_views.vote, name='vote'),
url(r'^vote/results/$', poll_views.vote_results, name='vote-results'),
url(r'^admin/', include(admin.site.urls)),
)
]
from combo import plugins
urlpatterns = plugins.register_plugins_urls(urlpatterns)
......
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