calendar: do not include cell by default (#21804)

This commit is contained in:
Frédéric Péters 2018-02-13 11:02:57 +01:00
parent c680590d44
commit d14c377f71
3 changed files with 7 additions and 1 deletions

View File

@ -16,6 +16,7 @@
import datetime
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
@ -51,7 +52,7 @@ class BookingCalendar(CellBase):
@classmethod
def is_enabled(cls):
return is_chrono_enabled() and is_wcs_enabled()
return settings.BOOKING_CALENDAR_CELL_ENABLED and is_chrono_enabled() and is_wcs_enabled()
def is_visible(self, user=None):
return self.agenda_reference and self.formdef_reference \

View File

@ -282,6 +282,9 @@ COMBO_MAP_ATTRIBUTION = 'Map data &copy; <a href="https://openstreetmap.org">Ope
# we use 28s by default: timeout just before web server, which is usually 30s
REQUESTS_TIMEOUT = 28
# hide work-in-progress/experimental/whatever booking calendar cell for now
BOOKING_CALENDAR_CELL_ENABLED = False
local_settings_file = os.environ.get('COMBO_SETTINGS_FILE',
os.path.join(os.path.dirname(__file__), 'local_settings.py'))
if os.path.exists(local_settings_file):

View File

@ -55,3 +55,5 @@ if 'DISABLE_MIGRATIONS' in os.environ:
FAMILY_SERVICE = {'root': '/'}
BOOKING_CALENDAR_CELL_ENABLED = True