From f8245d0b05d0baf0ea0ef7df8ece99ca65ec4d90 Mon Sep 17 00:00:00 2001 From: bkfox Date: Sat, 30 May 2020 15:49:13 +0200 Subject: [PATCH] comment admin --- README.md | 20 +------- aircox/admin/page.py | 2 + aircox/settings.py | 8 ++++ .../locale/fr/LC_MESSAGES/django.po | 47 ++----------------- 4 files changed, 17 insertions(+), 60 deletions(-) diff --git a/README.md b/README.md index e8a1aaf..e89c4f6 100755 --- a/README.md +++ b/README.md @@ -64,24 +64,8 @@ pip install -r requirements.txt ### Configuration You must write a settings.py file in the `instance` directory (you can just -copy and paste `instance/sample_settings.py`. - -You will need to define a secret key, and eventually update the list of allowed hosts: - -``` -# django's project secret key (mandatory; you can find generators online) -SECRET_KEY = '' -# list of allowed hosts -ALLOWED_HOSTS = [ '127.0.0.1:8042' ] -``` - -You also want to redefine the following variable (required by Wagtail for the CMS): - -``` -WAGTAIL_SITE_NAME = 'Aircox' -``` - -Each application have a `settings.py` that defines extra options that can be redefined in this file. Look in their respective directories for more informations. +copy and paste `instance/sample_settings.py`. There still is configuration +required in this file, check it in for more info. ### Installation and first run diff --git a/aircox/admin/page.py b/aircox/admin/page.py index 5335603..ffbd444 100644 --- a/aircox/admin/page.py +++ b/aircox/admin/page.py @@ -100,6 +100,8 @@ class StaticPageAdmin(BasePageAdmin): @admin.register(Comment) class CommentAdmin(admin.ModelAdmin): list_display = ('page_title', 'date', 'nickname') + list_filter = ('date',) + search_fields = ('page__title', 'nickname') def page_title(self, obj): return obj.page.title diff --git a/aircox/settings.py b/aircox/settings.py index 7ceca81..3fc44e2 100755 --- a/aircox/settings.py +++ b/aircox/settings.py @@ -5,11 +5,19 @@ from django.conf import settings #class BaseSettings: +# deprecated = set() +# # def __init__(self, user_conf): # if user_conf: # for key, value in user_conf.items(): +# if not hasattr(self, key): +# if key in self.deprecated: +# raise ValueError('"{}" config is deprecated'.format(key)) +# else: +# raise ValueError('"{}" is not a config value'.format(key)) # setattr(self, key, value) # +# #class Settings(BaseSettings): # default_user_groups = { # diff --git a/aircox_streamer/locale/fr/LC_MESSAGES/django.po b/aircox_streamer/locale/fr/LC_MESSAGES/django.po index 7b896f9..d32a6b1 100644 --- a/aircox_streamer/locale/fr/LC_MESSAGES/django.po +++ b/aircox_streamer/locale/fr/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-01-30 20:13+0100\n" +"POT-Creation-Date: 2020-05-30 13:39+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,44 +18,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: models.py:37 -msgid "input" -msgstr "" - -#: models.py:38 -msgid "output" -msgstr "" - -#: models.py:56 -msgid "station" -msgstr "" - -#: models.py:58 -msgid "direction" -msgstr "" - -#: models.py:59 -msgid "type" -msgstr "" - -#: models.py:61 -msgid "active" -msgstr "" - -#: models.py:62 -msgid "this port is active" -msgstr "Ce port est actif" - -#: models.py:65 -msgid "port settings" -msgstr "Paramètrage du port" - -#: models.py:66 -msgid "" -"list of comma separated params available; this is put in the output config " -"file as raw code; plugin related" -msgstr "" - #: templates/aircox_streamer/source_item.html:18 msgid "Edit related program" msgstr "Éditer le programme correspondant" @@ -94,7 +56,7 @@ msgstr "Sélectionner un son" #: templates/aircox_streamer/source_item.html:61 msgid "Add a sound to the queue (queue may start playing)" -msgstr "Ajouter un son à la file de lecture(la file de lecture peut démarer)" +msgstr "Ajouter un son à la file de lecture (la file de lecture peut démarer)" #: templates/aircox_streamer/source_item.html:70 msgid "Add" @@ -110,7 +72,7 @@ msgstr "Statut" #: templates/aircox_streamer/source_item.html:104 msgid "Air time" -msgstr "" +msgstr "En antenne depuis" #: templates/aircox_streamer/source_item.html:114 msgid "Time left" @@ -118,7 +80,7 @@ msgstr "Temps restant" #: templates/aircox_streamer/source_item.html:122 msgid "Data source" -msgstr "" +msgstr "Source de donnée" #: templates/aircox_streamer/streamer.html:19 msgid "Reload" @@ -132,3 +94,4 @@ msgstr "Sélectionner une station" #: urls.py:9 views.py:9 msgid "Streamer Monitor" msgstr "Moniteur de stream" +