Base templates
This commit is contained in:
parent
76ed93ff33
commit
5610ade1fe
19 changed files with 426 additions and 2 deletions
24
photo21/templates/index.html
Normal file
24
photo21/templates/index.html
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<form action="{% url 'set_language' %}" method="post" class="form-inline">
|
||||
{% csrf_token %}
|
||||
<select title="language" name="language" class="form-control form-control-sm language" onchange="this.form.submit()">
|
||||
{% get_current_language as LANGUAGE_CODE %}
|
||||
{% get_available_languages as LANGUAGES %}
|
||||
{% for lang_code, lang_name in LANGUAGES %}
|
||||
<option value="{{ lang_code }}" {% if lang_code == LANGUAGE_CODE %}selected{% endif %}>
|
||||
{{ lang_name }} ({{ lang_code }})
|
||||
</option>
|
||||
{% endfor %}
|
||||
</select>
|
||||
<noscript><input type="submit"></noscript>
|
||||
</form>
|
||||
{% if request.user.is_authenticated %}
|
||||
{% trans "Connected as" %} {{ request.user.username }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue