Last change
on this file since 75ea229 was 59b2e9c, checked in by ManuelTrajcev <manueltrajcev7@…>, 2 weeks ago |
querry mostr popular artist per customer for each genre
|
-
Property mode
set to
100644
|
File size:
374 bytes
|
Line | |
---|
1 | from django.shortcuts import redirect
|
---|
2 | from django.http import Http404
|
---|
3 |
|
---|
4 | class Redirect404ToHomeMiddleware:
|
---|
5 | def __init__(self, get_response):
|
---|
6 | self.get_response = get_response
|
---|
7 |
|
---|
8 | def __call__(self, request):
|
---|
9 | try:
|
---|
10 | response = self.get_response(request)
|
---|
11 | return response
|
---|
12 | except Http404:
|
---|
13 | return redirect('homepage')
|
---|
Note:
See
TracBrowser
for help on using the repository browser.