0.12.28 localization routines
This commit is contained in:
@@ -15,12 +15,16 @@ from django.template.loader import render_to_string
|
||||
from django.urls import reverse
|
||||
from .forms import *
|
||||
from .funcs import *
|
||||
from GeneralApp.funcs import get_and_set_lang
|
||||
|
||||
|
||||
|
||||
def del_route_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
try:
|
||||
|
||||
data = json.loads(request.body)
|
||||
@@ -54,6 +58,8 @@ def edit_route_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
data = json.loads(request.body)
|
||||
|
||||
Dict = {}
|
||||
@@ -99,6 +105,8 @@ def new_route_view_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
# form = RouteForm()
|
||||
# Dict = {
|
||||
# 'form': form
|
||||
@@ -132,6 +140,8 @@ def find_routes_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
try:
|
||||
|
||||
|
||||
@@ -175,6 +185,8 @@ def get_my_routes_ajax(request):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
try:
|
||||
routes_Dict = get_routes_Dict(request.user)
|
||||
if 'errors' in routes_Dict:
|
||||
@@ -206,6 +218,8 @@ def create_or_change_route_ajax(request, route_id=None):
|
||||
if request.method != 'POST':
|
||||
raise Http404
|
||||
|
||||
lang = get_and_set_lang(request)
|
||||
|
||||
Dict = {}
|
||||
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user