Show More
@@ -10,10 +10,6 b' hgext.highlight=' | |||
|
10 | 10 | push_ssl = false |
|
11 | 11 | allow_archive = gz zip bz2 |
|
12 | 12 | allow_push = * |
|
13 | templates=/home/marcink/python_workspace/hg_app/pylons_app/templates/ | |
|
14 | style = monoblue_custom | |
|
15 | pygments_style = trac | |
|
16 | staticurl = /hg_static/ | |
|
17 | 13 | baseurl = / |
|
18 | 14 | |
|
19 | 15 | [paths] |
@@ -83,11 +83,11 b' class LoginRequired(object):' | |||
|
83 | 83 | pass |
|
84 | 84 | |
|
85 | 85 | def __call__(self, func): |
|
86 | log.info('Checking login required') | |
|
86 | user = session.get('hg_app_user', AuthUser()) | |
|
87 | log.info('Checking login required for %s', user.username) | |
|
87 | 88 | |
|
88 | 89 | @wraps(func) |
|
89 | 90 | def _wrapper(*fargs, **fkwargs): |
|
90 | user = session.get('hg_app_user', AuthUser()) | |
|
91 | 91 | if user.is_authenticated: |
|
92 | 92 | log.info('user %s is authenticated', user.username) |
|
93 | 93 | func(*fargs) |
@@ -65,6 +65,7 b' class SimpleHg(object):' | |||
|
65 | 65 | """we know that some change was made to repositories and we should |
|
66 | 66 | invalidate the cache to see the changes right away""" |
|
67 | 67 | invalidate_cache('full_changelog', repo_name) |
|
68 | invalidate_cache('cached_repo_list') | |
|
68 | 69 | return app(environ, start_response) |
|
69 | 70 | |
|
70 | 71 | def _make_app(self): |
@@ -91,10 +91,12 b" def make_ui(path='hgwebdir.config', chec" | |||
|
91 | 91 | return baseui |
|
92 | 92 | |
|
93 | 93 | def invalidate_cache(name, *args): |
|
94 | """Invalidates given name cache""" | |
|
95 | ||
|
94 | 96 | from beaker.cache import region_invalidate |
|
95 | 97 | log.info('INVALIDATING CACHE FOR %s', name) |
|
96 | 98 | |
|
97 |
"""propage |
|
|
99 | """propagate our arguments to make sure invalidation works. First | |
|
98 | 100 | argument has to be the name of cached func name give to cache decorator |
|
99 | 101 | without that the invalidation would not work""" |
|
100 | 102 | tmp = [name] |
General Comments 0
You need to be logged in to leave comments.
Login now