How to use the gridcal.models.EventDeadline.objects function in GridCal

To help you get started, we’ve selected a few GridCal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github wikical / grical / gridcal / functions.py View on Github external
eu = EventUrl.objects.filter(event=event.id)
    if len(eu) < 0:
        t = t + 'url: ' + '\n'
    else:
        for e in eu.all():
             t = t + 'url: ' + e.url_name + '|' + e.url + '\n'

    et = EventTimechunk.objects.filter(event=event.id)
    if len(et) < 0:
        t = t + 'time: ' + '\n'
    else:
        for e in et.all():
            t = t + 'time: ' + e.timechunk_name + '|' + str(e.timechunk_date) + '|' + str(e.timechunk_starttime) + '|' + str(e.timechunk_endtime) +'\n'

    ed = EventDeadline.objects.filter(event=event.id)
    if len(ed) < 0:
        t = t + 'dl: ' + '\n'
    else:
        for e in ed.all():
            t = t + 'dl: ' + e.deadline_name + '|' + str(e.deadline) + '\n'

    t = t + 'desc: ' + unicode(event.description) + '\n'
    return t