Show More
@@ -15,7 +15,7 b' import pylons_app.lib.helpers' | |||
|
15 | 15 | |
|
16 | 16 | log = logging.getLogger(__name__) |
|
17 | 17 | |
|
18 | def load_environment(global_conf, app_conf): | |
|
18 | def load_environment(global_conf, app_conf, initial=False): | |
|
19 | 19 | """Configure the Pylons environment via the ``pylons.config`` |
|
20 | 20 | object |
|
21 | 21 | """ |
@@ -63,7 +63,7 b' def load_environment(global_conf, app_co' | |||
|
63 | 63 | init_model(sa_engine_db1) |
|
64 | 64 | config['pylons.app_globals'].baseui = make_ui('db') |
|
65 | 65 | |
|
66 | repo2db_mapper(_get_repos_cached_initial(config['pylons.app_globals'])) | |
|
66 | repo2db_mapper(_get_repos_cached_initial(config['pylons.app_globals'], initial)) | |
|
67 | 67 | set_available_permissions(config) |
|
68 | 68 | set_base_path(config) |
|
69 | 69 | set_hg_app_config(config) |
@@ -16,6 +16,11 b'' | |||
|
16 | 16 | # along with this program; if not, write to the Free Software |
|
17 | 17 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
|
18 | 18 | # MA 02110-1301, USA. |
|
19 | """ | |
|
20 | Created on April 7, 2010 | |
|
21 | admin controller for pylons | |
|
22 | @author: marcink | |
|
23 | """ | |
|
19 | 24 | from formencode import htmlfill |
|
20 | 25 | from operator import itemgetter |
|
21 | 26 | from pylons import request, response, session, tmpl_context as c, url |
@@ -31,11 +36,8 b' from pylons_app.model.repo_model import ' | |||
|
31 | 36 | import formencode |
|
32 | 37 | import logging |
|
33 | 38 | import traceback |
|
34 | """ | |
|
35 | Created on April 7, 2010 | |
|
36 | admin controller for pylons | |
|
37 | @author: marcink | |
|
38 | """ | |
|
39 | from paste.httpexceptions import HTTPInternalServerError | |
|
40 | ||
|
39 | 41 | log = logging.getLogger(__name__) |
|
40 | 42 | |
|
41 | 43 | class ReposController(BaseController): |
@@ -130,7 +132,6 b' class ReposController(BaseController):' | |||
|
130 | 132 | h.flash(_('error occured during update of repository %s') \ |
|
131 | 133 | % repo_name, category='error') |
|
132 | 134 | |
|
133 | ||
|
134 | 135 | return redirect(url('edit_repo', repo_name=changed_name)) |
|
135 | 136 | |
|
136 | 137 | def delete(self, repo_name): |
@@ -174,7 +175,7 b' class ReposController(BaseController):' | |||
|
174 | 175 | except Exception as e: |
|
175 | 176 | h.flash(_('An error occured during deletion of repository user'), |
|
176 | 177 | category='error') |
|
177 | ||
|
178 | raise HTTPInternalServerError() | |
|
178 | 179 | |
|
179 | 180 | def show(self, repo_name, format='html'): |
|
180 | 181 | """GET /repos/repo_name: Show a specific item""" |
@@ -72,7 +72,6 b' class SummaryController(BaseController):' | |||
|
72 | 72 | def __get_commit_stats(self, repo): |
|
73 | 73 | aggregate = OrderedDict() |
|
74 | 74 | |
|
75 | ||
|
76 | 75 | #graph range |
|
77 | 76 | td = datetime.today() |
|
78 | 77 | y = td.year |
@@ -80,23 +79,7 b' class SummaryController(BaseController):' | |||
|
80 | 79 | d = td.day |
|
81 | 80 | c.ts_min = mktime((y, (td - timedelta(days=calendar.mdays[m] - 1)).month, d, 0, 0, 0, 0, 0, 0,)) |
|
82 | 81 | c.ts_max = mktime((y, m, d, 0, 0, 0, 0, 0, 0,)) |
|
83 | ||
|
84 | ||
|
85 | # #generate this monhts keys | |
|
86 | # dates_range = OrderedDict() | |
|
87 | # year_range = range(2010, datetime.today().year + 1) | |
|
88 | # month_range = range(1, datetime.today().month + 1) | |
|
89 | # | |
|
90 | # | |
|
91 | # | |
|
92 | # for y in year_range: | |
|
93 | # for m in month_range: | |
|
94 | # for d in range(1, calendar.mdays[m] + 1): | |
|
95 | # k = '%s-%s-%s' % (y, m, d) | |
|
96 | # timetupple = [int(x) for x in k.split('-')] | |
|
97 | # timetupple.extend([0 for _ in xrange(6)]) | |
|
98 | # k = mktime(timetupple) | |
|
99 | # dates_range[k] = 0 | |
|
82 | ||
|
100 | 83 | |
|
101 | 84 | def author_key_cleaner(k): |
|
102 | 85 | k = person(k) |
General Comments 0
You need to be logged in to leave comments.
Login now