32 lines
803 B
Python
32 lines
803 B
Python
from django.shortcuts import render
|
|
|
|
from uuid import uuid1
|
|
from AuthApp.models import *
|
|
from django.contrib import auth
|
|
from django.http import HttpResponse, Http404, JsonResponse
|
|
from django.template import loader, RequestContext
|
|
from django.contrib.auth.decorators import login_required
|
|
from BaseModels.mailSender import techSendMail
|
|
from django.utils.translation import gettext as _
|
|
from datetime import datetime
|
|
|
|
def registration_ajax(request):
|
|
if request.method != 'POST':
|
|
raise Http404
|
|
|
|
try:
|
|
|
|
data = request.POST
|
|
|
|
res_data = {
|
|
'errors': 'тестовый верный ответ'
|
|
}
|
|
|
|
except Exception as e:
|
|
|
|
res_data = {
|
|
'errors': f'ошибка в запросе = {str(e)}'
|
|
}
|
|
|
|
|
|
return JsonResponse(res_data) |