DiaryDataModel

Author:Neil Wallace (neil@openmolar.com)
Release:2.0.906~hg207
Date:April 18, 2013

The diary for openmolar is a model/view design.

This is the model.

A view will call the data function, with the view style as an argument. Views will, be design, require a different level of data complexity. For instance, if viewing an entire year, an overview as opposed to to the minute detail is required. When viewing a single day, the converse may be true.

methods and attributes

class lib_openmolar.client.db_orm.diary.diary_model.DiaryDataModel[source]

Bases: lib_openmolar.client.db_orm.diary.diary_settings._DiarySettings

This is a custom model, which forms a bridge between the client and the database

__init__()[source]
active_diaries

poll the database (one time only) and get active diary ids.

data(date, view_style=0)[source]

returns a ‘DayData’ object for the date requested

get_bounds()[source]

poll the database for start, end and appointment limits

header_data(row, style=0)[source]
init_data()[source]

when called this initiates a dictionary of key value pairs where keys are all dates between the start and end values and the values are DayDataObjects with only public holiday data loaded

load()[source]
new_data(d1t, dt2, diary_ids, view_style=0)

returns a ‘DayData’ objects for the date range requested and specified diary ids

rowCount(style)[source]
row_from_date(date, style)[source]

returns the relative position of the date in the rows displayed

Table Of Contents

Previous topic

DiaryControl

Next topic

DiaryDayData