Commit 94b05276 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Remove the modules constants.py (issue rnunning sphinx).

parent 3246f035
# -*- coding: utf-8 -*-
"""Common constants used by packages
"""
import plugin_dbui as dbui
from datetime import datetime
from gluon import current
now = datetime.now()
today = now.strftime("%Y-%m-%d")
undef = current.T(dbui.UNDEF)
undef_id = dbui.UNDEF_ID
year = now.year
...@@ -6,7 +6,8 @@ import plugin_dbui as dbui ...@@ -6,7 +6,8 @@ import plugin_dbui as dbui
from callbacks import INHIBIT_CASCADE_DELETE from callbacks import INHIBIT_CASCADE_DELETE
from constants import today, undef_id from constants import today
from datetime import datetime
from gluon import current from gluon import current
from gluon.validators import IS_IN_DB from gluon.validators import IS_IN_DB
from pydal import Field from pydal import Field
...@@ -137,6 +138,9 @@ class EvtModelCore(object): ...@@ -137,6 +138,9 @@ class EvtModelCore(object):
pyDAL.Table pyDAL.Table
""" """
undef_id = dbui.UNDEF_ID
today = datetime.now().strftime("%Y-%m-%d")
table = db.define_table( table = db.define_table(
"history", "history",
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
"""Definitions of the selector(s) """Definitions of the selector(s)
""" """
from constants import year
from datetime import datetime from datetime import datetime
from gluon.validators import IS_IN_DB from gluon.validators import IS_IN_DB
from pydal import Field from pydal import Field
...@@ -40,6 +39,8 @@ class EvtModelSelector(object): ...@@ -40,6 +39,8 @@ class EvtModelSelector(object):
pyDAL.Table pyDAL.Table
""" """
year = datetime.now().year
table = virtdb.define_table( table = virtdb.define_table(
"selector", "selector",
Field("year_start", "integer", default=year, label="Start"), Field("year_start", "integer", default=year, label="Start"),
......
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
""" """
import plugin_dbui as dbui import plugin_dbui as dbui
from constants import undef
from gluon import current from gluon import current
fieldsModifier = dbui.FieldsModifier fieldsModifier = dbui.FieldsModifier
...@@ -143,6 +142,8 @@ class EvtUiCore(object): ...@@ -143,6 +142,8 @@ class EvtUiCore(object):
T (gluon.languages.translator): language translator T (gluon.languages.translator): language translator
""" """
undef = current.T(dbui.UNDEF)
#..................................................................... #.....................................................................
# #
# Fields # Fields
......
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