0.12.28 localization routines
This commit is contained in:
@@ -18,7 +18,7 @@ from django.core.files import File
|
||||
import base64
|
||||
from django.core.validators import validate_email
|
||||
from django.urls import reverse
|
||||
|
||||
from GeneralApp.funcs import get_and_set_lang
|
||||
|
||||
# @login_required(login_url='/profile/login/')
|
||||
# def subscribe_ajax(request):
|
||||
@@ -36,6 +36,8 @@ def mailing_subscribe_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
try:
|
||||
|
||||
email = request.POST['email']
|
||||
@@ -80,6 +82,8 @@ def send_message_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
try:
|
||||
|
||||
data = request.POST
|
||||
@@ -212,6 +216,8 @@ def chats_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
from ChatServiceApp.funcs import get_chat_receivers_for_user, get_msgs_for_chat_w_users
|
||||
|
||||
receivers, unread_msgs_count = get_chat_receivers_for_user(request.user)
|
||||
@@ -242,6 +248,8 @@ def support_tickets_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
html = get_profile_support_page_content_html(request)
|
||||
|
||||
return JsonResponse({'html': html}, status=200)
|
||||
@@ -255,6 +263,8 @@ def change_avatar_confirm_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
try:
|
||||
|
||||
file_data = json.loads(request.body)
|
||||
@@ -281,6 +291,8 @@ def change_profile_confirm_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
data = request.POST
|
||||
if not data:
|
||||
data = json.loads(request.body)
|
||||
@@ -354,6 +366,8 @@ def dashboard_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
try:
|
||||
|
||||
from .funcs import get_dashboard_page_content_html
|
||||
@@ -372,6 +386,7 @@ def change_profile_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
html = get_profile_change_page_content_html(request)
|
||||
return JsonResponse({'html': html}, status=200)
|
||||
@@ -382,6 +397,8 @@ def my_routes_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
Dict = {
|
||||
}
|
||||
|
||||
@@ -396,6 +413,8 @@ def login_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
try:
|
||||
|
||||
data = request.POST
|
||||
@@ -483,6 +502,9 @@ def registration_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
from GeneralApp.funcs import get_and_set_lang
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
try:
|
||||
|
||||
data = request.POST
|
||||
|
||||
Reference in New Issue
Block a user