0.1.1 fix lang
This commit is contained in:
@@ -14,6 +14,8 @@ from datetime import datetime
|
||||
from django.template.loader import render_to_string
|
||||
from django.urls import reverse
|
||||
from .funcs import *
|
||||
from django.utils.translation import activate, get_language_info
|
||||
|
||||
|
||||
def get_content_for_section_ajax(request):
|
||||
|
||||
@@ -26,6 +28,9 @@ def get_content_for_section_ajax(request):
|
||||
if not data and request.body:
|
||||
data = json.loads(request.body)
|
||||
|
||||
if 'lang' in data:
|
||||
activate(data['lang'])
|
||||
|
||||
if 'screen_width' in data and data['screen_width']:
|
||||
request.session['screen_width'] = data['screen_width']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user