Introduction to Django Middleware (Django Tutorial) | Part 25

  Рет қаралды 41,116

Max Goodridge

Max Goodridge

Күн бұрын

Пікірлер: 20
@usedbandage9
@usedbandage9 8 жыл бұрын
Your 4 videos on middleware were excellent. Exactly what I needed. Was able to add this logic into my own project, just jumping into this middle part of your series. Thanks!
@chrisbabayans9354
@chrisbabayans9354 3 жыл бұрын
MOST CLEAR AND CONCISE TUTORIAL EVER
@OriginalPhil
@OriginalPhil 7 жыл бұрын
In an English accent, the word "middleware" sounds like it would be a location on Game of Thrones.
@АлёнаШтрудель
@АлёнаШтрудель 6 жыл бұрын
Thank you for your amazing videos! I'm in the middle of my graduation work at the university now and it's so easy and interesting thanks to you! Now I even think to work with Django in the future. :)
@Lupo9
@Lupo9 6 жыл бұрын
I'm going to start my graduation work with django soon and am watching this too. Did yours go well?
@murshidhaniffa3645
@murshidhaniffa3645 3 жыл бұрын
where can i find the next part of this video
@cristobalvargas9633
@cristobalvargas9633 8 жыл бұрын
thank you. first clear explanation i see
@saidmamadgulomshoev3068
@saidmamadgulomshoev3068 6 жыл бұрын
Hello, Max and folks! I have got below error and I need you help: TypeError at / 'LoginRequiredMiddleware' object is not callable I have searched in Internet and in StackOverflow in one place it says that you should specify the full path. I did everything but still the error is not rectified. Looking to hearing from you! Thanks in advance!
@saidmamadgulomshoev3068
@saidmamadgulomshoev3068 6 жыл бұрын
I found it! You have to write there like below (for those who have the same issue): class LoginRequiredMiddleware: def __init__(self, get_response): self.get_response = get_response
@jonosuav
@jonosuav 6 жыл бұрын
Are you saying this is what it should look like? As is I'm still getting, "TypeError at / 'LoginRequiredMiddleware' object is not callable" from django.conf import settings class LoginRequiredMiddleware: def __init__(self, get_response): self.get_response = get_response
@pageman3910
@pageman3910 5 жыл бұрын
I was having the same issue and was able to resolve by using the sample given in: docs.djangoproject.com/en/3.0/topics/http/middleware/ def simple_middleware(get_response): # One-time configuration and initialization. def middleware(request): # Code to be executed for each request before # the view (and later middleware) are called. response = get_response(request) # Code to be executed for each request/response after # the view is called. return response return middleware
@utkarshshukla4704
@utkarshshukla4704 6 жыл бұрын
On creating LoginRequiredMiddleware and adding settings.py django.middleware.LoginRequiredMiddleware when i am running project i am getting error on the webpage as A server error occurred please contact the administrator please help me to resolve this error out
@987edo
@987edo 7 жыл бұрын
Hello Max, class LoginRequiredMiddleware: def __init__(self): pass gives no error, when I add get_response, I receive TypeError: __init__() takes exactly 2 arguments (1 given) Python 2.7.13 Django 1.11.1 Thank you
@ralouekapoor
@ralouekapoor 6 жыл бұрын
did you see the end of the video
@namesare4fools
@namesare4fools 5 жыл бұрын
for those whos using django 2.2 above #middleware.py class LoginRequiredMiddleware(object): def __init__(self,get_response): self.get_response = get_response pass def __call__(self, request): response = self.get_response(request) return response
@josephturi
@josephturi 7 жыл бұрын
Hi Max! I downloaded the final code from your github, but when I want to run it I get this error: File "C:\Users\HOME1\AppData\Local\Programs\Python\Python36\lib\site-packages\django\conf\__init__.py", line 129, in __init__ raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.") django.core.exceptions.ImproperlyConfigured: The SECRET_KEY setting must not be empty. Of course there is a SECRET_KEY in your settings.py, I just don't understand why it is not running for me. I'm using Python 3.6.1 with >>> django.VERSION (1, 11, 1, 'final', 0) btw great videos, keep up the good work! : )
@karurudilli549
@karurudilli549 5 жыл бұрын
not working this middleware for me
@chuckynorris616
@chuckynorris616 6 жыл бұрын
Not all methods in a class take self, it can take cls if its a class method
@besllu8116
@besllu8116 6 жыл бұрын
Nice video, even tho I needed to set speed on 1.5 to enjoy it. Thanks.
Django Middleware
56:19
Very Academy
Рет қаралды 25 М.
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
Мен атып көрмегенмін ! | Qalam | 5 серия
25:41
*Args and **Kwargs in Python
3:49
b001
Рет қаралды 294 М.
Django Middleware - что это, зачем и как использовать
14:48
Диджитализируй!
Рет қаралды 49 М.
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН