Answer the question
In order to leave comments, you need to log in
When starting a django application with apache2, the view stops working, giving 500. How to fix it?
I use DRF with TokenAuthentication, when the raw application is running, everything works good, everything saves, everything connects. Scheme of work:
serializer.save() # сохраня. объект
profile = Profile.objects.get(id=request.user.id)#беру текущего юзера
created = Rater.objects.latest('name')# беру последний созданный объект Rater
profile.raters.add(created) #добавля. пользователю
profile.save() сохраняю пользователя(апдейт)
500 DoesNotExist at /v1/raters/↵Profile matching query does not exist.
profile = Profile.objects.get(id=request.user.id)
Answer the question
In order to leave comments, you need to log in
I will duplicate the answer here:
It was necessary to add WSGIPassAuthorization On to the Apache config, without which Apache cuts off the header with authorization.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question