Show More
@@ -270,7 +270,7 b' class GistView(BaseAppView):' | |||
|
270 | 270 | @view_config( |
|
271 | 271 | route_name='gist_show_formatted_path', request_method='GET', |
|
272 | 272 | renderer=None) |
|
273 | def show(self): | |
|
273 | def gist_show(self): | |
|
274 | 274 | gist_id = self.request.matchdict['gist_id'] |
|
275 | 275 | |
|
276 | 276 | # TODO(marcink): expose those via matching dict |
@@ -43,7 +43,7 b' def includeme(config):' | |||
|
43 | 43 | |
|
44 | 44 | config.add_route( |
|
45 | 45 | name='my_account_password_update', |
|
46 | pattern=ADMIN_PREFIX + '/my_account/password') | |
|
46 | pattern=ADMIN_PREFIX + '/my_account/password/update') | |
|
47 | 47 | |
|
48 | 48 | # my account tokens |
|
49 | 49 | config.add_route( |
@@ -37,6 +37,8 b' def route_path(name, **kwargs):' | |||
|
37 | 37 | 'home': '/', |
|
38 | 38 | 'my_account_password': |
|
39 | 39 | ADMIN_PREFIX + '/my_account/password', |
|
40 | 'my_account_password_update': | |
|
41 | ADMIN_PREFIX + '/my_account/password/update', | |
|
40 | 42 | }[name].format(**kwargs) |
|
41 | 43 | |
|
42 | 44 | |
@@ -58,7 +60,8 b' class TestMyAccountPassword(TestControll' | |||
|
58 | 60 | ('__end__', 'new_password:mapping'), |
|
59 | 61 | ('csrf_token', self.csrf_token), |
|
60 | 62 | ] |
|
61 | response = self.app.post(route_path('my_account_password'), form_data).follow() | |
|
63 | response = self.app.post( | |
|
64 | route_path('my_account_password_update'), form_data).follow() | |
|
62 | 65 | assert 'Successfully updated password' in response |
|
63 | 66 | |
|
64 | 67 | # check_password depends on user being in session |
@@ -91,7 +94,8 b' class TestMyAccountPassword(TestControll' | |||
|
91 | 94 | ('__end__', 'new_password:mapping'), |
|
92 | 95 | ('csrf_token', self.csrf_token), |
|
93 | 96 | ] |
|
94 | response = self.app.post(route_path('my_account_password'), form_data) | |
|
97 | response = self.app.post( | |
|
98 | route_path('my_account_password_update'), form_data) | |
|
95 | 99 | |
|
96 | 100 | assert_response = response.assert_response() |
|
97 | 101 | assert assert_response.get_elements('.error-block') |
@@ -109,7 +113,8 b' class TestMyAccountPassword(TestControll' | |||
|
109 | 113 | ('__end__', 'new_password:mapping'), |
|
110 | 114 | ('csrf_token', self.csrf_token), |
|
111 | 115 | ] |
|
112 | response = self.app.post(route_path('my_account_password'), form_data) | |
|
116 | response = self.app.post( | |
|
117 | route_path('my_account_password_update'), form_data) | |
|
113 | 118 | assert_session_flash( |
|
114 | 119 | response, 'Error occurred during update of user password') |
|
115 | 120 | |
@@ -129,7 +134,8 b' class TestMyAccountPassword(TestControll' | |||
|
129 | 134 | ('__end__', 'new_password:mapping'), |
|
130 | 135 | ('csrf_token', self.csrf_token), |
|
131 | 136 | ] |
|
132 | self.app.post(route_path('my_account_password'), form_data) | |
|
137 | self.app.post( | |
|
138 | route_path('my_account_password_update'), form_data) | |
|
133 | 139 | |
|
134 | 140 | response = self.app.get(route_path('home')) |
|
135 | 141 | session = response.get_session_from_response() |
@@ -90,7 +90,9 b' class MyAccountView(BaseAppView, DataGri' | |||
|
90 | 90 | username=c.user.username) |
|
91 | 91 | |
|
92 | 92 | form = forms.Form( |
|
93 | schema, buttons=(forms.buttons.save, forms.buttons.reset)) | |
|
93 | schema, | |
|
94 | action=h.route_path('my_account_password_update'), | |
|
95 | buttons=(forms.buttons.save, forms.buttons.reset)) | |
|
94 | 96 | |
|
95 | 97 | c.form = form |
|
96 | 98 | return self._get_template_context(c) |
@@ -99,7 +101,7 b' class MyAccountView(BaseAppView, DataGri' | |||
|
99 | 101 | @NotAnonymous() |
|
100 | 102 | @CSRFRequired() |
|
101 | 103 | @view_config( |
|
102 | route_name='my_account_password', request_method='POST', | |
|
104 | route_name='my_account_password_update', request_method='POST', | |
|
103 | 105 | renderer='rhodecode:templates/admin/my_account/my_account.mako') |
|
104 | 106 | def my_account_password_update(self): |
|
105 | 107 | _ = self.request.translate |
@@ -162,6 +162,9 b' class RepoSummaryView(RepoAppView):' | |||
|
162 | 162 | @view_config( |
|
163 | 163 | route_name='repo_summary_slash', request_method='GET', |
|
164 | 164 | renderer='rhodecode:templates/summary/summary.mako') |
|
165 | @view_config( | |
|
166 | route_name='repo_summary_explicit', request_method='GET', | |
|
167 | renderer='rhodecode:templates/summary/summary.mako') | |
|
165 | 168 | def summary(self): |
|
166 | 169 | c = self.load_default_context() |
|
167 | 170 |
@@ -39,7 +39,7 b' class UserProfileView(BaseAppView):' | |||
|
39 | 39 | @view_config( |
|
40 | 40 | route_name='user_profile', request_method='GET', |
|
41 | 41 | renderer='rhodecode:templates/users/user.mako') |
|
42 |
def |
|
|
42 | def user_profile(self): | |
|
43 | 43 | # register local template context |
|
44 | 44 | c = self._get_local_tmpl_context() |
|
45 | 45 | c.active = 'user_profile' |
General Comments 0
You need to be logged in to leave comments.
Login now