basics of new settings page working

This commit is contained in:
vabene1111
2022-07-14 17:50:20 +02:00
parent f4df84b609
commit 8700e2df69
11 changed files with 324 additions and 14 deletions

View File

@@ -0,0 +1,45 @@
{% extends "base.html" %}
{% load render_bundle from webpack_loader %}
{% load static %}
{% load i18n %}
{% load l10n %}
{% load custom_tags %}
{% block title %}{% trans 'Settings' %}{% endblock %}
{% block content %}
<div id="app">
<settings-view></settings-view>
</div>
{% endblock %}
{% block script %}
{% if debug %}
<script src="{% url 'js_reverse' %}"></script>
{% else %}
<script src="{% static 'django_js_reverse/reverse.js' %}"></script>
{% endif %}
<script type="application/javascript">
window.CUSTOM_LOCALE = '{{ request.LANGUAGE_CODE }}'
window.USER_ID = {{ request.user.pk }}
<!--TODO build custom API endpoint for this -->
{% get_available_languages as LANGUAGES %}
{% get_language_info_list for LANGUAGES as languages %}
window.AVAILABLE_LANGUAGES = [
{% for language in languages %}
['{{ language.name_local }}', '{{ language.code }}'],
{% endfor %}
]
</script>
{% render_bundle 'settings_view' %}
{% endblock %}