comment admin

This commit is contained in:
bkfox 2020-05-30 15:49:13 +02:00
parent e136218532
commit f8245d0b05
4 changed files with 17 additions and 60 deletions

View File

@ -64,24 +64,8 @@ pip install -r requirements.txt
### Configuration ### Configuration
You must write a settings.py file in the `instance` directory (you can just You must write a settings.py file in the `instance` directory (you can just
copy and paste `instance/sample_settings.py`. copy and paste `instance/sample_settings.py`. There still is configuration
required in this file, check it in for more info.
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.
### Installation and first run ### Installation and first run

View File

@ -100,6 +100,8 @@ class StaticPageAdmin(BasePageAdmin):
@admin.register(Comment) @admin.register(Comment)
class CommentAdmin(admin.ModelAdmin): class CommentAdmin(admin.ModelAdmin):
list_display = ('page_title', 'date', 'nickname') list_display = ('page_title', 'date', 'nickname')
list_filter = ('date',)
search_fields = ('page__title', 'nickname')
def page_title(self, obj): def page_title(self, obj):
return obj.page.title return obj.page.title

View File

@ -5,11 +5,19 @@ from django.conf import settings
#class BaseSettings: #class BaseSettings:
# deprecated = set()
#
# def __init__(self, user_conf): # def __init__(self, user_conf):
# if user_conf: # if user_conf:
# for key, value in user_conf.items(): # 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) # setattr(self, key, value)
# #
#
#class Settings(BaseSettings): #class Settings(BaseSettings):
# default_user_groups = { # default_user_groups = {
# #

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -18,44 +18,6 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\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 #: templates/aircox_streamer/source_item.html:18
msgid "Edit related program" msgid "Edit related program"
msgstr "Éditer le programme correspondant" msgstr "Éditer le programme correspondant"
@ -110,7 +72,7 @@ msgstr "Statut"
#: templates/aircox_streamer/source_item.html:104 #: templates/aircox_streamer/source_item.html:104
msgid "Air time" msgid "Air time"
msgstr "" msgstr "En antenne depuis"
#: templates/aircox_streamer/source_item.html:114 #: templates/aircox_streamer/source_item.html:114
msgid "Time left" msgid "Time left"
@ -118,7 +80,7 @@ msgstr "Temps restant"
#: templates/aircox_streamer/source_item.html:122 #: templates/aircox_streamer/source_item.html:122
msgid "Data source" msgid "Data source"
msgstr "" msgstr "Source de donnée"
#: templates/aircox_streamer/streamer.html:19 #: templates/aircox_streamer/streamer.html:19
msgid "Reload" msgid "Reload"
@ -132,3 +94,4 @@ msgstr "Sélectionner une station"
#: urls.py:9 views.py:9 #: urls.py:9 views.py:9
msgid "Streamer Monitor" msgid "Streamer Monitor"
msgstr "Moniteur de stream" msgstr "Moniteur de stream"