Merge branch 'develop-1.0' into fix-1.0-56
This commit is contained in:
commit
836d3a75bf
|
@ -3,6 +3,7 @@ from copy import copy
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.forms import ModelForm
|
from django.forms import ModelForm
|
||||||
from django.utils.translation import gettext as _
|
from django.utils.translation import gettext as _
|
||||||
|
from adminsortable2.admin import SortableAdminBase
|
||||||
|
|
||||||
from ..models import Episode, Diffusion
|
from ..models import Episode, Diffusion
|
||||||
|
|
||||||
|
@ -56,7 +57,7 @@ class EpisodeAdminForm(ModelForm):
|
||||||
|
|
||||||
|
|
||||||
@admin.register(Episode)
|
@admin.register(Episode)
|
||||||
class EpisodeAdmin(PageAdmin):
|
class EpisodeAdmin(SortableAdminBase, PageAdmin):
|
||||||
form = EpisodeAdminForm
|
form = EpisodeAdminForm
|
||||||
list_display = PageAdmin.list_display
|
list_display = PageAdmin.list_display
|
||||||
list_filter = tuple(f for f in PageAdmin.list_filter if f != 'pub_date') + \
|
list_filter = tuple(f for f in PageAdmin.list_filter if f != 'pub_date') + \
|
||||||
|
|
|
@ -4,7 +4,7 @@ from django.contrib import admin
|
||||||
from django.utils.safestring import mark_safe
|
from django.utils.safestring import mark_safe
|
||||||
from django.utils.translation import gettext_lazy as _
|
from django.utils.translation import gettext_lazy as _
|
||||||
|
|
||||||
from adminsortable2.admin import SortableInlineAdminMixin
|
from adminsortable2.admin import SortableAdminBase, SortableInlineAdminMixin
|
||||||
|
|
||||||
from ..models import Sound, Track
|
from ..models import Sound, Track
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ class SoundInline(admin.TabularInline):
|
||||||
|
|
||||||
|
|
||||||
@admin.register(Sound)
|
@admin.register(Sound)
|
||||||
class SoundAdmin(admin.ModelAdmin):
|
class SoundAdmin(SortableAdminBase, admin.ModelAdmin):
|
||||||
fields = None
|
fields = None
|
||||||
list_display = ['id', 'name', 'related',
|
list_display = ['id', 'name', 'related',
|
||||||
'type', 'duration', 'is_public', 'is_good_quality',
|
'type', 'duration', 'is_public', 'is_good_quality',
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from adminsortable2.admin import SortableAdminBase
|
||||||
|
|
||||||
from ..models import Port, Station
|
from ..models import Port, Station
|
||||||
from .page import NavItemInline
|
from .page import NavItemInline
|
||||||
|
@ -13,7 +14,7 @@ class PortInline(admin.StackedInline):
|
||||||
|
|
||||||
|
|
||||||
@admin.register(Station)
|
@admin.register(Station)
|
||||||
class StationAdmin(admin.ModelAdmin):
|
class StationAdmin(SortableAdminBase, admin.ModelAdmin):
|
||||||
prepopulated_fields = {'slug': ('name',)}
|
prepopulated_fields = {'slug': ('name',)}
|
||||||
inlines = (PortInline, NavItemInline)
|
inlines = (PortInline, NavItemInline)
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
{% load static i18n %}
|
{% load static i18n %}
|
||||||
|
|
||||||
{% with inline_admin_formset.formset.instance as playlist %}
|
{% with inline_admin_formset.formset.instance as playlist %}
|
||||||
{% include "adminsortable2/tabular.html" %}
|
{% include "adminsortable2/edit_inline/tabular-django-4.1.html" %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ django-filter~=22.1
|
||||||
django-filer~=2.2
|
django-filer~=2.2
|
||||||
django-honeypot~=1.0
|
django-honeypot~=1.0
|
||||||
django-taggit~=3.0
|
django-taggit~=3.0
|
||||||
django-admin-sortable2~=2.2
|
django-admin-sortable2~=2.1
|
||||||
django-ckeditor~=6.4
|
django-ckeditor~=6.4
|
||||||
bleach~=5.0
|
bleach~=5.0
|
||||||
easy-thumbnails~=2.8
|
easy-thumbnails~=2.8
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
# aircox daily tasks:
|
# aircox daily tasks:
|
||||||
# - diffusions monitoring for the current month
|
# - diffusions monitoring for the current month
|
||||||
cd /srv/apps/aircox/
|
cd /srv/www/aircox/
|
||||||
scripts/launch_in_venv ./manage.py diffusions --update --clean
|
scripts/launch_in_venv ./manage.py diffusions --update --clean
|
||||||
# - diffusions monitoring for the next month
|
# - diffusions monitoring for the next month
|
||||||
scripts/launch_in_venv ./manage.py diffusions --update --next-month
|
scripts/launch_in_venv ./manage.py diffusions --update --next-month
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
#
|
#
|
||||||
# The binding is done to a Gunicorn's instance (cf. supervisor scripts),
|
# The binding is done to a Gunicorn's instance (cf. supervisor scripts),
|
||||||
# on local port 8042 # and assumes that static files are in
|
# on local port 8042 # and assumes that static files are in
|
||||||
# /srv/apps/aircox/static.
|
# /srv/www/aircox/static.
|
||||||
#
|
#
|
||||||
# You want to change the server_name and static location to suit your needs
|
# You want to change the server_name and static location to suit your needs
|
||||||
#
|
#
|
||||||
|
@ -21,7 +21,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location /static/ {
|
location /static/ {
|
||||||
alias /srv/apps/aircox/static/ ;
|
alias /srv/www/aircox/static/ ;
|
||||||
|
|
||||||
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
|
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
|
||||||
expires 365d;
|
expires 365d;
|
||||||
|
@ -29,7 +29,7 @@ server {
|
||||||
}
|
}
|
||||||
|
|
||||||
location /media/ {
|
location /media/ {
|
||||||
alias /srv/apps/aircox/static/media/ ;
|
alias /srv/www/aircox/static/media/ ;
|
||||||
|
|
||||||
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
|
location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
|
||||||
expires 365d;
|
expires 365d;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
; Supervisor sample config file for Aircox.
|
; Supervisor sample config file for Aircox.
|
||||||
;
|
;
|
||||||
; It assumes that the instance is installed in the directory
|
; It assumes that the instance is installed in the directory
|
||||||
; "/srv/apps/aircox". It requires Gunicorn in order to run the
|
; "/srv/www/aircox". It requires Gunicorn in order to run the
|
||||||
; WSGI server.
|
; WSGI server.
|
||||||
;
|
;
|
||||||
; * aircox_server: WSGI server instance using Gunicorn for production;
|
; * aircox_server: WSGI server instance using Gunicorn for production;
|
||||||
|
@ -14,32 +14,32 @@
|
||||||
;
|
;
|
||||||
|
|
||||||
[program:aircox_server]
|
[program:aircox_server]
|
||||||
command = /srv/apps/aircox/scripts/launch_in_venv gunicorn --bind 127.0.0.1:8042 instance.wsgi:application
|
command = /srv/www/aircox/scripts/launch_in_venv gunicorn --bind 127.0.0.1:8042 instance.wsgi:application
|
||||||
directory = /srv/apps/aircox
|
directory = /srv/www/aircox
|
||||||
user = aircox
|
user = aircox
|
||||||
autostart = true
|
autostart = true
|
||||||
autorestart = true
|
autorestart = true
|
||||||
stdout_logfile = /srv/apps/aircox/logs/server.log
|
stdout_logfile = /srv/www/aircox/logs/server.log
|
||||||
redirect_stderr = true
|
redirect_stderr = true
|
||||||
environment=AIRCOX_DEBUG="False"
|
environment=AIRCOX_DEBUG="False"
|
||||||
|
|
||||||
[program:aircox_sounds_monitor]
|
[program:aircox_sounds_monitor]
|
||||||
command = /srv/apps/aircox/scripts/launch_in_venv ./manage.py sounds_monitor -qsm
|
command = /srv/www/aircox/scripts/launch_in_venv ./manage.py sounds_monitor -qsm
|
||||||
directory = /srv/apps/aircox
|
directory = /srv/www/aircox
|
||||||
user = aircox
|
user = aircox
|
||||||
autostart = true
|
autostart = true
|
||||||
autorestart = true
|
autorestart = true
|
||||||
stdout_logfile = /srv/apps/aircox/logs/sounds_monitor.log
|
stdout_logfile = /srv/www/aircox/logs/sounds_monitor.log
|
||||||
redirect_stderr = true
|
redirect_stderr = true
|
||||||
environment=AIRCOX_DEBUG="False"
|
environment=AIRCOX_DEBUG="False"
|
||||||
|
|
||||||
[program:aircox_streamer]
|
[program:aircox_streamer]
|
||||||
command = /srv/apps/aircox/scripts/launch_in_venv ./manage.py streamer -crm
|
command = /srv/www/aircox/scripts/launch_in_venv ./manage.py streamer -crm
|
||||||
directory = /srv/apps/aircox
|
directory = /srv/www/aircox
|
||||||
user = aircox
|
user = aircox
|
||||||
autostart = true
|
autostart = true
|
||||||
autorestart = true
|
autorestart = true
|
||||||
stdout_logfile = /srv/apps/aircox/logs/streamer.log
|
stdout_logfile = /srv/www/aircox/logs/streamer.log
|
||||||
redirect_stderr = true
|
redirect_stderr = true
|
||||||
environment=AIRCOX_DEBUG="False"
|
environment=AIRCOX_DEBUG="False"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user