Package mobi :: Package mtld :: Package da :: Package device :: Module config
[hide private]
[frames] | no frames]

Source Code for Module mobi.mtld.da.device.config

 1  #!/usr/bin/env python 
 2   
 3  """ 
 4  @copyright: 
 5   Copyright (c) 2014 by mTLD Top Level Domain Limited. All rights reserved.\n 
 6   Portions copyright (c) 2008 by Argo Interactive Limited.\n 
 7   Portions copyright (c) 2008 by Nokia Inc.\n 
 8   Portions copyright (c) 2008 by Telecom Italia Mobile S.p.A.\n 
 9   Portions copyright (c) 2008 by Volantis Systems Limited.\n 
10   Portions copyright (c) 2002-2008 by Andreas Staeding.\n 
11   Portions copyright (c) 2008 by Zandan.\n 
12  @author: dotMobi 
13  """ 
14   
15 -class Config(object):
16 17 # To change the cookie name that the client side properties would be set to. 18 # When using DeviceApi.properties() on a Rails project, the detection would 19 # automatically use the contents of this cookie if it exists. 20 # If you want the client side properties to be used add the DeviceAtlas 21 # client side component (JS lib) to your web-site pages. 22 cookie_name = 'DAPROPS' 23 24 # To disable or enable DeviceApi.properties including User-Agent 25 # dynamic properties. Some properties cannot be known before runtime and can 26 # change from User-Agent to User-Agent. The most common of these are the OS 27 # Version and the Browser Version. The DeviceApi is able to dynamically detect 28 # these changing properties with a small overhead. If you do not use this 29 # properties you can set this config to false to make the detection a little 30 # bit faster. 31 include_ua_props = True 32 33 # To check the Accept-Language header and include properties to the 34 # property set for getting client's language and locale preferences set to 35 # true. If you do not use this properties you can set this config to false to 36 # make the detection marginally faster. 37 include_lang_props = True 38 39 # To include the matched and unmatched parts of the User-Agent to the property 40 # set. 41 include_match_info = False 42 43 # The default config value for DeviceApi.properties when there are no 44 # properties. 45 # true = if we want to return nil when there are no properties, 46 # false = if we want to return an instance of Properties without Property in 47 return_none_when_no_properties = False
48