Ejemplo n.º 1
0
Archivo: crud.py Proyecto: 0xcd03/inbox
def create(namespace, db_session, subject, body, location, reminders,
           recurrence, start, end, busy, all_day, participants):
    event = Event(
        account_id=namespace.account_id,
        uid=uuid.uuid4().hex,
        provider_name=INBOX_PROVIDER_NAME,
        raw_data='',
        subject=subject,
        body=body,
        location=location,
        reminders=reminders,
        recurrence=recurrence,
        start=start,
        end=end,
        busy=busy,
        all_day=all_day,
        locked=False,
        time_zone=0,
        source='local')

    event.participant_list = participants

    db_session.add(event)
    db_session.commit()
    return event
Ejemplo n.º 2
0
def create(namespace, db_session, subject, body, location, reminders,
           recurrence, start, end, busy, all_day, participants):
    account = db_session.query(Account).filter(
        Account.id == namespace.account_id).one()
    event = Event(
        calendar=account.default_calendar,
        account_id=namespace.account_id,
        uid=uuid.uuid4().hex,
        provider_name=INBOX_PROVIDER_NAME,
        raw_data='',
        subject=subject,
        body=body,
        location=location,
        reminders=reminders,
        recurrence=recurrence,
        start=start,
        end=end,
        busy=busy,
        all_day=all_day,
        read_only=False,
        is_owner=True,
        source='local')

    event.participant_list = participants

    db_session.add(event)
    db_session.commit()
    return event
Ejemplo n.º 3
0
def create(namespace, db_session, calendar, title, description, location,
           reminders, recurrence, when, participants):
    event = Event(calendar=calendar,
                  namespace=namespace,
                  uid=uuid.uuid4().hex,
                  provider_name=INBOX_PROVIDER_NAME,
                  raw_data='',
                  title=title,
                  description=description,
                  location=location,
                  when=when,
                  read_only=False,
                  is_owner=True,
                  source='local')

    event.participant_list = participants

    db_session.add(event)
    db_session.commit()

    return event
Ejemplo n.º 4
0
Archivo: crud.py Proyecto: dlitz/inbox
def create(namespace, db_session, calendar, title, description, location,
           reminders, recurrence, when, participants):
    event = Event(
        calendar=calendar,
        account_id=namespace.account_id,
        uid=uuid.uuid4().hex,
        provider_name=INBOX_PROVIDER_NAME,
        raw_data='',
        title=title,
        description=description,
        location=location,
        when=when,
        read_only=False,
        is_owner=True,
        source='local')

    event.participant_list = participants

    db_session.add(event)
    db_session.commit()

    return event
Ejemplo n.º 5
0
def create(namespace, db_session, subject, body, location, reminders,
           recurrence, when, participants):
    account = db_session.query(Account).filter(
        Account.id == namespace.account_id).one()
    event = Event(calendar=account.default_calendar,
                  account_id=namespace.account_id,
                  uid=uuid.uuid4().hex,
                  provider_name=INBOX_PROVIDER_NAME,
                  raw_data='',
                  subject=subject,
                  body=body,
                  location=location,
                  when=when,
                  read_only=False,
                  is_owner=True,
                  source='local')

    event.participant_list = participants

    db_session.add(event)
    db_session.commit()
    return event