##// END OF EJS Templates
added __license__ into main of rhodecode, PEP8ify
marcink -
r1205:f4807acf beta
parent child Browse files
Show More
@@ -1,56 +1,58 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """
2 """
3 rhodecode.__init__
3 rhodecode.__init__
4 ~~~~~~~~~~~~~~~~~~
4 ~~~~~~~~~~~~~~~~~~
5
5
6 RhodeCode, a web based repository management based on pylons
6 RhodeCode, a web based repository management based on pylons
7 versioning implementation: http://semver.org/
7 versioning implementation: http://semver.org/
8
8
9 :created_on: Apr 9, 2010
9 :created_on: Apr 9, 2010
10 :author: marcink
10 :author: marcink
11 :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
11 :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
12 :license: GPLv3, see COPYING for more details.
12 :license: GPLv3, see COPYING for more details.
13 """
13 """
14 # This program is free software; you can redistribute it and/or
14 # This program is free software; you can redistribute it and/or
15 # modify it under the terms of the GNU General Public License
15 # modify it under the terms of the GNU General Public License
16 # as published by the Free Software Foundation; version 2
16 # as published by the Free Software Foundation; version 2
17 # of the License or (at your opinion) any later version of the license.
17 # of the License or (at your opinion) any later version of the license.
18 #
18 #
19 # This program is distributed in the hope that it will be useful,
19 # This program is distributed in the hope that it will be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
22 # GNU General Public License for more details.
23 #
23 #
24 # You should have received a copy of the GNU General Public License
24 # You should have received a copy of the GNU General Public License
25 # along with this program; if not, write to the Free Software
25 # along with this program; if not, write to the Free Software
26 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
26 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
27 # MA 02110-1301, USA.
27 # MA 02110-1301, USA.
28 import platform
28 import platform
29
29
30 VERSION = (1, 2, 0, 'beta')
30 VERSION = (1, 2, 0, 'beta')
31 __version__ = '.'.join((str(each) for each in VERSION[:4]))
31 __version__ = '.'.join((str(each) for each in VERSION[:4]))
32 __dbversion__ = 3 #defines current db version for migrations
32 __dbversion__ = 3 #defines current db version for migrations
33 __platform__ = platform.system()
33 __platform__ = platform.system()
34 __license__ = 'GPLv3'
34
35
35 PLATFORM_WIN = ('Windows',)
36 PLATFORM_WIN = ('Windows')
36 PLATFORM_OTHERS = ('Linux', 'Darwin', 'FreeBSD',)
37 PLATFORM_OTHERS = ('Linux', 'Darwin', 'FreeBSD')
37
38
38 try:
39 try:
39 from rhodecode.lib.utils import get_current_revision
40 from rhodecode.lib.utils import get_current_revision
40 _rev = get_current_revision()
41 _rev = get_current_revision()
41 except ImportError:
42 except ImportError:
42 #this is needed when doing some setup.py operations
43 #this is needed when doing some setup.py operations
43 _rev = False
44 _rev = False
44
45
45 if len(VERSION) > 3 and _rev:
46 if len(VERSION) > 3 and _rev:
46 __version__ += ' [rev:%s]' % _rev[0]
47 __version__ += ' [rev:%s]' % _rev[0]
47
48
49
48 def get_version():
50 def get_version():
49 """Returns shorter version (digit parts only) as string."""
51 """Returns shorter version (digit parts only) as string."""
50
52
51 return '.'.join((str(each) for each in VERSION[:3]))
53 return '.'.join((str(each) for each in VERSION[:3]))
52
54
53 BACKENDS = {
55 BACKENDS = {
54 'hg': 'Mercurial repository',
56 'hg': 'Mercurial repository',
55 #'git': 'Git repository',
57 #'git': 'Git repository',
56 }
58 }
@@ -1,84 +1,85 b''
1 """Pylons environment configuration"""
1 """Pylons environment configuration"""
2
2
3 import os
3 import os
4 import logging
4 import logging
5
5
6 from mako.lookup import TemplateLookup
6 from mako.lookup import TemplateLookup
7 from pylons.configuration import PylonsConfig
7 from pylons.configuration import PylonsConfig
8 from pylons.error import handle_mako_error
8 from pylons.error import handle_mako_error
9 from sqlalchemy import engine_from_config
9 from sqlalchemy import engine_from_config
10
10
11 import rhodecode.lib.app_globals as app_globals
11 import rhodecode.lib.app_globals as app_globals
12 import rhodecode.lib.helpers
12 import rhodecode.lib.helpers
13
13
14 from rhodecode.config.routing import make_map
14 from rhodecode.config.routing import make_map
15 from rhodecode.lib import celerypylons
15 from rhodecode.lib import celerypylons
16 from rhodecode.lib.auth import set_available_permissions
16 from rhodecode.lib.auth import set_available_permissions
17 from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config
17 from rhodecode.lib.utils import repo2db_mapper, make_ui, set_rhodecode_config
18 from rhodecode.model import init_model
18 from rhodecode.model import init_model
19 from rhodecode.model.scm import ScmModel
19 from rhodecode.model.scm import ScmModel
20 from rhodecode.lib.timerproxy import TimerProxy
20 from rhodecode.lib.timerproxy import TimerProxy
21
21
22 log = logging.getLogger(__name__)
22 log = logging.getLogger(__name__)
23
23
24
24 def load_environment(global_conf, app_conf, initial=False):
25 def load_environment(global_conf, app_conf, initial=False):
25 """Configure the Pylons environment via the ``pylons.config``
26 """Configure the Pylons environment via the ``pylons.config``
26 object
27 object
27 """
28 """
28 config = PylonsConfig()
29 config = PylonsConfig()
29
30
30 # Pylons paths
31 # Pylons paths
31 root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
32 root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
32 paths = dict(root=root,
33 paths = dict(root=root,
33 controllers=os.path.join(root, 'controllers'),
34 controllers=os.path.join(root, 'controllers'),
34 static_files=os.path.join(root, 'public'),
35 static_files=os.path.join(root, 'public'),
35 templates=[os.path.join(root, 'templates')])
36 templates=[os.path.join(root, 'templates')])
36
37
37 # Initialize config with the basic options
38 # Initialize config with the basic options
38 config.init_app(global_conf, app_conf, package='rhodecode', paths=paths)
39 config.init_app(global_conf, app_conf, package='rhodecode', paths=paths)
39
40
40 config['routes.map'] = make_map(config)
41 config['routes.map'] = make_map(config)
41 config['pylons.app_globals'] = app_globals.Globals(config)
42 config['pylons.app_globals'] = app_globals.Globals(config)
42 config['pylons.h'] = rhodecode.lib.helpers
43 config['pylons.h'] = rhodecode.lib.helpers
43
44
44 # Setup cache object as early as possible
45 # Setup cache object as early as possible
45 import pylons
46 import pylons
46 pylons.cache._push_object(config['pylons.app_globals'].cache)
47 pylons.cache._push_object(config['pylons.app_globals'].cache)
47
48
48 # Create the Mako TemplateLookup, with the default auto-escaping
49 # Create the Mako TemplateLookup, with the default auto-escaping
49 config['pylons.app_globals'].mako_lookup = TemplateLookup(
50 config['pylons.app_globals'].mako_lookup = TemplateLookup(
50 directories=paths['templates'],
51 directories=paths['templates'],
51 error_handler=handle_mako_error,
52 error_handler=handle_mako_error,
52 module_directory=os.path.join(app_conf['cache_dir'], 'templates'),
53 module_directory=os.path.join(app_conf['cache_dir'], 'templates'),
53 input_encoding='utf-8', default_filters=['escape'],
54 input_encoding='utf-8', default_filters=['escape'],
54 imports=['from webhelpers.html import escape'])
55 imports=['from webhelpers.html import escape'])
55
56
56 #sets the c attribute access when don't existing attribute are accessed
57 #sets the c attribute access when don't existing attribute are accessed
57 config['pylons.strict_tmpl_context'] = True
58 config['pylons.strict_tmpl_context'] = True
58 test = os.path.split(config['__file__'])[-1] == 'test.ini'
59 test = os.path.split(config['__file__'])[-1] == 'test.ini'
59 if test:
60 if test:
60 from rhodecode.lib.utils import create_test_env, create_test_index
61 from rhodecode.lib.utils import create_test_env, create_test_index
61 from rhodecode.tests import TESTS_TMP_PATH
62 from rhodecode.tests import TESTS_TMP_PATH
62 create_test_env(TESTS_TMP_PATH, config)
63 create_test_env(TESTS_TMP_PATH, config)
63 create_test_index(TESTS_TMP_PATH, True)
64 create_test_index(TESTS_TMP_PATH, True)
64
65
65 #MULTIPLE DB configs
66 #MULTIPLE DB configs
66 # Setup the SQLAlchemy database engine
67 # Setup the SQLAlchemy database engine
67 if config['debug'] and not test:
68 if config['debug'] and not test:
68 #use query time debugging.
69 #use query time debugging.
69 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.',
70 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.',
70 proxy=TimerProxy())
71 proxy=TimerProxy())
71 else:
72 else:
72 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.')
73 sa_engine_db1 = engine_from_config(config, 'sqlalchemy.db1.')
73
74
74 init_model(sa_engine_db1)
75 init_model(sa_engine_db1)
75
76
76 repos_path = make_ui('db').configitems('paths')[0][1]
77 repos_path = make_ui('db').configitems('paths')[0][1]
77 repo2db_mapper(ScmModel().repo_scan(repos_path))
78 repo2db_mapper(ScmModel().repo_scan(repos_path))
78 set_available_permissions(config)
79 set_available_permissions(config)
79 config['base_path'] = repos_path
80 config['base_path'] = repos_path
80 set_rhodecode_config(config)
81 set_rhodecode_config(config)
81 # CONFIGURATION OPTIONS HERE (note: all config options will override
82 # CONFIGURATION OPTIONS HERE (note: all config options will override
82 # any Pylons config options)
83 # any Pylons config options)
83
84
84 return config
85 return config
@@ -1,78 +1,79 b''
1 """Pylons middleware initialization"""
1 """Pylons middleware initialization"""
2
2
3 from beaker.middleware import SessionMiddleware
3 from beaker.middleware import SessionMiddleware
4 from routes.middleware import RoutesMiddleware
4 from routes.middleware import RoutesMiddleware
5 from paste.cascade import Cascade
5 from paste.cascade import Cascade
6 from paste.registry import RegistryManager
6 from paste.registry import RegistryManager
7 from paste.urlparser import StaticURLParser
7 from paste.urlparser import StaticURLParser
8 from paste.deploy.converters import asbool
8 from paste.deploy.converters import asbool
9 from paste.gzipper import make_gzip_middleware
9 from paste.gzipper import make_gzip_middleware
10
10
11 from pylons.middleware import ErrorHandler, StatusCodeRedirect
11 from pylons.middleware import ErrorHandler, StatusCodeRedirect
12 from pylons.wsgiapp import PylonsApp
12 from pylons.wsgiapp import PylonsApp
13
13
14 from rhodecode.lib.middleware.simplehg import SimpleHg
14 from rhodecode.lib.middleware.simplehg import SimpleHg
15 from rhodecode.lib.middleware.simplegit import SimpleGit
15 from rhodecode.lib.middleware.simplegit import SimpleGit
16 from rhodecode.lib.middleware.https_fixup import HttpsFixup
16 from rhodecode.lib.middleware.https_fixup import HttpsFixup
17 from rhodecode.config.environment import load_environment
17 from rhodecode.config.environment import load_environment
18
18
19
19 def make_app(global_conf, full_stack=True, static_files=True, **app_conf):
20 def make_app(global_conf, full_stack=True, static_files=True, **app_conf):
20 """Create a Pylons WSGI application and return it
21 """Create a Pylons WSGI application and return it
21
22
22 ``global_conf``
23 ``global_conf``
23 The inherited configuration for this application. Normally from
24 The inherited configuration for this application. Normally from
24 the [DEFAULT] section of the Paste ini file.
25 the [DEFAULT] section of the Paste ini file.
25
26
26 ``full_stack``
27 ``full_stack``
27 Whether or not this application provides a full WSGI stack (by
28 Whether or not this application provides a full WSGI stack (by
28 default, meaning it handles its own exceptions and errors).
29 default, meaning it handles its own exceptions and errors).
29 Disable full_stack when this application is "managed" by
30 Disable full_stack when this application is "managed" by
30 another WSGI middleware.
31 another WSGI middleware.
31
32
32 ``app_conf``
33 ``app_conf``
33 The application's local configuration. Normally specified in
34 The application's local configuration. Normally specified in
34 the [app:<name>] section of the Paste ini file (where <name>
35 the [app:<name>] section of the Paste ini file (where <name>
35 defaults to main).
36 defaults to main).
36
37
37 """
38 """
38 # Configure the Pylons environment
39 # Configure the Pylons environment
39 config = load_environment(global_conf, app_conf)
40 config = load_environment(global_conf, app_conf)
40
41
41 # The Pylons WSGI app
42 # The Pylons WSGI app
42 app = PylonsApp(config=config)
43 app = PylonsApp(config=config)
43
44
44 # Routing/Session/Cache Middleware
45 # Routing/Session/Cache Middleware
45 app = RoutesMiddleware(app, config['routes.map'])
46 app = RoutesMiddleware(app, config['routes.map'])
46 app = SessionMiddleware(app, config)
47 app = SessionMiddleware(app, config)
47
48
48 # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)
49 # CUSTOM MIDDLEWARE HERE (filtered by error handling middlewares)
49
50
50 app = SimpleHg(app, config)
51 app = SimpleHg(app, config)
51 app = SimpleGit(app, config)
52 app = SimpleGit(app, config)
52
53
53 if asbool(full_stack):
54 if asbool(full_stack):
54 # Handle Python exceptions
55 # Handle Python exceptions
55 app = ErrorHandler(app, global_conf, **config['pylons.errorware'])
56 app = ErrorHandler(app, global_conf, **config['pylons.errorware'])
56
57
57 # Display error documents for 401, 403, 404 status codes (and
58 # Display error documents for 401, 403, 404 status codes (and
58 # 500 when debug is disabled)
59 # 500 when debug is disabled)
59 if asbool(config['debug']):
60 if asbool(config['debug']):
60 app = StatusCodeRedirect(app)
61 app = StatusCodeRedirect(app)
61 else:
62 else:
62 app = StatusCodeRedirect(app, [400, 401, 403, 404, 500])
63 app = StatusCodeRedirect(app, [400, 401, 403, 404, 500])
63
64
64 #enable https redirets based on HTTP_X_URL_SCHEME set by proxy
65 #enable https redirets based on HTTP_X_URL_SCHEME set by proxy
65 app = HttpsFixup(app, config)
66 app = HttpsFixup(app, config)
66
67
67 # Establish the Registry for this application
68 # Establish the Registry for this application
68 app = RegistryManager(app)
69 app = RegistryManager(app)
69
70
70 if asbool(static_files):
71 if asbool(static_files):
71 # Serve static files
72 # Serve static files
72 static_app = StaticURLParser(config['pylons.paths']['static_files'])
73 static_app = StaticURLParser(config['pylons.paths']['static_files'])
73 app = Cascade([static_app, app])
74 app = Cascade([static_app, app])
74 app = make_gzip_middleware(app, global_conf, compress_level=1)
75 app = make_gzip_middleware(app, global_conf, compress_level=1)
75
76
76 app.config = config
77 app.config = config
77
78
78 return app
79 return app
@@ -1,241 +1,241 b''
1 """
1 """
2 Routes configuration
2 Routes configuration
3
3
4 The more specific and detailed routes should be defined first so they
4 The more specific and detailed routes should be defined first so they
5 may take precedent over the more generic routes. For more information
5 may take precedent over the more generic routes. For more information
6 refer to the routes manual at http://routes.groovie.org/docs/
6 refer to the routes manual at http://routes.groovie.org/docs/
7 """
7 """
8 from __future__ import with_statement
8 from __future__ import with_statement
9 from routes import Mapper
9 from routes import Mapper
10 from rhodecode.lib.utils import check_repo_fast as cr
10 from rhodecode.lib.utils import check_repo_fast as cr
11
11
12
12 def make_map(config):
13 def make_map(config):
13 """Create, configure and return the routes Mapper"""
14 """Create, configure and return the routes Mapper"""
14 routes_map = Mapper(directory=config['pylons.paths']['controllers'],
15 routes_map = Mapper(directory=config['pylons.paths']['controllers'],
15 always_scan=config['debug'])
16 always_scan=config['debug'])
16 routes_map.minimization = False
17 routes_map.minimization = False
17 routes_map.explicit = False
18 routes_map.explicit = False
18
19
19 def check_repo(environ, match_dict):
20 def check_repo(environ, match_dict):
20 """
21 """
21 check for valid repository for proper 404 handling
22 check for valid repository for proper 404 handling
22
23
23 :param environ:
24 :param environ:
24 :param match_dict:
25 :param match_dict:
25 """
26 """
26 repo_name = match_dict.get('repo_name')
27 repo_name = match_dict.get('repo_name')
27 return not cr(repo_name, config['base_path'])
28 return not cr(repo_name, config['base_path'])
28
29
29 # The ErrorController route (handles 404/500 error pages); it should
30 # The ErrorController route (handles 404/500 error pages); it should
30 # likely stay at the top, ensuring it can always be resolved
31 # likely stay at the top, ensuring it can always be resolved
31 routes_map.connect('/error/{action}', controller='error')
32 routes_map.connect('/error/{action}', controller='error')
32 routes_map.connect('/error/{action}/{id}', controller='error')
33 routes_map.connect('/error/{action}/{id}', controller='error')
33
34
34 #==========================================================================
35 #==========================================================================
35 # CUSTOM ROUTES HERE
36 # CUSTOM ROUTES HERE
36 #==========================================================================
37 #==========================================================================
37
38
38 #MAIN PAGE
39 #MAIN PAGE
39 routes_map.connect('home', '/', controller='home', action='index')
40 routes_map.connect('home', '/', controller='home', action='index')
40 routes_map.connect('repo_switcher', '/repos', controller='home', action='repo_switcher')
41 routes_map.connect('repo_switcher', '/repos', controller='home', action='repo_switcher')
41 routes_map.connect('bugtracker', "http://bitbucket.org/marcinkuzminski/rhodecode/issues", _static=True)
42 routes_map.connect('bugtracker', "http://bitbucket.org/marcinkuzminski/rhodecode/issues", _static=True)
42 routes_map.connect('gpl_license', "http://www.gnu.org/licenses/gpl.html", _static=True)
43 routes_map.connect('rhodecode_official', "http://rhodecode.org", _static=True)
43 routes_map.connect('rhodecode_official', "http://rhodecode.org", _static=True)
44
44
45 #ADMIN REPOSITORY REST ROUTES
45 #ADMIN REPOSITORY REST ROUTES
46 with routes_map.submapper(path_prefix='/_admin', controller='admin/repos') as m:
46 with routes_map.submapper(path_prefix='/_admin', controller='admin/repos') as m:
47 m.connect("repos", "/repos",
47 m.connect("repos", "/repos",
48 action="create", conditions=dict(method=["POST"]))
48 action="create", conditions=dict(method=["POST"]))
49 m.connect("repos", "/repos",
49 m.connect("repos", "/repos",
50 action="index", conditions=dict(method=["GET"]))
50 action="index", conditions=dict(method=["GET"]))
51 m.connect("formatted_repos", "/repos.{format}",
51 m.connect("formatted_repos", "/repos.{format}",
52 action="index",
52 action="index",
53 conditions=dict(method=["GET"]))
53 conditions=dict(method=["GET"]))
54 m.connect("new_repo", "/repos/new",
54 m.connect("new_repo", "/repos/new",
55 action="new", conditions=dict(method=["GET"]))
55 action="new", conditions=dict(method=["GET"]))
56 m.connect("formatted_new_repo", "/repos/new.{format}",
56 m.connect("formatted_new_repo", "/repos/new.{format}",
57 action="new", conditions=dict(method=["GET"]))
57 action="new", conditions=dict(method=["GET"]))
58 m.connect("/repos/{repo_name:.*}",
58 m.connect("/repos/{repo_name:.*}",
59 action="update", conditions=dict(method=["PUT"],
59 action="update", conditions=dict(method=["PUT"],
60 function=check_repo))
60 function=check_repo))
61 m.connect("/repos/{repo_name:.*}",
61 m.connect("/repos/{repo_name:.*}",
62 action="delete", conditions=dict(method=["DELETE"],
62 action="delete", conditions=dict(method=["DELETE"],
63 function=check_repo))
63 function=check_repo))
64 m.connect("edit_repo", "/repos/{repo_name:.*}/edit",
64 m.connect("edit_repo", "/repos/{repo_name:.*}/edit",
65 action="edit", conditions=dict(method=["GET"],
65 action="edit", conditions=dict(method=["GET"],
66 function=check_repo))
66 function=check_repo))
67 m.connect("formatted_edit_repo", "/repos/{repo_name:.*}.{format}/edit",
67 m.connect("formatted_edit_repo", "/repos/{repo_name:.*}.{format}/edit",
68 action="edit", conditions=dict(method=["GET"],
68 action="edit", conditions=dict(method=["GET"],
69 function=check_repo))
69 function=check_repo))
70 m.connect("repo", "/repos/{repo_name:.*}",
70 m.connect("repo", "/repos/{repo_name:.*}",
71 action="show", conditions=dict(method=["GET"],
71 action="show", conditions=dict(method=["GET"],
72 function=check_repo))
72 function=check_repo))
73 m.connect("formatted_repo", "/repos/{repo_name:.*}.{format}",
73 m.connect("formatted_repo", "/repos/{repo_name:.*}.{format}",
74 action="show", conditions=dict(method=["GET"],
74 action="show", conditions=dict(method=["GET"],
75 function=check_repo))
75 function=check_repo))
76 #ajax delete repo perm user
76 #ajax delete repo perm user
77 m.connect('delete_repo_user', "/repos_delete_user/{repo_name:.*}",
77 m.connect('delete_repo_user', "/repos_delete_user/{repo_name:.*}",
78 action="delete_perm_user", conditions=dict(method=["DELETE"],
78 action="delete_perm_user", conditions=dict(method=["DELETE"],
79 function=check_repo))
79 function=check_repo))
80 #ajax delete repo perm users_group
80 #ajax delete repo perm users_group
81 m.connect('delete_repo_users_group', "/repos_delete_users_group/{repo_name:.*}",
81 m.connect('delete_repo_users_group', "/repos_delete_users_group/{repo_name:.*}",
82 action="delete_perm_users_group", conditions=dict(method=["DELETE"],
82 action="delete_perm_users_group", conditions=dict(method=["DELETE"],
83 function=check_repo))
83 function=check_repo))
84
84
85 #settings actions
85 #settings actions
86 m.connect('repo_stats', "/repos_stats/{repo_name:.*}",
86 m.connect('repo_stats', "/repos_stats/{repo_name:.*}",
87 action="repo_stats", conditions=dict(method=["DELETE"],
87 action="repo_stats", conditions=dict(method=["DELETE"],
88 function=check_repo))
88 function=check_repo))
89 m.connect('repo_cache', "/repos_cache/{repo_name:.*}",
89 m.connect('repo_cache', "/repos_cache/{repo_name:.*}",
90 action="repo_cache", conditions=dict(method=["DELETE"],
90 action="repo_cache", conditions=dict(method=["DELETE"],
91 function=check_repo))
91 function=check_repo))
92 m.connect('repo_public_journal', "/repos_public_journal/{repo_name:.*}",
92 m.connect('repo_public_journal', "/repos_public_journal/{repo_name:.*}",
93 action="repo_public_journal", conditions=dict(method=["PUT"],
93 action="repo_public_journal", conditions=dict(method=["PUT"],
94 function=check_repo))
94 function=check_repo))
95 m.connect('repo_pull', "/repo_pull/{repo_name:.*}",
95 m.connect('repo_pull', "/repo_pull/{repo_name:.*}",
96 action="repo_pull", conditions=dict(method=["PUT"],
96 action="repo_pull", conditions=dict(method=["PUT"],
97 function=check_repo))
97 function=check_repo))
98
98
99 #ADMIN REPOS GROUP REST ROUTES
99 #ADMIN REPOS GROUP REST ROUTES
100 routes_map.resource('repos_group', 'repos_groups', controller='admin/repos_groups', path_prefix='/_admin')
100 routes_map.resource('repos_group', 'repos_groups', controller='admin/repos_groups', path_prefix='/_admin')
101
101
102 #ADMIN USER REST ROUTES
102 #ADMIN USER REST ROUTES
103 routes_map.resource('user', 'users', controller='admin/users', path_prefix='/_admin')
103 routes_map.resource('user', 'users', controller='admin/users', path_prefix='/_admin')
104
104
105 #ADMIN USERS REST ROUTES
105 #ADMIN USERS REST ROUTES
106 routes_map.resource('users_group', 'users_groups', controller='admin/users_groups', path_prefix='/_admin')
106 routes_map.resource('users_group', 'users_groups', controller='admin/users_groups', path_prefix='/_admin')
107
107
108 #ADMIN GROUP REST ROUTES
108 #ADMIN GROUP REST ROUTES
109 routes_map.resource('group', 'groups', controller='admin/groups', path_prefix='/_admin')
109 routes_map.resource('group', 'groups', controller='admin/groups', path_prefix='/_admin')
110
110
111 #ADMIN PERMISSIONS REST ROUTES
111 #ADMIN PERMISSIONS REST ROUTES
112 routes_map.resource('permission', 'permissions', controller='admin/permissions', path_prefix='/_admin')
112 routes_map.resource('permission', 'permissions', controller='admin/permissions', path_prefix='/_admin')
113
113
114 ##ADMIN LDAP SETTINGS
114 ##ADMIN LDAP SETTINGS
115 routes_map.connect('ldap_settings', '/_admin/ldap', controller='admin/ldap_settings',
115 routes_map.connect('ldap_settings', '/_admin/ldap', controller='admin/ldap_settings',
116 action='ldap_settings', conditions=dict(method=["POST"]))
116 action='ldap_settings', conditions=dict(method=["POST"]))
117 routes_map.connect('ldap_home', '/_admin/ldap', controller='admin/ldap_settings',)
117 routes_map.connect('ldap_home', '/_admin/ldap', controller='admin/ldap_settings')
118
118
119
119
120 #ADMIN SETTINGS REST ROUTES
120 #ADMIN SETTINGS REST ROUTES
121 with routes_map.submapper(path_prefix='/_admin', controller='admin/settings') as m:
121 with routes_map.submapper(path_prefix='/_admin', controller='admin/settings') as m:
122 m.connect("admin_settings", "/settings",
122 m.connect("admin_settings", "/settings",
123 action="create", conditions=dict(method=["POST"]))
123 action="create", conditions=dict(method=["POST"]))
124 m.connect("admin_settings", "/settings",
124 m.connect("admin_settings", "/settings",
125 action="index", conditions=dict(method=["GET"]))
125 action="index", conditions=dict(method=["GET"]))
126 m.connect("formatted_admin_settings", "/settings.{format}",
126 m.connect("formatted_admin_settings", "/settings.{format}",
127 action="index", conditions=dict(method=["GET"]))
127 action="index", conditions=dict(method=["GET"]))
128 m.connect("admin_new_setting", "/settings/new",
128 m.connect("admin_new_setting", "/settings/new",
129 action="new", conditions=dict(method=["GET"]))
129 action="new", conditions=dict(method=["GET"]))
130 m.connect("formatted_admin_new_setting", "/settings/new.{format}",
130 m.connect("formatted_admin_new_setting", "/settings/new.{format}",
131 action="new", conditions=dict(method=["GET"]))
131 action="new", conditions=dict(method=["GET"]))
132 m.connect("/settings/{setting_id}",
132 m.connect("/settings/{setting_id}",
133 action="update", conditions=dict(method=["PUT"]))
133 action="update", conditions=dict(method=["PUT"]))
134 m.connect("/settings/{setting_id}",
134 m.connect("/settings/{setting_id}",
135 action="delete", conditions=dict(method=["DELETE"]))
135 action="delete", conditions=dict(method=["DELETE"]))
136 m.connect("admin_edit_setting", "/settings/{setting_id}/edit",
136 m.connect("admin_edit_setting", "/settings/{setting_id}/edit",
137 action="edit", conditions=dict(method=["GET"]))
137 action="edit", conditions=dict(method=["GET"]))
138 m.connect("formatted_admin_edit_setting", "/settings/{setting_id}.{format}/edit",
138 m.connect("formatted_admin_edit_setting", "/settings/{setting_id}.{format}/edit",
139 action="edit", conditions=dict(method=["GET"]))
139 action="edit", conditions=dict(method=["GET"]))
140 m.connect("admin_setting", "/settings/{setting_id}",
140 m.connect("admin_setting", "/settings/{setting_id}",
141 action="show", conditions=dict(method=["GET"]))
141 action="show", conditions=dict(method=["GET"]))
142 m.connect("formatted_admin_setting", "/settings/{setting_id}.{format}",
142 m.connect("formatted_admin_setting", "/settings/{setting_id}.{format}",
143 action="show", conditions=dict(method=["GET"]))
143 action="show", conditions=dict(method=["GET"]))
144 m.connect("admin_settings_my_account", "/my_account",
144 m.connect("admin_settings_my_account", "/my_account",
145 action="my_account", conditions=dict(method=["GET"]))
145 action="my_account", conditions=dict(method=["GET"]))
146 m.connect("admin_settings_my_account_update", "/my_account_update",
146 m.connect("admin_settings_my_account_update", "/my_account_update",
147 action="my_account_update", conditions=dict(method=["PUT"]))
147 action="my_account_update", conditions=dict(method=["PUT"]))
148 m.connect("admin_settings_create_repository", "/create_repository",
148 m.connect("admin_settings_create_repository", "/create_repository",
149 action="create_repository", conditions=dict(method=["GET"]))
149 action="create_repository", conditions=dict(method=["GET"]))
150
150
151 #ADMIN MAIN PAGES
151 #ADMIN MAIN PAGES
152 with routes_map.submapper(path_prefix='/_admin', controller='admin/admin') as m:
152 with routes_map.submapper(path_prefix='/_admin', controller='admin/admin') as m:
153 m.connect('admin_home', '', action='index')#main page
153 m.connect('admin_home', '', action='index')#main page
154 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}',
154 m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}',
155 action='add_repo')
155 action='add_repo')
156
156
157
157
158 #USER JOURNAL
158 #USER JOURNAL
159 routes_map.connect('journal', '/_admin/journal', controller='journal',)
159 routes_map.connect('journal', '/_admin/journal', controller='journal')
160 routes_map.connect('public_journal', '/_admin/public_journal', controller='journal', action="public_journal")
160 routes_map.connect('public_journal', '/_admin/public_journal', controller='journal', action="public_journal")
161 routes_map.connect('public_journal_rss', '/_admin/public_journal_rss', controller='journal', action="public_journal_rss")
161 routes_map.connect('public_journal_rss', '/_admin/public_journal_rss', controller='journal', action="public_journal_rss")
162 routes_map.connect('public_journal_atom', '/_admin/public_journal_atom', controller='journal', action="public_journal_atom")
162 routes_map.connect('public_journal_atom', '/_admin/public_journal_atom', controller='journal', action="public_journal_atom")
163
163
164 routes_map.connect('toggle_following', '/_admin/toggle_following', controller='journal',
164 routes_map.connect('toggle_following', '/_admin/toggle_following', controller='journal',
165 action='toggle_following', conditions=dict(method=["POST"]))
165 action='toggle_following', conditions=dict(method=["POST"]))
166
166
167
167
168 #SEARCH
168 #SEARCH
169 routes_map.connect('search', '/_admin/search', controller='search',)
169 routes_map.connect('search', '/_admin/search', controller='search')
170 routes_map.connect('search_repo', '/_admin/search/{search_repo:.*}', controller='search')
170 routes_map.connect('search_repo', '/_admin/search/{search_repo:.*}', controller='search')
171
171
172 #LOGIN/LOGOUT/REGISTER/SIGN IN
172 #LOGIN/LOGOUT/REGISTER/SIGN IN
173 routes_map.connect('login_home', '/_admin/login', controller='login')
173 routes_map.connect('login_home', '/_admin/login', controller='login')
174 routes_map.connect('logout_home', '/_admin/logout', controller='login', action='logout')
174 routes_map.connect('logout_home', '/_admin/logout', controller='login', action='logout')
175 routes_map.connect('register', '/_admin/register', controller='login', action='register')
175 routes_map.connect('register', '/_admin/register', controller='login', action='register')
176 routes_map.connect('reset_password', '/_admin/password_reset', controller='login', action='password_reset')
176 routes_map.connect('reset_password', '/_admin/password_reset', controller='login', action='password_reset')
177
177
178 #FEEDS
178 #FEEDS
179 routes_map.connect('rss_feed_home', '/{repo_name:.*}/feed/rss',
179 routes_map.connect('rss_feed_home', '/{repo_name:.*}/feed/rss',
180 controller='feed', action='rss',
180 controller='feed', action='rss',
181 conditions=dict(function=check_repo))
181 conditions=dict(function=check_repo))
182 routes_map.connect('atom_feed_home', '/{repo_name:.*}/feed/atom',
182 routes_map.connect('atom_feed_home', '/{repo_name:.*}/feed/atom',
183 controller='feed', action='atom',
183 controller='feed', action='atom',
184 conditions=dict(function=check_repo))
184 conditions=dict(function=check_repo))
185
185
186
186
187 #REPOSITORY ROUTES
187 #REPOSITORY ROUTES
188 routes_map.connect('changeset_home', '/{repo_name:.*}/changeset/{revision}',
188 routes_map.connect('changeset_home', '/{repo_name:.*}/changeset/{revision}',
189 controller='changeset', revision='tip',
189 controller='changeset', revision='tip',
190 conditions=dict(function=check_repo))
190 conditions=dict(function=check_repo))
191 routes_map.connect('raw_changeset_home', '/{repo_name:.*}/raw-changeset/{revision}',
191 routes_map.connect('raw_changeset_home', '/{repo_name:.*}/raw-changeset/{revision}',
192 controller='changeset', action='raw_changeset', revision='tip',
192 controller='changeset', action='raw_changeset', revision='tip',
193 conditions=dict(function=check_repo))
193 conditions=dict(function=check_repo))
194 routes_map.connect('summary_home', '/{repo_name:.*}',
194 routes_map.connect('summary_home', '/{repo_name:.*}',
195 controller='summary', conditions=dict(function=check_repo))
195 controller='summary', conditions=dict(function=check_repo))
196 routes_map.connect('summary_home', '/{repo_name:.*}/summary',
196 routes_map.connect('summary_home', '/{repo_name:.*}/summary',
197 controller='summary', conditions=dict(function=check_repo))
197 controller='summary', conditions=dict(function=check_repo))
198 routes_map.connect('shortlog_home', '/{repo_name:.*}/shortlog',
198 routes_map.connect('shortlog_home', '/{repo_name:.*}/shortlog',
199 controller='shortlog', conditions=dict(function=check_repo))
199 controller='shortlog', conditions=dict(function=check_repo))
200 routes_map.connect('branches_home', '/{repo_name:.*}/branches',
200 routes_map.connect('branches_home', '/{repo_name:.*}/branches',
201 controller='branches', conditions=dict(function=check_repo))
201 controller='branches', conditions=dict(function=check_repo))
202 routes_map.connect('tags_home', '/{repo_name:.*}/tags',
202 routes_map.connect('tags_home', '/{repo_name:.*}/tags',
203 controller='tags', conditions=dict(function=check_repo))
203 controller='tags', conditions=dict(function=check_repo))
204 routes_map.connect('changelog_home', '/{repo_name:.*}/changelog',
204 routes_map.connect('changelog_home', '/{repo_name:.*}/changelog',
205 controller='changelog', conditions=dict(function=check_repo))
205 controller='changelog', conditions=dict(function=check_repo))
206 routes_map.connect('files_home', '/{repo_name:.*}/files/{revision}/{f_path:.*}',
206 routes_map.connect('files_home', '/{repo_name:.*}/files/{revision}/{f_path:.*}',
207 controller='files', revision='tip', f_path='',
207 controller='files', revision='tip', f_path='',
208 conditions=dict(function=check_repo))
208 conditions=dict(function=check_repo))
209 routes_map.connect('files_diff_home', '/{repo_name:.*}/diff/{f_path:.*}',
209 routes_map.connect('files_diff_home', '/{repo_name:.*}/diff/{f_path:.*}',
210 controller='files', action='diff', revision='tip', f_path='',
210 controller='files', action='diff', revision='tip', f_path='',
211 conditions=dict(function=check_repo))
211 conditions=dict(function=check_repo))
212 routes_map.connect('files_rawfile_home', '/{repo_name:.*}/rawfile/{revision}/{f_path:.*}',
212 routes_map.connect('files_rawfile_home', '/{repo_name:.*}/rawfile/{revision}/{f_path:.*}',
213 controller='files', action='rawfile', revision='tip', f_path='',
213 controller='files', action='rawfile', revision='tip', f_path='',
214 conditions=dict(function=check_repo))
214 conditions=dict(function=check_repo))
215 routes_map.connect('files_raw_home', '/{repo_name:.*}/raw/{revision}/{f_path:.*}',
215 routes_map.connect('files_raw_home', '/{repo_name:.*}/raw/{revision}/{f_path:.*}',
216 controller='files', action='raw', revision='tip', f_path='',
216 controller='files', action='raw', revision='tip', f_path='',
217 conditions=dict(function=check_repo))
217 conditions=dict(function=check_repo))
218 routes_map.connect('files_annotate_home', '/{repo_name:.*}/annotate/{revision}/{f_path:.*}',
218 routes_map.connect('files_annotate_home', '/{repo_name:.*}/annotate/{revision}/{f_path:.*}',
219 controller='files', action='annotate', revision='tip', f_path='',
219 controller='files', action='annotate', revision='tip', f_path='',
220 conditions=dict(function=check_repo))
220 conditions=dict(function=check_repo))
221 routes_map.connect('files_archive_home', '/{repo_name:.*}/archive/{fname}',
221 routes_map.connect('files_archive_home', '/{repo_name:.*}/archive/{fname}',
222 controller='files', action='archivefile',
222 controller='files', action='archivefile',
223 conditions=dict(function=check_repo))
223 conditions=dict(function=check_repo))
224 routes_map.connect('repo_settings_delete', '/{repo_name:.*}/settings',
224 routes_map.connect('repo_settings_delete', '/{repo_name:.*}/settings',
225 controller='settings', action="delete",
225 controller='settings', action="delete",
226 conditions=dict(method=["DELETE"], function=check_repo))
226 conditions=dict(method=["DELETE"], function=check_repo))
227 routes_map.connect('repo_settings_update', '/{repo_name:.*}/settings',
227 routes_map.connect('repo_settings_update', '/{repo_name:.*}/settings',
228 controller='settings', action="update",
228 controller='settings', action="update",
229 conditions=dict(method=["PUT"], function=check_repo))
229 conditions=dict(method=["PUT"], function=check_repo))
230 routes_map.connect('repo_settings_home', '/{repo_name:.*}/settings',
230 routes_map.connect('repo_settings_home', '/{repo_name:.*}/settings',
231 controller='settings', action='index',
231 controller='settings', action='index',
232 conditions=dict(function=check_repo))
232 conditions=dict(function=check_repo))
233
233
234 routes_map.connect('repo_fork_create_home', '/{repo_name:.*}/fork',
234 routes_map.connect('repo_fork_create_home', '/{repo_name:.*}/fork',
235 controller='settings', action='fork_create',
235 controller='settings', action='fork_create',
236 conditions=dict(function=check_repo, method=["POST"]))
236 conditions=dict(function=check_repo, method=["POST"]))
237 routes_map.connect('repo_fork_home', '/{repo_name:.*}/fork',
237 routes_map.connect('repo_fork_home', '/{repo_name:.*}/fork',
238 controller='settings', action='fork',
238 controller='settings', action='fork',
239 conditions=dict(function=check_repo))
239 conditions=dict(function=check_repo))
240
240
241 return routes_map
241 return routes_map
@@ -1,315 +1,312 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="root.html"/>
2 <%inherit file="root.html"/>
3
3
4 <!-- HEADER -->
4 <!-- HEADER -->
5 <div id="header">
5 <div id="header">
6 <!-- user -->
6 <!-- user -->
7 <ul id="logged-user">
7 <ul id="logged-user">
8 <li class="first">
8 <li class="first">
9 <div class="gravatar">
9 <div class="gravatar">
10 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,20)}" />
10 <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_user.email,20)}" />
11 </div>
11 </div>
12 <div class="account">
12 <div class="account">
13 %if c.rhodecode_user.username == 'default':
13 %if c.rhodecode_user.username == 'default':
14 <a href="${h.url('public_journal')}">${_('Public journal')}</a>
14 <a href="${h.url('public_journal')}">${_('Public journal')}</a>
15 %else:
15 %else:
16 ${h.link_to(c.rhodecode_user.username,h.url('admin_settings_my_account'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))}
16 ${h.link_to(c.rhodecode_user.username,h.url('admin_settings_my_account'),title='%s %s'%(c.rhodecode_user.name,c.rhodecode_user.lastname))}
17 %endif
17 %endif
18 </div>
18 </div>
19 </li>
19 </li>
20 <li>
20 <li>
21 <a href="${h.url('home')}">${_('Home')}</a>
21 <a href="${h.url('home')}">${_('Home')}</a>
22 </li>
22 </li>
23 %if c.rhodecode_user.username != 'default':
23 %if c.rhodecode_user.username != 'default':
24 <li>
24 <li>
25 <a href="${h.url('journal')}">${_('Journal')}</a>
25 <a href="${h.url('journal')}">${_('Journal')}</a>
26 ##(${c.unread_journal}
26 ##(${c.unread_journal}
27 </li>
27 </li>
28 %endif
28 %endif
29 %if c.rhodecode_user.username == 'default':
29 %if c.rhodecode_user.username == 'default':
30 <li class="last highlight">${h.link_to(u'Login',h.url('login_home'))}</li>
30 <li class="last highlight">${h.link_to(u'Login',h.url('login_home'))}</li>
31 %else:
31 %else:
32 <li class="last highlight">${h.link_to(u'Log Out',h.url('logout_home'))}</li>
32 <li class="last highlight">${h.link_to(u'Log Out',h.url('logout_home'))}</li>
33 %endif
33 %endif
34 </ul>
34 </ul>
35 <!-- end user -->
35 <!-- end user -->
36 <div id="header-inner" class="title top-left-rounded-corner top-right-rounded-corner">
36 <div id="header-inner" class="title top-left-rounded-corner top-right-rounded-corner">
37 <div id="logo">
37 <div id="logo">
38 <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1>
38 <h1><a href="${h.url('home')}">${c.rhodecode_name}</a></h1>
39 </div>
39 </div>
40 <!-- MENU -->
40 <!-- MENU -->
41 ${self.page_nav()}
41 ${self.page_nav()}
42 <!-- END MENU -->
42 <!-- END MENU -->
43 ${self.body()}
43 ${self.body()}
44 </div>
44 </div>
45 </div>
45 </div>
46 <!-- END HEADER -->
46 <!-- END HEADER -->
47
47
48 <!-- CONTENT -->
48 <!-- CONTENT -->
49 <div id="content">
49 <div id="content">
50 <div class="flash_msg">
50 <div class="flash_msg">
51 <% messages = h.flash.pop_messages() %>
51 <% messages = h.flash.pop_messages() %>
52 % if messages:
52 % if messages:
53 <ul id="flash-messages">
53 <ul id="flash-messages">
54 % for message in messages:
54 % for message in messages:
55 <li class="${message.category}_msg">${message}</li>
55 <li class="${message.category}_msg">${message}</li>
56 % endfor
56 % endfor
57 </ul>
57 </ul>
58 % endif
58 % endif
59 </div>
59 </div>
60 <div id="main">
60 <div id="main">
61 ${next.main()}
61 ${next.main()}
62 </div>
62 </div>
63 </div>
63 </div>
64 <!-- END CONTENT -->
64 <!-- END CONTENT -->
65
65
66 <!-- FOOTER -->
66 <!-- FOOTER -->
67 <div id="footer">
67 <div id="footer">
68 <div id="footer-inner" class="title bottom-left-rounded-corner bottom-right-rounded-corner">
68 <div id="footer-inner" class="title bottom-left-rounded-corner bottom-right-rounded-corner">
69 <div>
69 <div>
70 <p class="footer-link">
70 <p class="footer-link">
71 <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a>
71 <a href="${h.url('bugtracker')}">${_('Submit a bug')}</a>
72 </p>
72 </p>
73 <p class="footer-link">
74 <a href="${h.url('gpl_license')}">${_('GPL license')}</a>
75 </p>
76 <p class="footer-link-right">
73 <p class="footer-link-right">
77 <a href="${h.url('rhodecode_official')}">RhodeCode</a>
74 <a href="${h.url('rhodecode_official')}">RhodeCode</a>
78 ${c.rhodecode_version} &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski
75 ${c.rhodecode_version} &copy; 2010-${h.datetime.today().year} by Marcin Kuzminski
79 </p>
76 </p>
80 </div>
77 </div>
81 </div>
78 </div>
82 <script type="text/javascript">
79 <script type="text/javascript">
83 function tooltip_activate(){
80 function tooltip_activate(){
84 ${h.tooltip.activate()}
81 ${h.tooltip.activate()}
85 }
82 }
86 tooltip_activate();
83 tooltip_activate();
87 </script>
84 </script>
88 </div>
85 </div>
89 <!-- END FOOTER -->
86 <!-- END FOOTER -->
90
87
91 ### MAKO DEFS ###
88 ### MAKO DEFS ###
92 <%def name="page_nav()">
89 <%def name="page_nav()">
93 ${self.menu()}
90 ${self.menu()}
94 </%def>
91 </%def>
95
92
96 <%def name="breadcrumbs()">
93 <%def name="breadcrumbs()">
97 <div class="breadcrumbs">
94 <div class="breadcrumbs">
98 ${self.breadcrumbs_links()}
95 ${self.breadcrumbs_links()}
99 </div>
96 </div>
100 </%def>
97 </%def>
101
98
102
99
103 <%def name="menu(current=None)">
100 <%def name="menu(current=None)">
104 <%
101 <%
105 def is_current(selected):
102 def is_current(selected):
106 if selected == current:
103 if selected == current:
107 return h.literal('class="current"')
104 return h.literal('class="current"')
108 %>
105 %>
109 %if current not in ['home','admin']:
106 %if current not in ['home','admin']:
110 ##REGULAR MENU
107 ##REGULAR MENU
111 <ul id="quick">
108 <ul id="quick">
112 <!-- repo switcher -->
109 <!-- repo switcher -->
113 <li>
110 <li>
114 <a id="repo_switcher" title="${_('Switch repository')}" href="#">
111 <a id="repo_switcher" title="${_('Switch repository')}" href="#">
115 <span class="icon">
112 <span class="icon">
116 <img src="${h.url("/images/icons/database.png")}" alt="${_('Products')}" />
113 <img src="${h.url("/images/icons/database.png")}" alt="${_('Products')}" />
117 </span>
114 </span>
118 <span>&darr;</span>
115 <span>&darr;</span>
119 </a>
116 </a>
120 <ul id="repo_switcher_list" class="repo_switcher">
117 <ul id="repo_switcher_list" class="repo_switcher">
121 <li>
118 <li>
122 <a href="#">${_('loading...')}</a>
119 <a href="#">${_('loading...')}</a>
123 </li>
120 </li>
124 </ul>
121 </ul>
125 <script type="text/javascript">
122 <script type="text/javascript">
126 YUE.on('repo_switcher','mouseover',function(){
123 YUE.on('repo_switcher','mouseover',function(){
127 var loaded = YUD.hasClass('repo_switcher','loaded');
124 var loaded = YUD.hasClass('repo_switcher','loaded');
128 if(!loaded){
125 if(!loaded){
129 YUD.addClass('repo_switcher','loaded');
126 YUD.addClass('repo_switcher','loaded');
130 YAHOO.util.Connect.asyncRequest('GET',"${h.url('repo_switcher')}",{
127 YAHOO.util.Connect.asyncRequest('GET',"${h.url('repo_switcher')}",{
131 success:function(o){
128 success:function(o){
132 YUD.get('repo_switcher_list').innerHTML = o.responseText;
129 YUD.get('repo_switcher_list').innerHTML = o.responseText;
133 },
130 },
134 failure:function(o){
131 failure:function(o){
135 YUD.removeClass('repo_switcher','loaded');
132 YUD.removeClass('repo_switcher','loaded');
136 }
133 }
137 },null);
134 },null);
138 }
135 }
139 return false;
136 return false;
140 });
137 });
141 </script>
138 </script>
142 </li>
139 </li>
143
140
144 <li ${is_current('summary')}>
141 <li ${is_current('summary')}>
145 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}">
142 <a title="${_('Summary')}" href="${h.url('summary_home',repo_name=c.repo_name)}">
146 <span class="icon">
143 <span class="icon">
147 <img src="${h.url("/images/icons/clipboard_16.png")}" alt="${_('Summary')}" />
144 <img src="${h.url("/images/icons/clipboard_16.png")}" alt="${_('Summary')}" />
148 </span>
145 </span>
149 <span>${_('Summary')}</span>
146 <span>${_('Summary')}</span>
150 </a>
147 </a>
151 </li>
148 </li>
152 ##<li ${is_current('shortlog')}>
149 ##<li ${is_current('shortlog')}>
153 ## <a title="${_('Shortlog')}" href="${h.url('shortlog_home',repo_name=c.repo_name)}">
150 ## <a title="${_('Shortlog')}" href="${h.url('shortlog_home',repo_name=c.repo_name)}">
154 ## <span class="icon">
151 ## <span class="icon">
155 ## <img src="${h.url("/images/icons/application_view_list.png")}" alt="${_('Shortlog')}" />
152 ## <img src="${h.url("/images/icons/application_view_list.png")}" alt="${_('Shortlog')}" />
156 ## </span>
153 ## </span>
157 ## <span>${_('Shortlog')}</span>
154 ## <span>${_('Shortlog')}</span>
158 ## </a>
155 ## </a>
159 ##</li>
156 ##</li>
160 <li ${is_current('changelog')}>
157 <li ${is_current('changelog')}>
161 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}">
158 <a title="${_('Changelog')}" href="${h.url('changelog_home',repo_name=c.repo_name)}">
162 <span class="icon">
159 <span class="icon">
163 <img src="${h.url("/images/icons/time.png")}" alt="${_('Changelog')}" />
160 <img src="${h.url("/images/icons/time.png")}" alt="${_('Changelog')}" />
164 </span>
161 </span>
165 <span>${_('Changelog')}</span>
162 <span>${_('Changelog')}</span>
166 </a>
163 </a>
167 </li>
164 </li>
168
165
169 <li ${is_current('switch_to')}>
166 <li ${is_current('switch_to')}>
170 <a title="${_('Switch to')}" href="#">
167 <a title="${_('Switch to')}" href="#">
171 <span class="icon">
168 <span class="icon">
172 <img src="${h.url("/images/icons/arrow_switch.png")}" alt="${_('Switch to')}" />
169 <img src="${h.url("/images/icons/arrow_switch.png")}" alt="${_('Switch to')}" />
173 </span>
170 </span>
174 <span>${_('Switch to')}</span>
171 <span>${_('Switch to')}</span>
175 </a>
172 </a>
176 <ul>
173 <ul>
177 <li>
174 <li>
178 ${h.link_to('%s (%s)' % (_('branches'),len(c.rhodecode_repo.branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
175 ${h.link_to('%s (%s)' % (_('branches'),len(c.rhodecode_repo.branches.values()),),h.url('branches_home',repo_name=c.repo_name),class_='branches childs')}
179 <ul>
176 <ul>
180 %if c.rhodecode_repo.branches.values():
177 %if c.rhodecode_repo.branches.values():
181 %for cnt,branch in enumerate(c.rhodecode_repo.branches.items()):
178 %for cnt,branch in enumerate(c.rhodecode_repo.branches.items()):
182 <li>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li>
179 <li>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=branch[1]))}</li>
183 %endfor
180 %endfor
184 %else:
181 %else:
185 <li>${h.link_to(_('There are no branches yet'),'#')}</li>
182 <li>${h.link_to(_('There are no branches yet'),'#')}</li>
186 %endif
183 %endif
187 </ul>
184 </ul>
188 </li>
185 </li>
189 <li>
186 <li>
190 ${h.link_to('%s (%s)' % (_('tags'),len(c.rhodecode_repo.tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
187 ${h.link_to('%s (%s)' % (_('tags'),len(c.rhodecode_repo.tags.values()),),h.url('tags_home',repo_name=c.repo_name),class_='tags childs')}
191 <ul>
188 <ul>
192 %if c.rhodecode_repo.tags.values():
189 %if c.rhodecode_repo.tags.values():
193 %for cnt,tag in enumerate(c.rhodecode_repo.tags.items()):
190 %for cnt,tag in enumerate(c.rhodecode_repo.tags.items()):
194 <li>${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li>
191 <li>${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=tag[1]))}</li>
195 %endfor
192 %endfor
196 %else:
193 %else:
197 <li>${h.link_to(_('There are no tags yet'),'#')}</li>
194 <li>${h.link_to(_('There are no tags yet'),'#')}</li>
198 %endif
195 %endif
199 </ul>
196 </ul>
200 </li>
197 </li>
201 </ul>
198 </ul>
202 </li>
199 </li>
203 <li ${is_current('files')}>
200 <li ${is_current('files')}>
204 <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
201 <a title="${_('Files')}" href="${h.url('files_home',repo_name=c.repo_name)}">
205 <span class="icon">
202 <span class="icon">
206 <img src="${h.url("/images/icons/file.png")}" alt="${_('Files')}" />
203 <img src="${h.url("/images/icons/file.png")}" alt="${_('Files')}" />
207 </span>
204 </span>
208 <span>${_('Files')}</span>
205 <span>${_('Files')}</span>
209 </a>
206 </a>
210 </li>
207 </li>
211
208
212 <li ${is_current('options')}>
209 <li ${is_current('options')}>
213 <a title="${_('Options')}" href="#">
210 <a title="${_('Options')}" href="#">
214 <span class="icon">
211 <span class="icon">
215 <img src="${h.url("/images/icons/table_gear.png")}" alt="${_('Admin')}" />
212 <img src="${h.url("/images/icons/table_gear.png")}" alt="${_('Admin')}" />
216 </span>
213 </span>
217 <span>${_('Options')}</span>
214 <span>${_('Options')}</span>
218 </a>
215 </a>
219 <ul>
216 <ul>
220 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
217 %if h.HasRepoPermissionAll('repository.admin')(c.repo_name):
221 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
218 %if h.HasPermissionAll('hg.admin')('access settings on repository'):
222 <li>${h.link_to(_('settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
219 <li>${h.link_to(_('settings'),h.url('edit_repo',repo_name=c.repo_name),class_='settings')}</li>
223 %else:
220 %else:
224 <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
221 <li>${h.link_to(_('settings'),h.url('repo_settings_home',repo_name=c.repo_name),class_='settings')}</li>
225 %endif
222 %endif
226 %endif
223 %endif
227 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
224 <li>${h.link_to(_('fork'),h.url('repo_fork_home',repo_name=c.repo_name),class_='fork')}</li>
228 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li>
225 <li>${h.link_to(_('search'),h.url('search_repo',search_repo=c.repo_name),class_='search')}</li>
229
226
230 %if h.HasPermissionAll('hg.admin')('access admin main page'):
227 %if h.HasPermissionAll('hg.admin')('access admin main page'):
231 <li>
228 <li>
232 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
229 ${h.link_to(_('admin'),h.url('admin_home'),class_='admin')}
233 <%def name="admin_menu()">
230 <%def name="admin_menu()">
234 <ul>
231 <ul>
235 <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li>
232 <li>${h.link_to(_('journal'),h.url('admin_home'),class_='journal')}</li>
236 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
233 <li>${h.link_to(_('repositories'),h.url('repos'),class_='repos')}</li>
237 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
234 <li>${h.link_to(_('users'),h.url('users'),class_='users')}</li>
238 <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li>
235 <li>${h.link_to(_('users groups'),h.url('users_groups'),class_='groups')}</li>
239 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
236 <li>${h.link_to(_('permissions'),h.url('edit_permission',id='default'),class_='permissions')}</li>
240 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
237 <li>${h.link_to(_('ldap'),h.url('ldap_home'),class_='ldap')}</li>
241 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
238 <li class="last">${h.link_to(_('settings'),h.url('admin_settings'),class_='settings')}</li>
242 </ul>
239 </ul>
243 </%def>
240 </%def>
244
241
245 ${admin_menu()}
242 ${admin_menu()}
246 </li>
243 </li>
247 %endif
244 %endif
248
245
249 </ul>
246 </ul>
250 </li>
247 </li>
251
248
252 <li>
249 <li>
253 <a title="${_('Followers')}" href="#">
250 <a title="${_('Followers')}" href="#">
254 <span class="icon_short">
251 <span class="icon_short">
255 <img src="${h.url("/images/icons/heart.png")}" alt="${_('Followers')}" />
252 <img src="${h.url("/images/icons/heart.png")}" alt="${_('Followers')}" />
256 </span>
253 </span>
257 <span id="current_followers_count" class="short">${c.repository_followers}</span>
254 <span id="current_followers_count" class="short">${c.repository_followers}</span>
258 </a>
255 </a>
259 </li>
256 </li>
260 <li>
257 <li>
261 <a title="${_('Forks')}" href="#">
258 <a title="${_('Forks')}" href="#">
262 <span class="icon_short">
259 <span class="icon_short">
263 <img src="${h.url("/images/icons/arrow_divide.png")}" alt="${_('Forks')}" />
260 <img src="${h.url("/images/icons/arrow_divide.png")}" alt="${_('Forks')}" />
264 </span>
261 </span>
265 <span class="short">${c.repository_forks}</span>
262 <span class="short">${c.repository_forks}</span>
266 </a>
263 </a>
267 </li>
264 </li>
268
265
269
266
270
267
271 </ul>
268 </ul>
272 %else:
269 %else:
273 ##ROOT MENU
270 ##ROOT MENU
274 <ul id="quick">
271 <ul id="quick">
275 <li>
272 <li>
276 <a title="${_('Home')}" href="${h.url('home')}">
273 <a title="${_('Home')}" href="${h.url('home')}">
277 <span class="icon">
274 <span class="icon">
278 <img src="${h.url("/images/icons/home_16.png")}" alt="${_('Home')}" />
275 <img src="${h.url("/images/icons/home_16.png")}" alt="${_('Home')}" />
279 </span>
276 </span>
280 <span>${_('Home')}</span>
277 <span>${_('Home')}</span>
281 </a>
278 </a>
282 </li>
279 </li>
283 %if c.rhodecode_user.username != 'default':
280 %if c.rhodecode_user.username != 'default':
284 <li>
281 <li>
285 <a title="${_('Journal')}" href="${h.url('journal')}">
282 <a title="${_('Journal')}" href="${h.url('journal')}">
286 <span class="icon">
283 <span class="icon">
287 <img src="${h.url("/images/icons/book.png")}" alt="${_('Journal')}" />
284 <img src="${h.url("/images/icons/book.png")}" alt="${_('Journal')}" />
288 </span>
285 </span>
289 <span>${_('Journal')}</span>
286 <span>${_('Journal')}</span>
290 </a>
287 </a>
291 </li>
288 </li>
292 %endif
289 %endif
293 <li>
290 <li>
294 <a title="${_('Search')}" href="${h.url('search')}">
291 <a title="${_('Search')}" href="${h.url('search')}">
295 <span class="icon">
292 <span class="icon">
296 <img src="${h.url("/images/icons/search_16.png")}" alt="${_('Search')}" />
293 <img src="${h.url("/images/icons/search_16.png")}" alt="${_('Search')}" />
297 </span>
294 </span>
298 <span>${_('Search')}</span>
295 <span>${_('Search')}</span>
299 </a>
296 </a>
300 </li>
297 </li>
301
298
302 %if h.HasPermissionAll('hg.admin')('access admin main page'):
299 %if h.HasPermissionAll('hg.admin')('access admin main page'):
303 <li ${is_current('admin')}>
300 <li ${is_current('admin')}>
304 <a title="${_('Admin')}" href="${h.url('admin_home')}">
301 <a title="${_('Admin')}" href="${h.url('admin_home')}">
305 <span class="icon">
302 <span class="icon">
306 <img src="${h.url("/images/icons/cog_edit.png")}" alt="${_('Admin')}" />
303 <img src="${h.url("/images/icons/cog_edit.png")}" alt="${_('Admin')}" />
307 </span>
304 </span>
308 <span>${_('Admin')}</span>
305 <span>${_('Admin')}</span>
309 </a>
306 </a>
310 ${admin_menu()}
307 ${admin_menu()}
311 </li>
308 </li>
312 %endif
309 %endif
313 </ul>
310 </ul>
314 %endif
311 %endif
315 </%def> No newline at end of file
312 </%def>
@@ -1,49 +1,51 b''
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """
2 """
3 rhodecode.websetup
3 rhodecode.websetup
4 ~~~~~~~~~~~~~~~~~~
4 ~~~~~~~~~~~~~~~~~~
5
5
6 Weboperations and setup for rhodecode
6 Weboperations and setup for rhodecode
7
7
8 :created_on: Dec 11, 2010
8 :created_on: Dec 11, 2010
9 :author: marcink
9 :author: marcink
10 :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
10 :copyright: (C) 2009-2011 Marcin Kuzminski <marcin@python-works.com>
11 :license: GPLv3, see COPYING for more details.
11 :license: GPLv3, see COPYING for more details.
12 """
12 """
13 # This program is free software; you can redistribute it and/or
13 # This program is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU General Public License
14 # modify it under the terms of the GNU General Public License
15 # as published by the Free Software Foundation; version 2
15 # as published by the Free Software Foundation; version 2
16 # of the License or (at your opinion) any later version of the license.
16 # of the License or (at your opinion) any later version of the license.
17 #
17 #
18 # This program is distributed in the hope that it will be useful,
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 # GNU General Public License for more details.
21 # GNU General Public License for more details.
22 #
22 #
23 # You should have received a copy of the GNU General Public License
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
25 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
26 # MA 02110-1301, USA.
26 # MA 02110-1301, USA.
27
27
28 import os
28 import os
29 import logging
29 import logging
30
30
31 from rhodecode.config.environment import load_environment
31 from rhodecode.config.environment import load_environment
32 from rhodecode.lib.db_manage import DbManage
32 from rhodecode.lib.db_manage import DbManage
33
33
34
34
35 log = logging.getLogger(__name__)
35 log = logging.getLogger(__name__)
36
36
37
37 def setup_app(command, conf, vars):
38 def setup_app(command, conf, vars):
38 """Place any commands to setup rhodecode here"""
39 """Place any commands to setup rhodecode here"""
39 dbconf = conf['sqlalchemy.db1.url']
40 dbconf = conf['sqlalchemy.db1.url']
40 dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=conf['here'], tests=False)
41 dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=conf['here'],
42 tests=False)
41 dbmanage.create_tables(override=True)
43 dbmanage.create_tables(override=True)
42 dbmanage.set_db_version()
44 dbmanage.set_db_version()
43 dbmanage.create_settings(dbmanage.config_prompt(None))
45 dbmanage.create_settings(dbmanage.config_prompt(None))
44 dbmanage.create_default_user()
46 dbmanage.create_default_user()
45 dbmanage.admin_prompt()
47 dbmanage.admin_prompt()
46 dbmanage.create_permissions()
48 dbmanage.create_permissions()
47 dbmanage.populate_default_permissions()
49 dbmanage.populate_default_permissions()
48
50
49 load_environment(conf.global_conf, conf.local_conf, initial=True)
51 load_environment(conf.global_conf, conf.local_conf, initial=True)
@@ -1,119 +1,119 b''
1 import sys
1 import sys
2 from rhodecode import get_version
2 from rhodecode import get_version
3 from rhodecode import __platform__
3 from rhodecode import __platform__
4 from rhodecode import __license__
4
5
5 py_version = sys.version_info
6 py_version = sys.version_info
6
7
7 if py_version < (2, 5):
8 if py_version < (2, 5):
8 raise Exception('RhodeCode requires python 2.5 or later')
9 raise Exception('RhodeCode requires python 2.5 or later')
9
10
10 requirements = [
11 requirements = [
11 "Pylons==1.0.0",
12 "Pylons==1.0.0",
12 "WebHelpers>=1.2",
13 "WebHelpers>=1.2",
13 "SQLAlchemy>=0.6.6",
14 "SQLAlchemy>=0.6.6",
14 "Mako>=0.4.0",
15 "Mako>=0.4.0",
15 "vcs>=0.2.0",
16 "vcs>=0.2.0",
16 "pygments>=1.4",
17 "pygments>=1.4",
17 "mercurial>=1.8.1",
18 "mercurial>=1.8.1",
18 "whoosh>=1.8.0",
19 "whoosh>=1.8.0",
19 "celery>=2.2.5",
20 "celery>=2.2.5",
20 "babel",
21 "babel",
21 "python-dateutil>=1.5.0,<2.0.0",
22 "python-dateutil>=1.5.0,<2.0.0",
22 ]
23 ]
23
24
24 classifiers = ['Development Status :: 4 - Beta',
25 classifiers = ['Development Status :: 4 - Beta',
25 'Environment :: Web Environment',
26 'Environment :: Web Environment',
26 'Framework :: Pylons',
27 'Framework :: Pylons',
27 'Intended Audience :: Developers',
28 'Intended Audience :: Developers',
28 'License :: OSI Approved :: BSD License',
29 'Operating System :: OS Independent',
29 'Operating System :: OS Independent',
30 'Programming Language :: Python',
30 'Programming Language :: Python',
31 'Programming Language :: Python :: 2.5',
31 'Programming Language :: Python :: 2.5',
32 'Programming Language :: Python :: 2.6',
32 'Programming Language :: Python :: 2.6',
33 'Programming Language :: Python :: 2.7', ]
33 'Programming Language :: Python :: 2.7', ]
34
34
35 if py_version < (2, 6):
35 if py_version < (2, 6):
36 requirements.append("simplejson")
36 requirements.append("simplejson")
37 requirements.append("pysqlite")
37 requirements.append("pysqlite")
38
38
39 if __platform__ in ('Linux', 'Darwin'):
39 if __platform__ in ('Linux', 'Darwin'):
40 requirements.append("py-bcrypt")
40 requirements.append("py-bcrypt")
41
41
42
42
43 #additional files from project that goes somewhere in the filesystem
43 #additional files from project that goes somewhere in the filesystem
44 #relative to sys.prefix
44 #relative to sys.prefix
45 data_files = []
45 data_files = []
46
46
47 #additional files that goes into package itself
47 #additional files that goes into package itself
48 package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], }
48 package_data = {'rhodecode': ['i18n/*/LC_MESSAGES/*.mo', ], }
49
49
50 description = ('Mercurial repository browser/management with '
50 description = ('Mercurial repository browser/management with '
51 'build in push/pull server and full text search')
51 'build in push/pull server and full text search')
52 keywords = ' '.join(['rhodecode', 'rhodiumcode', 'mercurial', 'git',
52 keywords = ' '.join(['rhodecode', 'rhodiumcode', 'mercurial', 'git',
53 'repository management', 'hgweb replacement'
53 'repository management', 'hgweb replacement'
54 'hgwebdir', 'gitweb replacement', 'serving hgweb', ])
54 'hgwebdir', 'gitweb replacement', 'serving hgweb', ])
55 #long description
55 #long description
56 try:
56 try:
57 readme_file = 'README.rst'
57 readme_file = 'README.rst'
58 changelog_file = 'docs/changelog.rst'
58 changelog_file = 'docs/changelog.rst'
59 long_description = open(readme_file).read() + '\n\n' + \
59 long_description = open(readme_file).read() + '\n\n' + \
60 open(changelog_file).read()
60 open(changelog_file).read()
61
61
62 except IOError, err:
62 except IOError, err:
63 sys.stderr.write("[WARNING] Cannot find file specified as "
63 sys.stderr.write("[WARNING] Cannot find file specified as "
64 "long_description (%s)\n or changelog (%s) skipping that file" \
64 "long_description (%s)\n or changelog (%s) skipping that file" \
65 % (readme_file, changelog_file))
65 % (readme_file, changelog_file))
66 long_description = description
66 long_description = description
67
67
68
68
69 try:
69 try:
70 from setuptools import setup, find_packages
70 from setuptools import setup, find_packages
71 except ImportError:
71 except ImportError:
72 from ez_setup import use_setuptools
72 from ez_setup import use_setuptools
73 use_setuptools()
73 use_setuptools()
74 from setuptools import setup, find_packages
74 from setuptools import setup, find_packages
75 #packages
75 #packages
76 packages = find_packages(exclude=['ez_setup'])
76 packages = find_packages(exclude=['ez_setup'])
77
77
78 setup(
78 setup(
79 name='RhodeCode',
79 name='RhodeCode',
80 version=get_version(),
80 version=get_version(),
81 description=description,
81 description=description,
82 long_description=long_description,
82 long_description=long_description,
83 keywords=keywords,
83 keywords=keywords,
84 license='GPLv3',
84 license=__license__,
85 author='Marcin Kuzminski',
85 author='Marcin Kuzminski',
86 author_email='marcin@python-works.com',
86 author_email='marcin@python-works.com',
87 url='http://rhodecode.org',
87 url='http://rhodecode.org',
88 install_requires=requirements,
88 install_requires=requirements,
89 classifiers=classifiers,
89 classifiers=classifiers,
90 setup_requires=["PasteScript>=1.6.3"],
90 setup_requires=["PasteScript>=1.6.3"],
91 data_files=data_files,
91 data_files=data_files,
92 packages=packages,
92 packages=packages,
93 include_package_data=True,
93 include_package_data=True,
94 test_suite='nose.collector',
94 test_suite='nose.collector',
95 package_data=package_data,
95 package_data=package_data,
96 message_extractors={'rhodecode': [
96 message_extractors={'rhodecode': [
97 ('**.py', 'python', None),
97 ('**.py', 'python', None),
98 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
98 ('templates/**.mako', 'mako', {'input_encoding': 'utf-8'}),
99 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
99 ('templates/**.html', 'mako', {'input_encoding': 'utf-8'}),
100 ('public/**', 'ignore', None)]},
100 ('public/**', 'ignore', None)]},
101 zip_safe=False,
101 zip_safe=False,
102 paster_plugins=['PasteScript', 'Pylons'],
102 paster_plugins=['PasteScript', 'Pylons'],
103 entry_points="""
103 entry_points="""
104 [paste.app_factory]
104 [paste.app_factory]
105 main = rhodecode.config.middleware:make_app
105 main = rhodecode.config.middleware:make_app
106
106
107 [paste.app_install]
107 [paste.app_install]
108 main = pylons.util:PylonsInstaller
108 main = pylons.util:PylonsInstaller
109
109
110 [paste.global_paster_command]
110 [paste.global_paster_command]
111 make-index = rhodecode.lib.indexers:MakeIndex
111 make-index = rhodecode.lib.indexers:MakeIndex
112 upgrade-db = rhodecode.lib.dbmigrate:UpgradeDb
112 upgrade-db = rhodecode.lib.dbmigrate:UpgradeDb
113 celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand
113 celeryd=rhodecode.lib.celerypylons.commands:CeleryDaemonCommand
114 celerybeat=rhodecode.lib.celerypylons.commands:CeleryBeatCommand
114 celerybeat=rhodecode.lib.celerypylons.commands:CeleryBeatCommand
115 camqadm=rhodecode.lib.celerypylons.commands:CAMQPAdminCommand
115 camqadm=rhodecode.lib.celerypylons.commands:CAMQPAdminCommand
116 celeryev=rhodecode.lib.celerypylons.commands:CeleryEventCommand
116 celeryev=rhodecode.lib.celerypylons.commands:CeleryEventCommand
117
117
118 """,
118 """,
119 )
119 )
General Comments 0
You need to be logged in to leave comments. Login now