From 21cb35d4ca0cd19ce58e8903e81c21e479d21281 Mon Sep 17 00:00:00 2001 From: gi0baro Date: Sat, 27 Dec 2014 12:16:52 +0100 Subject: [PATCH] Updated directory structure for pydal integration --- .gitmodules | 4 ++-- gluon/__init__.py | 9 ++++++++- gluon/contrib/__init__.py | 8 -------- gluon/contrib/pydal | 1 - gluon/packages/dal | 1 + 5 files changed, 11 insertions(+), 12 deletions(-) delete mode 160000 gluon/contrib/pydal create mode 160000 gluon/packages/dal diff --git a/.gitmodules b/.gitmodules index 7e2aea49c..71525aff8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ -[submodule "gluon/contrib/pydal"] - path = gluon/contrib/pydal +[submodule "gluon/packages/dal"] + path = gluon/packages/dal url = https://github.com/web2py/pydal.git diff --git a/gluon/__init__.py b/gluon/__init__.py index 6e5b8f5f7..588c3e28f 100644 --- a/gluon/__init__.py +++ b/gluon/__init__.py @@ -12,7 +12,14 @@ __all__ = ['A', 'B', 'BEAUTIFY', 'BODY', 'BR', 'CAT', 'CENTER', 'CLEANUP', 'CODE', 'CRYPT', 'DAL', 'DIV', 'EM', 'EMBED', 'FIELDSET', 'FORM', 'Field', 'H1', 'H2', 'H3', 'H4', 'H5', 'H6', 'HEAD', 'HR', 'HTML', 'HTTP', 'I', 'IFRAME', 'IMG', 'INPUT', 'IS_ALPHANUMERIC', 'IS_DATE', 'IS_DATETIME', 'IS_DATETIME_IN_RANGE', 'IS_DATE_IN_RANGE', 'IS_DECIMAL_IN_RANGE', 'IS_EMAIL', 'IS_LIST_OF_EMAILS', 'IS_EMPTY_OR', 'IS_EQUAL_TO', 'IS_EXPR', 'IS_FLOAT_IN_RANGE', 'IS_IMAGE', 'IS_JSON', 'IS_INT_IN_RANGE', 'IS_IN_DB', 'IS_IN_SET', 'IS_IPV4', 'IS_LENGTH', 'IS_LIST_OF', 'IS_LOWER', 'IS_MATCH', 'IS_NOT_EMPTY', 'IS_NOT_IN_DB', 'IS_NULL_OR', 'IS_SLUG', 'IS_STRONG', 'IS_TIME', 'IS_UPLOAD_FILENAME', 'IS_UPPER', 'IS_URL', 'LABEL', 'LEGEND', 'LI', 'LINK', 'LOAD', 'MARKMIN', 'MENU', 'META', 'OBJECT', 'OL', 'ON', 'OPTGROUP', 'OPTION', 'P', 'PRE', 'SCRIPT', 'SELECT', 'SPAN', 'SQLFORM', 'SQLTABLE', 'STRONG', 'STYLE', 'TABLE', 'TAG', 'TBODY', 'TD', 'TEXTAREA', 'TFOOT', 'TH', 'THEAD', 'TITLE', 'TR', 'TT', 'UL', 'URL', 'XHTML', 'XML', 'redirect', 'current', 'embed64'] -from contrib import pydal +#: add pydal to sys.modules +import os +import sys +sys.path.append(os.path.join( + os.path.dirname(os.path.abspath(__file__)), "packages", "dal")) +import pydal +sys.modules['pydal'] = pydal + from globals import current from html import * from validators import * diff --git a/gluon/contrib/__init__.py b/gluon/contrib/__init__.py index 6e86cf30a..e69de29bb 100644 --- a/gluon/contrib/__init__.py +++ b/gluon/contrib/__init__.py @@ -1,8 +0,0 @@ -import os -import sys - -sys.path.append(os.path.join( - os.path.dirname(os.path.abspath(__file__)), "pydal")) - -import pydal -sys.modules['pydal'] = pydal diff --git a/gluon/contrib/pydal b/gluon/contrib/pydal deleted file mode 160000 index 0bbbe1d66..000000000 --- a/gluon/contrib/pydal +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 0bbbe1d6655e86b33a659bc12f8c7e785076a4f5 diff --git a/gluon/packages/dal b/gluon/packages/dal new file mode 160000 index 000000000..414a03e8e --- /dev/null +++ b/gluon/packages/dal @@ -0,0 +1 @@ +Subproject commit 414a03e8e2d133ba75b47e1c8011fb37cb2107e8