Skip to content

Instantly share code, notes, and snippets.

View Runinterface's full-sized avatar

Runinterface Runinterface

  • runinterface@gmail.com
  • Unknown
View GitHub Profile
from rest_framework import status
from rest_framework.response import Response
from rest_framework.decorators import api_view
from orders.models import Menu, Courier, Order, Reviews, News
from orders.serializers import MenuSerializer, CouriersSerializer, OrderSerializer, OrderStatusSerializer, ReviewsSerializer, NewsSerializer
from rest_registration.models import User
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
from django.contrib.auth import get_user_model
from django.contrib.auth.password_validation import validate_password
from rest_framework import serializers
from rest_framework.exceptions import ValidationError
from rest_registration.settings import registration_settings
from rest_registration.utils import (
authenticate_by_login_and_password_or_none,
get_user_setting
)