preparer pour mysql-connector-python
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf8 -*-
|
# -*- coding: utf8 -*-
|
||||||
from pyramid_layout.layout import layout_config
|
from pyramid_layout.layout import layout_config
|
||||||
from .security import groupfinder
|
from .security import groupfinder
|
||||||
from views.default import (
|
from .views.default import (
|
||||||
to_euro,
|
to_euro,
|
||||||
to_percent,
|
to_percent,
|
||||||
to_decimal,
|
to_decimal,
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||||
<button class="btn btn-warning" type="submit" name="form.deleted"
|
<button class="btn btn-warning" type="submit" name="form.deleted"
|
||||||
tal:condition="actif.no_id <> 0">
|
tal:condition="actif.no_id != 0">
|
||||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -113,7 +113,7 @@
|
|||||||
<button class="btn btn-primary" type="submit" name="form.submitted">
|
<button class="btn btn-primary" type="submit" name="form.submitted">
|
||||||
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
<span class="glyphicon glyphicon-ok"></span> Enregistrer</button>
|
||||||
<button class="btn btn-warning" type="submit" name="form.deleted"
|
<button class="btn btn-warning" type="submit" name="form.deleted"
|
||||||
tal:condition="actif.no_id <> 0">
|
tal:condition="actif.no_id != 0">
|
||||||
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
<span class="glyphicon glyphicon-remove"></span> Supprimer</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ def home(request):
|
|||||||
# totaliser les pourcentages
|
# totaliser les pourcentages
|
||||||
total += item.pc_cible
|
total += item.pc_cible
|
||||||
|
|
||||||
if total <> 100:
|
if total != 100:
|
||||||
message = u'Attention, le total de votre répartition cible est incorrect : %s.' % total
|
message = u'Attention, le total de votre répartition cible est incorrect : %s.' % total
|
||||||
|
|
||||||
# lire les actifs
|
# lire les actifs
|
||||||
@@ -195,7 +195,7 @@ def doc_edit(request):
|
|||||||
|
|
||||||
if len(intitule) > 0 and len(texte) > 0:
|
if len(intitule) > 0 and len(texte) > 0:
|
||||||
update_doc(request, doc_id, intitule, texte, theme)
|
update_doc(request, doc_id, intitule, texte, theme)
|
||||||
if doc_id <> '0':
|
if doc_id != '0':
|
||||||
return HTTPFound(location=request.route_url('doc_view', doc_id=doc_id))
|
return HTTPFound(location=request.route_url('doc_view', doc_id=doc_id))
|
||||||
else:
|
else:
|
||||||
return HTTPFound(location=request.route_url('doc_list'))
|
return HTTPFound(location=request.route_url('doc_list'))
|
||||||
@@ -203,7 +203,7 @@ def doc_edit(request):
|
|||||||
message = "Veuillez saisir un intitule et un texte."
|
message = "Veuillez saisir un intitule et un texte."
|
||||||
|
|
||||||
if 'form.deleted' in request.params:
|
if 'form.deleted' in request.params:
|
||||||
if doc_id <> '0':
|
if doc_id != '0':
|
||||||
delete_doc(request, doc_id)
|
delete_doc(request, doc_id)
|
||||||
request.session.flash(u"<%s> est supprimée avec succès." % intitule, 'success')
|
request.session.flash(u"<%s> est supprimée avec succès." % intitule, 'success')
|
||||||
return HTTPFound(location=request.route_url('doc_list'))
|
return HTTPFound(location=request.route_url('doc_list'))
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ pyramid.includes =
|
|||||||
pyramid_tm
|
pyramid_tm
|
||||||
|
|
||||||
sqlalchemy.url = mysql://root:phuoc@localhost/bd_mesavoirs?charset=utf8
|
sqlalchemy.url = mysql://root:phuoc@localhost/bd_mesavoirs?charset=utf8
|
||||||
# sqlalchemy.url = mysql://root:phuoc@192.168.1.98/bd_mesavoirs?charset=utf8
|
# sqlalchemy.url = mysql+mysqlconnector://root:phuoc@localhost/bd_mesavoirs?charset=utf8
|
||||||
|
|
||||||
caotek_mesavoirs.admin_email = cao.thienphuoc@bbox.fr
|
caotek_mesavoirs.admin_email = cao.thienphuoc@bbox.fr
|
||||||
|
|
||||||
|
|||||||
3
setup.py
3
setup.py
@@ -10,7 +10,6 @@ with open(os.path.join(here, 'CHANGES.txt')) as f:
|
|||||||
|
|
||||||
requires = [
|
requires = [
|
||||||
'pyramid',
|
'pyramid',
|
||||||
# 'pyramid_jinja2',
|
|
||||||
'pyramid_chameleon',
|
'pyramid_chameleon',
|
||||||
'pyramid_debugtoolbar',
|
'pyramid_debugtoolbar',
|
||||||
'pyramid_layout',
|
'pyramid_layout',
|
||||||
@@ -21,7 +20,7 @@ requires = [
|
|||||||
'zope.sqlalchemy',
|
'zope.sqlalchemy',
|
||||||
'waitress',
|
'waitress',
|
||||||
'MySQL-python',
|
'MySQL-python',
|
||||||
'docutils',
|
# 'mysql-connector-python',
|
||||||
'BeautifulSoup',
|
'BeautifulSoup',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user