Changeset 571

Show
Ignore:
Timestamp:
10/02/07 17:42:58 (1 year ago)
Author:
ian
Message:

Created tg-admin command plugin for managing PagodaCMS sites at the command line

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • pagoda/trunk/Pagoda/pagoda/util.py

    r475 r571  
    1212 
    1313import os 
     14 
     15__all__ = ['make_module', 'realpath', 'deque', 'lru_cache'] 
     16 
     17def make_module(path): 
     18    """Ensure that `path` is a directory and contains an `__init__.py` file""" 
     19    if not os.path.exists(path): 
     20        os.makedirs(path) 
     21    filename = os.path.join(path, "__init__.py") 
     22    if not os.path.exists(filename): 
     23        f = open(filename, 'w+') 
     24        f.close() 
    1425 
    1526def realpath(path, relative_to=None): 
  • pagoda/trunk/Pagoda/setup.py

    r565 r571  
    5656        pagoda_models = pagoda.plugins.models 
    5757        pagoda_view = pagoda.view 
     58 
     59        [turbogears.command] 
     60        pagoda = pagoda.command:PagodaCommand 
    5861    """, 
    5962    include_package_data=True, 

Log in as guest/pagoda to create tickets