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!
@chrisbabayans93543 жыл бұрын
MOST CLEAR AND CONCISE TUTORIAL EVER
@OriginalPhil7 жыл бұрын
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. :)
@Lupo96 жыл бұрын
I'm going to start my graduation work with django soon and am watching this too. Did yours go well?
@murshidhaniffa36453 жыл бұрын
where can i find the next part of this video
@cristobalvargas96338 жыл бұрын
thank you. first clear explanation i see
@saidmamadgulomshoev30686 жыл бұрын
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!
@saidmamadgulomshoev30686 жыл бұрын
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
@jonosuav6 жыл бұрын
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
@pageman39105 жыл бұрын
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
@utkarshshukla47046 жыл бұрын
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
@987edo7 жыл бұрын
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
@ralouekapoor6 жыл бұрын
did you see the end of the video
@namesare4fools5 жыл бұрын
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
@josephturi7 жыл бұрын
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! : )
@karurudilli5495 жыл бұрын
not working this middleware for me
@chuckynorris6166 жыл бұрын
Not all methods in a class take self, it can take cls if its a class method
@besllu81166 жыл бұрын
Nice video, even tho I needed to set speed on 1.5 to enjoy it. Thanks.