0001-theme-do-not-be-overly-confident-about-select-post-p.patch
hobo/theme/views.py | ||
---|---|---|
58 | 58 |
permanent = False |
59 | 59 | |
60 | 60 |
def get_redirect_url(self): |
61 |
if self.request.method == 'POST': |
|
61 |
if self.request.method == 'POST' and 'theme' in self.request.POST:
|
|
62 | 62 |
set_theme(self.request.POST['theme']) |
63 | 63 |
messages.info( |
64 | 64 |
self.request, _('The theme has been changed, it will soon be visible on the sites.') |
tests/test_theme.py | ||
---|---|---|
62 | 62 |
app = login(app) |
63 | 63 |
resp = app.get('/theme/select') |
64 | 64 |
assert resp.location == '/theme/' |
65 |
resp = resp.follow() |
|
66 |
resp.form.submit() |
|
65 |
- |