You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

71 lines
2.0 KiB

from django.utils.translation import gettext_lazy as _
def default_timing():
return {
# "saturday": "",
# "sunday": "",
# "monday": "",
# "tuesday": "",
# "wednesday": "",
# "thursday": "",
# "friday": ""
}
def get_weekly_timing_schema():
return {
'type': "array",
'format': 'table',
'title': ' ',
'items': {
'type': 'object',
'title': str(_('Weekly Timing')),
'properties': {
'day': {
'type': 'string',
'enum': ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'],
'options': {
'enum_titles': [str(_('Monday')), str(_('Tuesday')), str(_('Wednesday')), str(_('Thursday')), str(_('Friday')), str(_('Saturday')), str(_('Sunday'))]
},
'title': _('Day'),
},
'time': {'type': 'string', 'format': 'time','title': str(_('Time'))},
}
}
}
def get_course_feature_schema():
return {
'type': "array",
'format': 'table',
'title': ' ',
'items': {
'type': 'object',
'title': str(_('Course Features')),
'properties': {
'title': {'type': 'string', 'title': str(_('Title'))},
}
}
}
def get_calender_dates_schema():
return {
'type': "array",
'format': 'table',
'title': ' ',
'items': {
'type': 'object',
'title': str(_('')),
'properties': {
'year': {'type': 'string', 'format': 'number', 'title': str(_('year'))},
'month': {'type': 'string', 'format': 'number', 'title': str(_('month'))},
'day': {'type': 'string', 'format': 'number', 'title': str(_('day'))},
}
}
}