fix tz info + editable schedule duration in display list

This commit is contained in:
bkfox 2017-03-31 15:15:16 +02:00
parent e21792d894
commit a62ae13079
4 changed files with 16 additions and 6 deletions

View File

@ -162,8 +162,8 @@ class ScheduleAdmin(admin.ModelAdmin):
rerun.boolean = True
list_filter = ['frequency', 'program']
list_display = ['id', 'program_name', 'frequency', 'date', 'day', 'rerun']
list_editable = ['frequency', 'date']
list_display = ['id', 'program_name', 'frequency', 'day', 'date', 'duration', 'rerun']
list_editable = ['frequency', 'date', 'duration']
@admin.register(Track)

View File

@ -2,7 +2,8 @@
* Define rules for the default layouts, and some useful classes
*/
body {
margin: 0em;
max-width: 85em;
margin: 0em auto;
padding: 0em;
}
@ -86,9 +87,10 @@ body > .top {
position: fixed;
z-index: 10000000;
top: 0;
left: 0;
width: calc(100% - 0.8em);
max-width: calc(85em - 0.8em);
height: 2.5em;
margin: 0em auto;
background-color: white;
box-shadow: 0em 0em 0.2em black;
transition: opacity 1.5s;

View File

@ -20,7 +20,6 @@
body {
background-color: #F2F2F2;
font-family: "Myriad Pro",Calibri,Helvetica,Arial,sans-serif;
margin: 0em;
padding: 0em;
}
@ -100,7 +99,7 @@ main .post_content {
main .post_content section {
display: inline-block;
width: calc(50% - 4em);
width: calc(50% - 1em);
vertical-align: top;
}

View File

@ -16,14 +16,23 @@ Note that:
You can also take a look at `base_settings` for more information.
"""
import pytz
import os
# If Aircox is not installed as a regular python module, you can use:
# import sys
# sys.path.append('/path/to/aircox_parent_folder/')
from django.utils import timezone
from .base_settings import *
# define TIME_ZONE before the call to timezone.activate
# TIME_ZONE = os.environ.get('TZ') or 'UTC'
timezone.activate(pytz.timezone(TIME_ZONE))
# debug or production mode
DEBUG = False
if 'AIRCOX_DEBUG' in os.environ:
DEBUG = (os.environ['AIRCOX_DEBUG'].lower()) in ('true','1')