Changeset 43

Show
Ignore:
Timestamp:
08/26/06 00:04:49 (2 years ago)
Author:
johnbywater
Message:

Dropped etc files from the package distribution.
Various minor changed.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/etc/domainmodel.conf.new

    r40 r43  
     1## Please Note: This file is a meant as a starting point for a configuration file for a 
     2new dm application. It is also used to setup development of the dm package. 
     3 
    14[DEFAULT] 
    25# service_name: 
    3 #  * name of the service being provided 
    4 service_name = Model Domain 
     6#  * name of the service being provided (defaults to system name) 
     7#service_name = Model Domain 
    58 
    69# system_mode: 
    710#  * whether e.g. in production or development mode 
    811#  * valid values: production (default) | development 
    9 system_mode = development 
     12#system_mode = production 
    1013 
    1114# system_name: 
     
    1619 
    1720# plugin_data_dir: 
    18 #  * path to service's plugins' variable data directory 
     21#  * path to plugin filesystems 
    1922plugin_data_dir = /tmp/domainmodel_testing/plugin_data 
    2023 
     
    107110#  * secret key (used for generating secure session keys) 
    108111#  * NB: make sure your service's secret_key is different from the default 
    109 #  * type one random character (no spaces) for each '#' character in the line: 
    110 secret_key = (*Y£F@{£FHW$Rli(EFH(*SEHF(&9S(P&SYGDF(&G9Ged9f7gs 
     112secret_key = (*YZF@{ZFHW$Rli(EFH(*SEHF(&9S(P&SYGDF(&G9Ged9f7gs 
    111113 
    112114 
  • trunk/setup.py

    r30 r43  
    1919    long_description = \ 
    2020""" 
    21 Domainmodel provides a framework for enterprise applications. 
     21DomainModel provides a framework for enterprise software applications. 
    2222""", 
    2323    package_dir = {'': 'src'}, 
    2424    packages = getPackages(os.path.join(basePath, 'src')), 
    25     data_files=[ 
    26         ('share/dm/etc', ['etc/kforge.conf.new']), 
    27     ] + getDataFiles( 
    28         'share/dm/www/media', basePath, 'src/dm/django/media' 
    29     ) + getDataFiles( 
    30         'share/dm/templates', basePath, 'src/dm/django/templates' 
    31     ) 
    3225) 
    3326 
  • trunk/src/dm/dictionary.py

    r35 r43  
    2929         
    3030    def setDefaultWords(self): 
    31         self[PYTHONPATH] = os.environ.get('PYTHONPATH', '') 
    32         self[SYSTEM_NAME] = self.getSystemName() 
    33         self[SYSTEM_MODE] = 'production' 
    34         self[SYSTEM_VERSION] = self.getSystemVersion() 
    35         self[VISITOR_NAME] = 'visitor' 
    36         self[VISITOR_ROLE] = 'Visitor' 
     31        self[PYTHONPATH]          = os.environ.get('PYTHONPATH', '') 
     32        self[SYSTEM_NAME]         = self.getSystemName() 
     33        self[SYSTEM_SERVICE_NAME] = self[SYSTEM_NAME] 
     34        self[SYSTEM_MODE]         = 'production' 
     35        self[SYSTEM_VERSION]      = self.getSystemVersion() 
     36        self[VISITOR_NAME]        = 'visitor' 
     37        self[VISITOR_ROLE]        = 'Visitor' 
    3738        self[INITIAL_PERSON_ROLE] = 'Visitor' 
    3839        self[PLUGIN_PACKAGE_NAME] = 'dm.plugin' 
    39         self[CAPTCHA_IS_ENABLED] = '' # False (ConfigParser only supports str) 
    40         self[AUTH_COOKIE_NAME] = '%s_auth' % self[SYSTEM_NAME] 
     40        self[CAPTCHA_IS_ENABLED] = '' # False (ConfigParser only supports str) 
     41        self[AUTH_COOKIE_NAME]    = '%s_auth' % self[SYSTEM_NAME] 
    4142        self[NO_AUTH_COOKIE_NAME] = '%s_no_auth' % self[SYSTEM_NAME] 
    4243 
  • trunk/src/dm/environment.py

    r39 r43  
    33 
    44class SystemEnvironment(object): 
     5    "Boundary object encapsulating environment variables." 
    56 
    67    DJANGO_SETTINGS_MODULE = 'DJANGO_SETTINGS_MODULE' 
     
    1415 
    1516    def assertDjangoSettingsModule(self): 
    16         "Raises exception if DJANGO_SETTINGS_MODULE is not set in environment." 
     17        "Raises exception if DJANGO_SETTINGS_MODULE not set in environment." 
    1718        name = self.DJANGO_SETTINGS_MODULE 
    1819        if name in os.environ: 
     
    3031            raise "%(name)s value in environment not valid: '%(value)'" 
    3132 
    32     def getConfigFilePathEnvironmentVariableName(self): 
    33         name = self.systemName.upper() + '_SETTINGS' 
    34         return name 
    35  
    3633    def getConfigFilePath(self): 
    37         "Read system configuration path from environment variable." 
     34        "Reads path to system's configuration file from environment variable." 
    3835        name = self.getConfigFilePathEnvironmentVariableName() 
    3936        if name in os.environ: 
     
    4239            message = "Environment variable '%s' not set." % name 
    4340            raise EnvironmentError, message 
    44         # if not os.path.isfile(path): 
    45         #     message = 'System service files not found at: %s' % path 
    46         #     raise EnvironmentError, message 
    4741        return path 
     42         
     43    def getConfigFilePathEnvironmentVariableName(self): 
     44        name = self.systemName.upper() + '_SETTINGS' 
     45        return name 
    4846 
  • trunk/src/dm/filesystem.py

    r39 r43  
    1010     
    1111    def getPluginPath(self, plugin): 
    12         """ 
    13         Get base path for plugin data 
    14         Use this only for common plugin data (service data should be going in 
    15         project specific directory, see getProjectPluginPath) 
    16         """ 
    17         return os.path.join( 
    18             self.pluginDataPath, 
    19             plugin.name 
    20         ) 
     12        "Returns path of directory containing plugin filesystems." 
     13        return os.path.join(self.pluginDataPath, plugin.name) 
    2114 
  • trunk/src/dm/view/basetest.py

    r28 r43  
    1212        unittest.makeSuite(TestAbstractInstanceView), 
    1313        unittest.makeSuite(TestAbstractFormView), 
     14        unittest.makeSuite(TestAbstractHasManyView), 
    1415        unittest.makeSuite(TestAbstractListView), 
    1516        unittest.makeSuite(TestAbstractSearchView), 
     
    3738 
    3839class MockAbstractFormView(MockView, AbstractFormView): 
     40    pass 
     41 
     42class MockAbstractHasManyView(MockView, AbstractHasManyView): 
    3943    pass 
    4044 
     
    203207 
    204208 
     209class TestAbstractHasManyView(ViewTestCase): 
     210 
     211    viewClass = MockAbstractHasManyView 
     212    requiredResponseClassName = 'HttpResponseRedirect' 
     213    requiredRedirect = '/login/' 
     214 
     215 
    205216class TestAbstractListView(ViewTestCase): 
    206217 
  • trunk/src/dm/view/registry.py

    r29 r43  
    158158        return fieldNames 
    159159 
    160     def getAssociationObject(self): 
     160    def getAssociationObject(self): # smell: refused bequest 
    161161        return None 
    162162