-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #538 from Terralego/new_debug_panel
New debug panel
- Loading branch information
Showing
14 changed files
with
86 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2024.02.2 | ||
2024.02.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
from constance import config | ||
from django.contrib.admin import AdminSite | ||
from django.utils.translation import gettext as _ | ||
|
||
|
||
class ConfigSite(AdminSite): | ||
site_header = _(f"{config.INSTANCE_TITLE}: {_('Configuration')}") | ||
site_title = _(f"{config.INSTANCE_TITLE}: {_('Configuration')}") | ||
index_title = _(f"Welcome to {config.INSTANCE_TITLE} configuration interface.") | ||
|
||
|
||
config_site = ConfigSite(name="config_site") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-02-01 15:13+0000\n" | ||
"POT-Creation-Date: 2024-02-02 09:32+0000\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -18,7 +18,8 @@ msgstr "" | |
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n != 1);\n" | ||
|
||
msgid "Configuration panel / Debug" | ||
#, python-brace-format | ||
msgid "Welcome to {config.INSTANCE_TITLE} debug interface." | ||
msgstr "" | ||
|
||
msgid "Accounts" | ||
|
@@ -92,6 +93,13 @@ msgstr "" | |
msgid "OIDC connect" | ||
msgstr "" | ||
|
||
msgid "{config.INSTANCE_TITLE}: {_('Configuration')}" | ||
msgstr "" | ||
|
||
#, python-brace-format | ||
msgid "Welcome to {config.INSTANCE_TITLE} configuration interface." | ||
msgstr "" | ||
|
||
msgid "Instance customization" | ||
msgstr "" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ msgid "" | |
msgstr "" | ||
"Project-Id-Version: PACKAGE VERSION\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-02-01 15:13+0000\n" | ||
"POT-Creation-Date: 2024-02-02 09:32+0000\n" | ||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" | ||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | ||
"Language-Team: LANGUAGE <[email protected]>\n" | ||
|
@@ -18,11 +18,12 @@ msgstr "" | |
"Content-Transfer-Encoding: 8bit\n" | ||
"Plural-Forms: nplurals=2; plural=(n > 1);\n" | ||
|
||
msgid "Configuration panel / Debug" | ||
msgstr "Panneau de configuration / Debug" | ||
#, python-brace-format | ||
msgid "Welcome to {config.INSTANCE_TITLE} debug interface." | ||
msgstr "Bienvenue sur l'interface de debug de {config.INSTANCE_TITLE}." | ||
|
||
msgid "Accounts" | ||
msgstr "" | ||
msgstr "Comptes" | ||
|
||
msgid "Is able to create, delete, update users" | ||
msgstr "Peut créer, supprimer, mettre à jour des utilisateurs" | ||
|
@@ -94,6 +95,13 @@ msgstr "Mot de passe oublié ?" | |
msgid "OIDC connect" | ||
msgstr "Connexion via OIDC" | ||
|
||
msgid "{config.INSTANCE_TITLE}: {_('Configuration')}" | ||
msgstr "{config.INSTANCE_TITLE} : {_('Configuration')}" | ||
|
||
#, python-brace-format | ||
msgid "Welcome to {config.INSTANCE_TITLE} configuration interface." | ||
msgstr "Bienvenue sur l'interface de configuration de {config.INSTANCE_TITLE}." | ||
|
||
msgid "Instance customization" | ||
msgstr "Personnalisation de l'instance" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{% extends "admin/base.html" %} | ||
|
||
{% block userlinks %} | ||
{% if user.is_superuser and request.path|slice:":7" != "/debug/" %} | ||
<a href="/debug/">Debug</a> / | ||
{% endif %} | ||
{% if request.path|slice:":8" != "/config/" %} | ||
<a href="/config/">Config</a> / | ||
{% endif %} | ||
<a href="/admin/">Admin</a> / | ||
{{ block.super }} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
from admin_interface.admin import ThemeAdmin | ||
from admin_interface.models import Theme | ||
from constance.admin import Config, ConstanceAdmin | ||
from django.contrib import admin | ||
|
||
from project.admin import config_site | ||
from project.visu.models import ExtraMenuItem, SpriteValue | ||
|
||
|
||
@admin.register(ExtraMenuItem) | ||
class ExtraMenuItemAdmin(admin.ModelAdmin): | ||
list_display = ("label", "slug", "href", "icon") | ||
|
||
|
||
admin.site.register(SpriteValue) | ||
config_site.register(SpriteValue) | ||
config_site.register(ExtraMenuItem, ExtraMenuItemAdmin) | ||
admin.site.unregister([Config]) | ||
config_site.register([Config], ConstanceAdmin) | ||
admin.site.unregister(Theme) | ||
config_site.register(Theme, ThemeAdmin) |