0001-do-not-redirect-user-on-undefined-redirect-url.patch
usr/local/univnautes/sp/sp/views.py | ||
---|---|---|
34 | 34 |
def get_context_data(self, *args, **kwargs): |
35 | 35 |
context = super(Homepage, self).get_context_data(*args, **kwargs) |
36 | 36 |
url, delay = get_redirect_params() |
37 |
context.update({'redirect_url': url, |
|
38 |
'redirect_delay': delay}) |
|
39 |
if not url: |
|
40 |
return context |
|
37 | 41 |
if url == 'next_url': |
38 | 42 |
url = self.request.COOKIES.get(url, '') |
39 | 43 |
url = Template(url).render(Context(context)) |
40 |
context.update({'redirect_url': url, |
|
41 |
'redirect_delay': delay}) |
|
44 |
context['redirect_url'] = url |
|
42 | 45 |
return context |
43 | 46 | |
44 | 47 |
homepage = login_required(Homepage.as_view()) |
45 |
- |