def to_dict(self): return dict_normalise_values({ 'id':self.id, 'site_id':self.site_id, 'logofile':self.logofile, 'bgfile':self.bgfile, 'pagebgcolor':self.pagebgcolor, 'bgcolor':self.bgcolor , 'headerlink':self.headerlink, 'basefont':self.basefont, 'topbgcolor':self.topbgcolor, 'toptextcolor':self.toptextcolor , 'topfont':self.topfont, 'toptextcont':self.toptextcont , 'middlebgcolor':self.middlebgcolor , 'middletextcolor':self.middletextcolor, 'middlefont':self.middlefont, 'bottombgcolor':self.bottombgcolor , 'bottomtextcolor':self.bottomtextcolor, 'bottomfont':self.bottomfont, 'footerbgcolor':self.footerbgcolor, 'footertextcolor':self.footertextcolor , 'footerfont':self.footerfont, 'footertextcont':self.footertextcont , 'btnbgcolor':self.btnbgcolor, 'btntxtcolor':self.btntxtcolor , 'btnlinecolor':self.btnlinecolor, 'tosfile':self.tosfile, 'copytextcont':self.copytextcont })
def to_dict(self): return dict_normalise_values({ 'id': self.id, 'site_id': self.site_id, 'logofile': self.logofile, 'bgfile': self.bgfile, 'pagebgcolor': self.pagebgcolor, 'bgcolor': self.bgcolor, 'headerlink': self.headerlink, 'basefont': self.basefont, 'topbgcolor': self.topbgcolor, 'toptextcolor': self.toptextcolor, 'topfont': self.topfont, 'toptextcont': self.toptextcont, 'middlebgcolor': self.middlebgcolor, 'middletextcolor': self.middletextcolor, 'middlefont': self.middlefont, 'bottombgcolor': self.bottombgcolor, 'bottomtextcolor': self.bottomtextcolor, 'bottomfont': self.bottomfont, 'footerbgcolor': self.footerbgcolor, 'footertextcolor': self.footertextcolor, 'footerfont': self.footerfont, 'footertextcont': self.footertextcont, 'btnbgcolor': self.btnbgcolor, 'btntxtcolor': self.btntxtcolor, 'btnlinecolor': self.btnlinecolor, 'tosfile': self.tosfile, 'copytextcont': self.copytextcont })
def to_dict(self): expiresat = self.expiresat.strftime("%m/%d/%Y") if self.expiresat else '' return dict_normalise_values({ 'unifi_server':self.unifi_server,'unifi_user':self.unifi_user, 'id':self.id, \ 'unifi_pass':self.unifi_pass,'name':self.name,'sites_allowed':self.sites_allowed,'account_type':self.account_type,\ 'expiresat':expiresat,'en_api_export':self.en_api_export,'en_reporting':self.en_reporting,\ 'en_analytics':self.en_analytics,'en_advertisement':self.en_advertisement,'en_footer_change':self.en_footer_change,\ 'en_fbauth_change':self.en_fbauth_change,'logins_allowed':self.logins_allowed } )
def to_dict(self): expiresat = self.expiresat.strftime( "%m/%d/%Y") if self.expiresat else '' return dict_normalise_values({ 'unifi_server':self.unifi_server,'unifi_user':self.unifi_user, 'id':self.id, \ 'unifi_pass':self.unifi_pass,'name':self.name,'sites_allowed':self.sites_allowed,'account_type':self.account_type,\ 'expiresat':expiresat,'en_api_export':self.en_api_export,'en_reporting':self.en_reporting,\ 'en_analytics':self.en_analytics,'en_advertisement':self.en_advertisement,'en_footer_change':self.en_footer_change,\ 'en_fbauth_change':self.en_fbauth_change,'logins_allowed':self.logins_allowed } )
def to_dict(self): reports_type = None reports_list = None fb_appid = None fb_app_secret= None redirect_method = None redirect_url = None api_export = None api_auth_field1 = None api_auth_field2 = None api_auth_field3 = None emailformfields = self.emailformfields if self.emailformfields else 0 mandatoryfields = self.mandatoryfields if self.mandatoryfields else 0 if self.account.en_reporting: reports_type = self.reports_type reports_list = self.reports_list if self.account.en_fbauth_change: fb_appid = self.fb_appid fb_app_secret = self.fb_app_secret if self.account.en_advertisement: redirect_method = self.redirect_method redirect_url = self.redirect_url if self.account.en_api_export: api_export = self.api_export api_auth_field1 = self.api_auth_field1 api_auth_field2 = self.api_auth_field2 api_auth_field3 = self.api_auth_field3 return dict_normalise_values({ 'name':self.name,'unifi_id':self.unifi_id, 'id':self.id, \ 'template':self.template, 'get_email': (emailformfields &FORM_FIELD_EMAIL),\ 'get_lastname': (emailformfields &FORM_FIELD_LASTNAME),\ 'get_firstname': (emailformfields &FORM_FIELD_FIRSTNAME),\ 'get_dob': (emailformfields &FORM_FIELD_DOB),\ 'get_extra1': (emailformfields &FORM_FIELD_EXTRA1),\ 'get_extra2': (emailformfields &FORM_FIELD_EXTRA2),\ 'mandate_email': (mandatoryfields &MANDATE_FIELD_EMAIL),\ 'mandate_lastname': (mandatoryfields &MANDATE_FIELD_LASTNAME),\ 'mandate_firstname': (mandatoryfields &MANDATE_FIELD_FIRSTNAME),\ 'mandate_dob': (mandatoryfields &MANDATE_FIELD_DOB),\ 'mandate_extra1': (mandatoryfields &MANDATE_FIELD_EXTRA1),\ 'mandate_extra2': (mandatoryfields &MANDATE_FIELD_EXTRA2),\ 'auth_fb':(self.auth_method &AUTH_TYPE_SOCIAL),'auth_email':(self.auth_method &AUTH_TYPE_EMAIL),\ 'auth_phone':(self.auth_method &AUTH_TYPE_SMS),'auth_voucher':(self.auth_method &AUTH_TYPE_VOUCHER),\ 'default_landing':self.default_landing,'reports_type':reports_type, \ 'fb_page':self.fb_page,'auth_fb_like':self.auth_fb_like,'auth_fb_post':self.auth_fb_post,\ 'fb_appid':fb_appid,'fb_app_secret':fb_app_secret, 'redirect_method':redirect_method,'redirect_url':redirect_url,'timezone':self.timezone,\ 'emailformfields':emailformfields,'reports_list':reports_list,'client_id':self.client.id,\ 'api_export':api_export,'api_auth_field1':api_auth_field1,'api_auth_field2':api_auth_field2,\ 'api_auth_field3':api_auth_field3,'monthly_data_limit':self.monthly_data_limit,\ 'daily_data_limit':self.daily_data_limit,\ 'smsauth':self.smsauth,'email_field':self.email_field,'firstname_field':self.firstname_field,\ 'lastname_field':self.lastname_field,'dob_field':self.dob_field,'extra1_field':self.extra1_field,\ 'extra2_field':self.extra2_field,'newsletter':self.newsletter,\ 'newsletter_field':self.newsletter_field,'newsletter_mandate':self.newsletter_mandate, 'session_timelimit':self.session_timelimit,'enable_session_limit':self.enable_session_limit})
def to_dict(self): reports_type = None reports_list = None fb_appid = None fb_app_secret = None redirect_method = None redirect_url = None api_export = None api_auth_field1 = None api_auth_field2 = None api_auth_field3 = None emailformfields = self.emailformfields if self.emailformfields else 0 mandatoryfields = self.mandatoryfields if self.mandatoryfields else 0 if self.account.en_reporting: reports_type = self.reports_type reports_list = self.reports_list if self.account.en_fbauth_change: fb_appid = self.fb_appid fb_app_secret = self.fb_app_secret if self.account.en_advertisement: redirect_method = self.redirect_method redirect_url = self.redirect_url if self.account.en_api_export: api_export = self.api_export api_auth_field1 = self.api_auth_field1 api_auth_field2 = self.api_auth_field2 api_auth_field3 = self.api_auth_field3 return dict_normalise_values({ 'name':self.name,'unifi_id':self.unifi_id, 'id':self.id, \ 'template':self.template, 'get_email': (emailformfields &FORM_FIELD_EMAIL),\ 'get_lastname': (emailformfields &FORM_FIELD_LASTNAME),\ 'get_firstname': (emailformfields &FORM_FIELD_FIRSTNAME),\ 'get_dob': (emailformfields &FORM_FIELD_DOB),\ 'get_extra1': (emailformfields &FORM_FIELD_EXTRA1),\ 'get_extra2': (emailformfields &FORM_FIELD_EXTRA2),\ 'mandate_email': (mandatoryfields &MANDATE_FIELD_EMAIL),\ 'mandate_lastname': (mandatoryfields &MANDATE_FIELD_LASTNAME),\ 'mandate_firstname': (mandatoryfields &MANDATE_FIELD_FIRSTNAME),\ 'mandate_dob': (mandatoryfields &MANDATE_FIELD_DOB),\ 'mandate_extra1': (mandatoryfields &MANDATE_FIELD_EXTRA1),\ 'mandate_extra2': (mandatoryfields &MANDATE_FIELD_EXTRA2),\ 'auth_fb':(self.auth_method &AUTH_TYPE_SOCIAL),'auth_email':(self.auth_method &AUTH_TYPE_EMAIL),\ 'auth_phone':(self.auth_method &AUTH_TYPE_SMS),'auth_voucher':(self.auth_method &AUTH_TYPE_VOUCHER),\ 'default_landing':self.default_landing,'reports_type':reports_type, \ 'fb_page':self.fb_page,'auth_fb_like':self.auth_fb_like,'auth_fb_post':self.auth_fb_post,\ 'fb_appid':fb_appid,'fb_app_secret':fb_app_secret, 'redirect_method':redirect_method,'redirect_url':redirect_url,'timezone':self.timezone,\ 'emailformfields':emailformfields,'reports_list':reports_list,'client_id':self.client.id,\ 'api_export':api_export,'api_auth_field1':api_auth_field1,'api_auth_field2':api_auth_field2,\ 'api_auth_field3':api_auth_field3,'monthly_data_limit':self.monthly_data_limit,\ 'daily_data_limit':self.daily_data_limit,\ 'smsauth':self.smsauth,'email_field':self.email_field,'firstname_field':self.firstname_field,\ 'lastname_field':self.lastname_field,'dob_field':self.dob_field,'extra1_field':self.extra1_field,\ 'extra2_field':self.extra2_field,'newsletter':self.newsletter,\ 'newsletter_field':self.newsletter_field,'newsletter_mandate':self.newsletter_mandate, 'session_timelimit':self.session_timelimit,'enable_session_limit':self.enable_session_limit})
def to_table_row(self): expiresat = self.expiresat.strftime("%m/%d/%Y") if self.expiresat else '' if self.account_type == ACCOUNT_TYPE_FREE: account_type = 'FREE' elif self.account_type == ACCOUNT_TYPE_SILVER: account_type = 'PERM' elif self.account_type == ACCOUNT_TYPE_GOLD: account_type = 'PERM' elif self.account_type == ACCOUNT_TYPE_GOLD_PREM: account_type = 'PERM' return dict_normalise_values({'name':self.name,'sites_allowed':self.sites_allowed,'account_type':account_type,\ 'expiresat':expiresat,'id':self.id} )
def to_table_row(self): expiresat = self.expiresat.strftime( "%m/%d/%Y") if self.expiresat else '' if self.account_type == ACCOUNT_TYPE_FREE: account_type = 'FREE' elif self.account_type == ACCOUNT_TYPE_SILVER: account_type = 'PERM' elif self.account_type == ACCOUNT_TYPE_GOLD: account_type = 'PERM' elif self.account_type == ACCOUNT_TYPE_GOLD_PREM: account_type = 'PERM' return dict_normalise_values({'name':self.name,'sites_allowed':self.sites_allowed,'account_type':account_type,\ 'expiresat':expiresat,'id':self.id} )
def to_dict(self): reports_type = None reports_list = None fb_appid = None fb_app_secret = None redirect_method = None redirect_url = None api_export = None api_auth_field1 = None api_auth_field2 = None api_auth_field3 = None if self.account.en_reporting: reports_type = self.reports_type reports_list = self.reports_list if self.account.en_fbauth_change: fb_appid = self.fb_appid fb_app_secret = self.fb_app_secret if self.account.en_advertisement: redirect_method = self.redirect_method redirect_url = self.redirect_url if self.account.en_api_export: api_export = self.api_export api_auth_field1 = self.api_auth_field1 api_auth_field2 = self.api_auth_field2 api_auth_field3 = self.api_auth_field3 return dict_normalise_values({ 'name':self.name,'unifi_id':self.unifi_id, 'id':self.id, \ 'template':self.template, 'get_lastname': (self.emailformfields &FORM_FIELD_LASTNAME),\ 'get_firstname': (self.emailformfields &FORM_FIELD_FIRSTNAME),\ 'auth_fb':(self.auth_method &AUTH_TYPE_SOCIAL),'auth_email':(self.auth_method &AUTH_TYPE_EMAIL),\ 'auth_phone':(self.auth_method &AUTH_TYPE_SMS),'auth_voucher':(self.auth_method &AUTH_TYPE_VOUCHER),\ 'default_landing':self.default_landing,'reports_type':reports_type, \ 'fb_page':self.fb_page,'auth_fb_like':self.auth_fb_like,'auth_fb_post':self.auth_fb_post,\ 'fb_appid':fb_appid,'fb_app_secret':fb_app_secret, 'redirect_method':redirect_method,'redirect_url':redirect_url,'timezone':self.timezone,\ 'emailformfields':self.emailformfields,'reports_list':reports_list,'client_id':self.client.id,\ 'api_export':api_export,'api_auth_field1':api_auth_field1,'api_auth_field2':api_auth_field2,\ 'api_auth_field3':api_auth_field3})
def to_dict(self): reports_type = None reports_list = None fb_appid = None fb_app_secret= None redirect_method = None redirect_url = None api_export = None api_auth_field1 = None api_auth_field2 = None api_auth_field3 = None if self.account.en_reporting: reports_type = self.reports_type reports_list = self.reports_list if self.account.en_fbauth_change: fb_appid = self.fb_appid fb_app_secret = self.fb_app_secret if self.account.en_advertisement: redirect_method = self.redirect_method redirect_url = self.redirect_url if self.account.en_api_export: api_export = self.api_export api_auth_field1 = self.api_auth_field1 api_auth_field2 = self.api_auth_field2 api_auth_field3 = self.api_auth_field3 return dict_normalise_values({ 'name':self.name,'unifi_id':self.unifi_id, 'id':self.id, \ 'template':self.template, 'get_lastname': (self.emailformfields &FORM_FIELD_LASTNAME),\ 'get_firstname': (self.emailformfields &FORM_FIELD_FIRSTNAME),\ 'auth_fb':(self.auth_method &AUTH_TYPE_SOCIAL),'auth_email':(self.auth_method &AUTH_TYPE_EMAIL),\ 'auth_phone':(self.auth_method &AUTH_TYPE_SMS),'auth_voucher':(self.auth_method &AUTH_TYPE_VOUCHER),\ 'default_landing':self.default_landing,'reports_type':reports_type, \ 'fb_page':self.fb_page,'auth_fb_like':self.auth_fb_like,'auth_fb_post':self.auth_fb_post,\ 'fb_appid':fb_appid,'fb_app_secret':fb_app_secret, 'redirect_method':redirect_method,'redirect_url':redirect_url,'timezone':self.timezone,\ 'emailformfields':self.emailformfields,'reports_list':reports_list,'client_id':self.client.id,\ 'api_export':api_export,'api_auth_field1':api_auth_field1,'api_auth_field2':api_auth_field2,\ 'api_auth_field3':api_auth_field3})
def get_settings(self): return dict_normalise_values({ 'unifi_server':self.unifi_server,'unifi_user':self.unifi_user, 'id':self.id, \ 'unifi_pass':self.unifi_pass,'unifi_server_ip':self.unifi_server_ip} )
def to_dict(self): return dict_normalise_values({'id':self.id, \ 'content':self.content,'account_id':self.account_id,'user_id':self.user_id,\ 'notifi_type':self.notifi_type,'notifi_id':self.notifi_id\ })
def to_dict(self): return dict_normalise_values({ 'id': self.id, 'email': self.email, 'displayname': self.displayname })
def to_dict(self): return dict_normalise_values({'id':self.id,'email':self.email,'displayname':self.displayname})