0.7.59
localization for ajax
This commit is contained in:
16
TWB/urls.py
16
TWB/urls.py
@@ -10,6 +10,16 @@ urlpatterns = [
|
||||
path('i18n/', include('django.conf.urls.i18n')),
|
||||
|
||||
path('messages/', include('ChatServiceApp.urls')),
|
||||
|
||||
path('user_account/', include('AuthApp.js_urls')),
|
||||
|
||||
path('routes/', include('RoutesApp.js_urls')),
|
||||
|
||||
path('subscribes/', include('SubscribesApp.js_urls')),
|
||||
|
||||
path('messages/', include('ChatServiceApp.js_urls')),
|
||||
|
||||
path('reference_data/', include('ReferenceDataApp.js_urls')),
|
||||
]
|
||||
|
||||
from django.conf.urls.i18n import i18n_patterns
|
||||
@@ -19,16 +29,10 @@ urlpatterns += i18n_patterns(
|
||||
path('', include('GeneralApp.urls')),
|
||||
path('profile/', include('AuthApp.urls')),
|
||||
|
||||
path('user_account/', include('AuthApp.js_urls')),
|
||||
|
||||
path('routes/', include('RoutesApp.js_urls')),
|
||||
path('routes/', include('RoutesApp.urls')),
|
||||
|
||||
path('subscribes/', include('SubscribesApp.js_urls')),
|
||||
|
||||
path('messages/', include('ChatServiceApp.js_urls')),
|
||||
|
||||
path('reference_data/', include('ReferenceDataApp.js_urls')),
|
||||
|
||||
path('', include('ArticlesApp.urls_translate')),
|
||||
path('', include('ArticlesApp.js_urls')),
|
||||
|
||||
@@ -9,7 +9,7 @@ function SendLoginForm(el){
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/login/',
|
||||
url: '/user_account/login/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
|
||||
@@ -40,7 +40,7 @@ function load_routes (el,news=null) {
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: `/ru/${url_ajax}`,
|
||||
url: `/${url_ajax}`,
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
|
||||
@@ -59,7 +59,7 @@ function ajax_for_filter (data_d,get_url){
|
||||
}
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/routes/find_routes/',
|
||||
url: '/routes/find_routes/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
|
||||
@@ -5,7 +5,7 @@ function SendRegistrationForm(el){
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/registration/',
|
||||
url: '/user_account/registration/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
function writeMessage(el){
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/chats/',
|
||||
url: '/user_account/chats/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -34,7 +34,7 @@ function writeMessage(el){
|
||||
function technicalSupport(el){
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/support_tickets/',
|
||||
url: '/user_account/support_tickets/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -67,7 +67,7 @@ function mySubscription(el){
|
||||
// boris changed
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/subscribes/show_cur_subscribe/',
|
||||
url: '/subscribes/show_cur_subscribe/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -100,7 +100,7 @@ function mySubscription(el){
|
||||
function myProfile(el){
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/change_profile/',
|
||||
url: '/user_account/change_profile/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -156,7 +156,7 @@ function removeRoute(el) {
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/routes/del_route/',
|
||||
url: '/routes/del_route/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -278,7 +278,7 @@ function searchTown(el){
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/reference_data/get_address_point/',
|
||||
url: '/reference_data/get_address_point/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -487,9 +487,9 @@ function sendRoute(el, routeID = null){
|
||||
|
||||
}else{}
|
||||
|
||||
let url = '/ru/routes/create_or_change_route/'
|
||||
let url = '/routes/create_or_change_route/'
|
||||
if (routeID !== null){
|
||||
url = '/ru/routes/change_route/' + routeID + '/'
|
||||
url = '/routes/change_route/' + routeID + '/'
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
@@ -553,7 +553,7 @@ function OnSelectionChange(el) {
|
||||
|
||||
$.ajax({
|
||||
headers: {"X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val()},
|
||||
url: '/ru/user_account/new_route_view/',
|
||||
url: '/user_account/new_route_view/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -592,7 +592,7 @@ function createRoute(el, owner_type){
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/new_route_view/',
|
||||
url: '/user_account/new_route_view/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -644,7 +644,7 @@ function createRoute(el, owner_type){
|
||||
function getRoute(el){
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/routes/get_routes/',
|
||||
url: '/routes/get_routes/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -679,7 +679,7 @@ function getRoute(el){
|
||||
|
||||
$.ajax({
|
||||
headers: {"X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val()},
|
||||
url: '/ru/routes/edit_route/',
|
||||
url: '/routes/edit_route/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -758,7 +758,7 @@ function RequestCommercialOffer (el){
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/user_account/request_offer/',
|
||||
url: '/user_account/request_offer/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
function createTicketShow () {
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/messages/support_create_ticket_form/',
|
||||
url: '/messages/support_create_ticket_form/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -231,7 +231,7 @@ function createTicket (el) {
|
||||
var formData = new FormData(form);
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/messages/create_ticket/',
|
||||
url: '/messages/create_ticket/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -279,7 +279,7 @@ function selectedUserMessenger (ticket_id=null,user_id=null){
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/messages/' + url,
|
||||
url: '/messages/' + url,
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -404,7 +404,7 @@ function openTicket (ticket_id){
|
||||
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/messages/support_show_chat_by_ticket/',
|
||||
url: '/messages/support_show_chat_by_ticket/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
@@ -441,7 +441,7 @@ function send_subscribe (id){
|
||||
}
|
||||
$.ajax({
|
||||
headers: { "X-CSRFToken": $('input[name=csrfmiddlewaretoken]').val() },
|
||||
url: '/ru/subscribes/subscribe_now/',
|
||||
url: '/subscribes/subscribe_now/',
|
||||
type: "POST",
|
||||
// async: true,
|
||||
cache: false,
|
||||
|
||||
Reference in New Issue
Block a user