refonte des topics
This commit is contained in:
@@ -18,7 +18,9 @@ import shutil
|
||||
import magic
|
||||
import json
|
||||
from urllib import request, parse
|
||||
|
||||
import pkg_resources
|
||||
import sys
|
||||
import sqlite3
|
||||
|
||||
@view_config(route_name='home',
|
||||
renderer='cao_blogr:templates/home.jinja2')
|
||||
@@ -113,13 +115,25 @@ def captcha_validate(response, remote_addr, secret):
|
||||
def settings(request):
|
||||
|
||||
# lire toutes les docs du topic
|
||||
topic = 'ADM'
|
||||
topic = '_admin'
|
||||
items = BlogRecordService.by_topic(request, topic, '')
|
||||
|
||||
# informations sur les versions
|
||||
pyramid_version = pkg_resources.get_distribution("pyramid").version
|
||||
wtforms_version = pkg_resources.get_distribution("wtforms").version
|
||||
sqlalchemy_version = pkg_resources.get_distribution("sqlalchemy").version
|
||||
sqlite_version = sqlite3.sqlite_version
|
||||
python_version = sys.version
|
||||
|
||||
return {
|
||||
'page_title': "Paramètres",
|
||||
'topic': topic,
|
||||
'items': items,
|
||||
'pyramid_version': pyramid_version,
|
||||
'python_version' : python_version,
|
||||
'sqlite_version' : sqlite_version,
|
||||
'sqlalchemy_version': sqlalchemy_version,
|
||||
'wtforms_version': wtforms_version,
|
||||
}
|
||||
|
||||
|
||||
@@ -218,7 +232,7 @@ def topics(request):
|
||||
# get all topics
|
||||
topics = BlogRecordService.get_topics(request)
|
||||
return {
|
||||
'page_title': "Liste des rubriques",
|
||||
'page_title': "Liste des Topics",
|
||||
'topics': topics
|
||||
}
|
||||
|
||||
@@ -236,7 +250,7 @@ def topic_edit(request):
|
||||
# create a new topic
|
||||
entry = Topics()
|
||||
form = TopicForm(request.POST, entry)
|
||||
page_title = "Nouvelle rubrique"
|
||||
page_title = "Nouveau Topic"
|
||||
|
||||
else:
|
||||
# modify post
|
||||
@@ -282,7 +296,7 @@ def tag_edit(request):
|
||||
# create a new tag
|
||||
entry = Tags()
|
||||
form = TagForm(request.POST, entry)
|
||||
page_title = "Nouvelle sous-rubrique"
|
||||
page_title = "Nouveau Tag"
|
||||
|
||||
else:
|
||||
# modify post
|
||||
|
||||
Reference in New Issue
Block a user