2009-06-29 07:06:01 -05:00
|
|
|
# ------------------------------------------------------------------------------
|
2013-09-18 05:06:07 -05:00
|
|
|
# This file is part of Appy, a framework for building applications in the Python
|
|
|
|
# language. Copyright (C) 2007 Gaetan Delannay
|
|
|
|
|
|
|
|
# Appy is free software; you can redistribute it and/or modify it under the
|
|
|
|
# terms of the GNU General Public License as published by the Free Software
|
|
|
|
# Foundation; either version 3 of the License, or (at your option) any later
|
|
|
|
# version.
|
|
|
|
|
|
|
|
# Appy is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
|
|
|
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License along with
|
|
|
|
# Appy. If not, see <http://www.gnu.org/licenses/>.
|
2009-06-29 07:06:01 -05:00
|
|
|
|
2013-07-08 16:39:16 -05:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
# Import stuff from appy.fields (and from a few other places too).
|
|
|
|
# This way, when an app gets "from appy.gen import *", everything is available.
|
2013-09-18 05:06:07 -05:00
|
|
|
from appy import Object
|
|
|
|
from appy.px import Px
|
2013-08-21 06:54:56 -05:00
|
|
|
from appy.fields import Field
|
2013-07-08 16:39:16 -05:00
|
|
|
from appy.fields.action import Action
|
|
|
|
from appy.fields.boolean import Boolean
|
|
|
|
from appy.fields.computed import Computed
|
|
|
|
from appy.fields.date import Date
|
|
|
|
from appy.fields.file import File
|
|
|
|
from appy.fields.float import Float
|
|
|
|
from appy.fields.info import Info
|
|
|
|
from appy.fields.integer import Integer
|
|
|
|
from appy.fields.list import List
|
2015-03-16 06:08:13 -05:00
|
|
|
from appy.fields.dict import Dict
|
2013-07-08 16:39:16 -05:00
|
|
|
from appy.fields.pod import Pod
|
|
|
|
from appy.fields.ref import Ref, autoref
|
|
|
|
from appy.fields.string import String, Selection
|
2013-08-21 06:54:56 -05:00
|
|
|
from appy.fields.search import Search, UiSearch
|
|
|
|
from appy.fields.group import Group, Column
|
|
|
|
from appy.fields.page import Page
|
|
|
|
from appy.fields.phase import Phase
|
2013-09-18 05:06:07 -05:00
|
|
|
from appy.fields.workflow import *
|
2013-07-08 16:39:16 -05:00
|
|
|
from appy.gen.layout import Table
|
2014-10-24 08:55:45 -05:00
|
|
|
from appy.gen.utils import No, Tool, User
|
2010-08-05 11:23:17 -05:00
|
|
|
|
2014-03-05 09:48:54 -06:00
|
|
|
# Make the following classes available here: people may need to override some
|
|
|
|
# of their PXs (defined as static attributes).
|
2014-02-26 16:40:27 -06:00
|
|
|
from appy.gen.wrappers import AbstractWrapper as BaseObject
|
|
|
|
from appy.gen.wrappers.ToolWrapper import ToolWrapper as BaseTool
|
|
|
|
|
2009-06-29 07:06:01 -05:00
|
|
|
# ------------------------------------------------------------------------------
|
|
|
|
class Config:
|
|
|
|
'''If you want to specify some configuration parameters for appy.gen and
|
2013-07-24 08:53:19 -05:00
|
|
|
your application, please create a class named "Config" in the __init__.py
|
|
|
|
file of your application and override some of the attributes defined
|
|
|
|
here, ie:
|
|
|
|
|
|
|
|
import appy.gen
|
|
|
|
class Config(appy.gen.Config):
|
|
|
|
langages = ('en', 'fr')
|
|
|
|
'''
|
2014-01-20 09:30:14 -06:00
|
|
|
# What skin to use for the web interface? Appy has 2 skins: the default
|
|
|
|
# one (with a fixed width) and the "wide" skin (takes the whole page width).
|
|
|
|
skin = None # None means: the default one. Could be "wide".
|
2013-07-24 08:53:19 -05:00
|
|
|
# For every language code that you specify in this list, appy.gen will
|
|
|
|
# produce and maintain translation files.
|
|
|
|
languages = ['en']
|
|
|
|
# If languageSelector is True, on every page, a language selector will
|
|
|
|
# allow to switch between languages defined in self.languages. Else,
|
|
|
|
# the browser-defined language will be used for choosing the language
|
|
|
|
# of returned pages.
|
|
|
|
languageSelector = False
|
2014-11-13 08:02:33 -06:00
|
|
|
# Show the link to the user profile in the user strip
|
|
|
|
userLink = True
|
2013-07-24 08:53:19 -05:00
|
|
|
# People having one of these roles will be able to create instances
|
|
|
|
# of classes defined in your application.
|
2013-08-23 11:57:27 -05:00
|
|
|
defaultCreators = ['Manager']
|
2014-03-03 11:54:21 -06:00
|
|
|
# The "root" classes are those that will get their menu in the user
|
2015-02-17 01:58:04 -06:00
|
|
|
# interface. Put their names in the list below. If you leave the list empty,
|
|
|
|
# all gen-classes will be considered root classes (the default). If
|
|
|
|
# rootClasses is None, no class will be considered as root.
|
2014-03-03 11:54:21 -06:00
|
|
|
rootClasses = []
|
2013-07-24 08:53:19 -05:00
|
|
|
# Number of translations for every page on a Translation object
|
|
|
|
translationsPerPage = 30
|
|
|
|
# Language that will be used as a basis for translating to other
|
|
|
|
# languages.
|
|
|
|
sourceLanguage = 'en'
|
|
|
|
# Activate or not the button on home page for asking a new password
|
|
|
|
activateForgotPassword = True
|
|
|
|
# Enable session timeout?
|
|
|
|
enableSessionTimeout = False
|
|
|
|
# If the following field is True, the login/password widget will be
|
|
|
|
# discreet. This is for sites where authentication is not foreseen for
|
|
|
|
# the majority of visitors (just for some administrators).
|
|
|
|
discreetLogin = False
|
|
|
|
# When using Ogone, place an instance of appy.gen.ogone.OgoneConfig in
|
|
|
|
# the field below.
|
|
|
|
ogone = None
|
|
|
|
# When using Google analytics, specify here the Analytics ID
|
|
|
|
googleAnalyticsId = None
|
|
|
|
# Create a group for every global role?
|
|
|
|
groupsForGlobalRoles = False
|
|
|
|
# When using a LDAP for authenticating users, place an instance of class
|
2014-09-18 04:08:29 -05:00
|
|
|
# appy.shared.ldap.LdapConfig in the field below.
|
2013-07-24 08:53:19 -05:00
|
|
|
ldap = None
|
2014-09-18 04:08:29 -05:00
|
|
|
# When using a SMTP mail server for sending emails from your app, place an
|
|
|
|
# instance of class appy.gen.mail.MailConfig in the field below.
|
|
|
|
mail = None
|
2014-03-28 06:25:42 -05:00
|
|
|
# For an app, the default folder where to look for static content for the
|
|
|
|
# user interface (CSS, Javascript and image files) is folder "ui" within
|
|
|
|
# this app.
|
|
|
|
uiFolders = ['ui']
|
2015-02-22 05:42:04 -06:00
|
|
|
# CK editor configuration. Appy integrates CK editor via CDN (see
|
|
|
|
# http://cdn.ckeditor.com). Do not change "ckVersion" hereafter, excepted
|
|
|
|
# if you are sure that the customized configuration files config.js,
|
|
|
|
# contents.css and styles.js stored in appy/gen/ui/ckeditor will be
|
|
|
|
# compatible with the version you want to use.
|
|
|
|
ckVersion = '4.4.7'
|
|
|
|
# ckDistribution can be "basic", "standard", "standard-all", "full" or
|
|
|
|
# "full-all" (see doc in http://cdn.ckeditor.com).
|
|
|
|
ckDistribution = 'standard'
|
|
|
|
# CK toolbars are not configurable yet. So toolbar "Appy", defined in
|
|
|
|
# appy/gen/ui/ckeditor/config.js, will always be used.
|
2009-06-29 07:06:01 -05:00
|
|
|
# ------------------------------------------------------------------------------
|