mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-03 13:19:16 -05:00
basics of new settings page working
This commit is contained in:
45
cookbook/templates/user_settings.html
Normal file
45
cookbook/templates/user_settings.html
Normal 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 %}
|
||||
Reference in New Issue
Block a user