The structure of a page definition and what the elements mean. All data is stored as a python file with variables with fixed names.

The root variables

The variables in the form file.

title string name of the page
datasources dict data definitions used by the page
form dict the elements of the page and general settings that defines how the page should behave
extracode dict python view code custom made for the page that is not generated by the framework

The form settings

The page settings in the form section.

'pageredirect'
string this page should redirect to after loading data
'pageredirectlivelive'

'pagesecurity' string
indicate that security is set on the page
'pagesecuritygroup' string
this page needs a special group to be shown
'usecaching' bool caching turned on for this page
'cachetimeout' int timeout in seconds
'pagestyledef' string page styles loaded in html header
'pagejsready' string javascript defined on the page that is added to page ready

Data source settings

All of these settings can be found as a dict named 'datasources' in the form

'maintable' string
The table that is the master of the page. Usually used for all look ups and security that the views show only the data they should. Used for getting one record and navigating by url/number#/
'task' string Name of the task to run when opening the page.
'transfer' string Name of the transfer to run when opening the page.
'rundqlname' string Name of the dql to run when opening the page.
'fixedfilter' string Query format used for setting fixed search filters for all data sources defined as single record like maintable, task, transfer, rundqlname etc.
'uselivetext' bool is there any use of live text on the page
'useliveinlivetext' bool
'usegroups' bool tells if we should load groups for use in tags on the page
'uselivedata' bool set to true when you insert a livetext
'uselivetransfer' bool
'useliveview' bool
'uselivedql' bool have we added any live dql on the page
'uselivefield' bool
'mainextratables' list A list of dict with definition of extra tables used independent on a page with single record.
'livetransfers' list list of all live transfers on the page
'liveviewtables' list
All tables used in live view with extra settings like tablename and filter
'livedqls' list all dqls used in dataviews on the page
'lookupdefault' string the initial action on the maindata record when in a editi mode in a form.Valid values is "", "new record", "first record" and "new record only". "" used the default. "new record" makes a new record if no parameter for record no set in the url. "first record" defaults to first record in query when no parameters set. "new record only" defaults to new record regardless of what is set in the parameters.
'basetemplate' string the page template used on the page, blank means default
'pageactivejs' list javascript libraries activated manually by the designer
'fields' list list of dict defining the fields used for editing data on the page.
'buttons' list list of dict defining the buttons used on the page.

Extra code

The extracode dict definitions used by custom code in view and template generation.

'viewtype' string type of view where a generated view is 'dg3' and 'custom' is where the developer writes all code.
'viewcustom' string The view code used to generate a custom view.
'viewpre' string Extra code before loading data in a view when using a DG3 standard view.
'viewpost' string Extra code after data loaded in a view when using a DG3 standard view.
'viewdecorators' string Used to add spesial decorators to the code. Can also be used to define extra functions as there is no processing to ensure that this is a decorator added.
'viewdep' string dependencies added to the custom view.
'pageheader' string extra code added to the page header in html code.

liveviewtables definitions

The live view table definitinos consists of a list of dict that defined each extra dataview.

'tablename' string the name of the table to use in the dataview.
'datanamed' string the name used in extradata. If not set, the tablename is used instead
'filter' string the fixed filter set on the table
'maxresult' None or int the maximum number of records returned
'minresult' None or int the minumun number of records returned. This usually are used with subforms to create new records and populate them with default values.
'minextra' None or int the minimum nuber of extra records returned. Usually used for subforms to allow new records to be created regardless of what is returned by maxresult.

mainextratables definitions

The main extra tables are tables defined by the fields that not connect to the main table and not to any liveview. This is one record lookups defined by a fixed filter.

'tablename' string the name of the table to use in the dataview.
'filter' string the fixed filter defining the table connected table to the maindata.

fields definitions

The fields definitions are a list of dict decribing fields used in the code either as field snippets [! field name !] or as html fields. When defined as html fields, you set the field definitions using data-settingsname="setting value" instead of doing it in the datasources.fields. All settings set in the html element are added to the datasources.fields before generating the view code.

'type' string the field type like text, hidden, dropdown.
'fieldname' string the name of field.
'live' string the name of the field used for dataexchange.
'name' string the name of the field and id of element