Changeset - 8026872a10ee
[Not reviewed]
default
4 1 5
Marcin Kuzminski - 15 years ago 2010-06-30 17:14:47
marcin@python-works.com
Moved admin controllers to separate module
6 files changed with 6 insertions and 4 deletions:
0 comments (0 inline, 0 general)
pylons_app/config/routing.py
Show inline comments
 
@@ -32,7 +32,7 @@ def make_map(config):
 
        return not cr(repo_name, config['base_path'])
 
 
 
    #REST routes
 
    with map.submapper(path_prefix='/_admin', controller='repos') as m:
 
    with map.submapper(path_prefix='/_admin', controller='pylons_app.controllers.admin.repos:ReposController') as m:
 
        m.connect("repos", "/repos",
 
             action="create", conditions=dict(method=["POST"]))
 
        m.connect("repos", "/repos",
 
@@ -67,11 +67,11 @@ def make_map(config):
 
             action="delete_perm_user", conditions=dict(method=["DELETE"],
 
                                                        function=check_repo))
 
        
 
    map.resource('user', 'users', path_prefix='/_admin')
 
    map.resource('permission', 'permissions', path_prefix='/_admin')
 
    map.resource('user', 'users', controller='pylons_app.controllers.admin.users:UsersController', path_prefix='/_admin')
 
    map.resource('permission', 'permissions', controller='pylons_app.controllers.admin.permissions:PermissionsController', path_prefix='/_admin')
 
    
 
    #ADMIN
 
    with map.submapper(path_prefix='/_admin', controller='admin') as m:
 
    with map.submapper(path_prefix='/_admin', controller='pylons_app.controllers.admin.admin:AdminController') as m:
 
        m.connect('admin_home', '', action='index')#main page
 
        m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}',
 
                  action='add_repo')
 
@@ -84,9 +84,11 @@ def make_map(config):
 
                controller='feed', action='atom',
 
                conditions=dict(function=check_repo))
 
    
 
    #LOGIN/LOGOUT
 
    map.connect('login_home', '/login', controller='login')
 
    map.connect('logout_home', '/logout', controller='login', action='logout')
 
    
 
    #OTHERS
 
    map.connect('changeset_home', '/{repo_name:.*}/changeset/{revision}',
 
                controller='changeset', revision='tip',
 
                conditions=dict(function=check_repo))
pylons_app/controllers/admin/__init__.py
Show inline comments
 
new file 100644
pylons_app/controllers/admin/admin.py
Show inline comments
 
file renamed from pylons_app/controllers/admin.py to pylons_app/controllers/admin/admin.py
pylons_app/controllers/admin/permissions.py
Show inline comments
 
file renamed from pylons_app/controllers/permissions.py to pylons_app/controllers/admin/permissions.py
pylons_app/controllers/admin/repos.py
Show inline comments
 
file renamed from pylons_app/controllers/repos.py to pylons_app/controllers/admin/repos.py
pylons_app/controllers/admin/users.py
Show inline comments
 
file renamed from pylons_app/controllers/users.py to pylons_app/controllers/admin/users.py
0 comments (0 inline, 0 general)