[domino] add a hiden button to launch the domino cronjob
This is for debugging purpose as long as the function is not stable.
This commit is contained in:
parent
6e4637be5f
commit
76d32c21f1
|
@ -4,6 +4,7 @@ from quixote.directory import Directory, AccessControlled
|
|||
from qommon import get_cfg, get_logger
|
||||
from qommon.form import Form, StringWidget, CheckboxWidget, SingleSelectWidget
|
||||
from qommon.admin.menu import html_top
|
||||
from quixote.html import htmltext
|
||||
|
||||
from payments import Regie
|
||||
|
||||
|
@ -77,6 +78,13 @@ class AbeliumDominoDirectory(Directory):
|
|||
def debug [html] (self):
|
||||
from abelium_domino_vars import SESSION_CACHE
|
||||
html_top(ABELIUM_DOMINO)
|
||||
'<form method="post"><button>Lancer le cron</button></form>'
|
||||
if get_request().get_method() == 'POST':
|
||||
try:
|
||||
from abelium_domino_synchro import synchronize_domino
|
||||
synchronize_domino(get_publisher())
|
||||
except Exception, e:
|
||||
htmltext('<pre>%s</pre>') % repr(e)
|
||||
'<p>code interne: %s</p>' % getattr(get_request().user, str('abelium_domino_code_famille'), None)
|
||||
'<dl>'
|
||||
context = get_publisher().substitutions.get_context_variables()
|
||||
|
|
Reference in New Issue