add a __template.ezt view
This commit is contained in:
parent
e86d71ac0a
commit
1e4add7841
|
@ -274,6 +274,7 @@ CMS_TEMPLATES = (
|
|||
('portail_citoyen/base_two_columns.html', 'Canevas sur deux colonnes'),
|
||||
('portail_citoyen/base_one_column.html', 'Canevas sur une colonne'),
|
||||
('portail_citoyen/base_help.html', 'Canevas de l\'aide'),
|
||||
('portail_citoyen/template_ezt.html', 'Template EZT'),
|
||||
)
|
||||
if 'CMS_TEMPLATES' in os.environ:
|
||||
CMS_TEMPLATES = map(lambda x: x.split(';'),
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta http-equiv="content-language" content="fr" />
|
||||
{% block title %}
|
||||
<title>Compte Citoyen :: Démo :: {% page_attribute "page_title" %}</title>
|
||||
{% endblock %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static "portail_citoyen/css/style.css" %}">
|
||||
{% render_block "css" %}
|
||||
{% block extra_scripts %}
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}
|
||||
<title>[page_title]</title>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_scripts %}
|
||||
[script]
|
||||
{% endblock %}
|
||||
|
||||
{% block bodyargs %}
|
||||
[if-any onload] onload="[onload]"[end]
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div id="page">
|
||||
<div id="top"> <h1>[if-any title][title][else][site_name][end]</h1> </div>
|
||||
<div id="main-content">
|
||||
[prelude]
|
||||
[if-any breadcrumb]<p id="breadcrumb">Vous êtes ici : [breadcrumb]</p>[end]
|
||||
[body]
|
||||
</div>
|
||||
<div id="footer"></div>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -2,6 +2,7 @@ from django.conf.urls import patterns, include, url
|
|||
from django.contrib import admin
|
||||
from django.conf import settings
|
||||
|
||||
from . import views
|
||||
|
||||
admin.autodiscover()
|
||||
|
||||
|
@ -26,6 +27,7 @@ if 'cmsplugin_blurp' in settings.INSTALLED_APPS:
|
|||
)
|
||||
|
||||
urlpatterns += patterns('',
|
||||
url(r'^__template.ezt$', views.template_ezt),
|
||||
url(r'^', include('cms.urls')),
|
||||
)
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import json
|
||||
from datetime import timedelta
|
||||
|
||||
from django.views.generic import TemplateView
|
||||
from django.http import HttpResponse
|
||||
from django.utils.timezone import now
|
||||
|
||||
|
@ -26,3 +27,9 @@ def stats(request):
|
|||
'user_last_connection_less_than_one_hour_ago': qs.filter(last_login__gte=last_hour).count(),
|
||||
}
|
||||
return HttpResponse(json.dumps(what), mimetype='application/json')
|
||||
|
||||
|
||||
class TemplateEZTView(TemplateView):
|
||||
template_name = 'portail_citoyen/template_ezt.html'
|
||||
|
||||
template_ezt = TemplateEZTView.as_view()
|
||||
|
|
Reference in New Issue