# Filename  : middlwrare.py
# Date  : 2018/9/19
from django.utils.deprecation import MiddlewareMixin

from users.models import MyUser


class UerAuthMiddlwrare(MiddlewareMixin):
	def process_request(self, request):
		user = MyUser.objects.get(username='admin')
		request.user = user
		return None