diff --git a/VERSION b/VERSION index edf46ca6..5a3539c4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.4.1-alpha.1+timestamp.2012.12.24.11.22.50 +Version 2.4.1-alpha.1+timestamp.2012.12.24.12.13.23 diff --git a/applications/admin/controllers/appadmin.py b/applications/admin/controllers/appadmin.py index d9b81010..ee83434f 100644 --- a/applications/admin/controllers/appadmin.py +++ b/applications/admin/controllers/appadmin.py @@ -10,6 +10,10 @@ import datetime import copy import gluon.contenttype import gluon.fileutils +try: + import pygraphviz as pgv +except ImportError: + pgv = None response.subtitle = 'Database Administration (appadmin)' @@ -460,3 +464,50 @@ def ccache(): return dict(form=form, total=total, ram=ram, disk=disk, object_stats=hp != False) + + + +def table_template(table): + def types(field): + f_type = field.type + if not isinstance(f_type,str): + return ' ' + elif f_type == 'string': + return field.length + elif f_type == 'id': + return B('pk') + elif f_type.startswith('reference') or \ + f_type.startswith('list:reference'): + return B('fk') + else: + return ' ' + # this is horribe HTML but the only one graphiz understands + header = '