コード例 #1
0
class TestSettings(dbsettings.Group):
    boolean = dbsettings.BooleanValue()
    integer = dbsettings.IntegerValue()
    string = dbsettings.StringValue()
    list_semi_colon = dbsettings.MultiSeparatorValue()
    list_comma = dbsettings.MultiSeparatorValue(separator=',')
    date = dbsettings.DateValue()
    time = dbsettings.TimeValue()
    datetime = dbsettings.DateTimeValue()
コード例 #2
0
ファイル: __init__.py プロジェクト: TigorC/django-dbsettings
 class settings(dbsettings.Group):
     boolean = dbsettings.BooleanValue(default=True)
     boolean_false = dbsettings.BooleanValue(default=False)
     integer = dbsettings.IntegerValue(default=1)
     string = dbsettings.StringValue(default="default")
     list_semi_colon = dbsettings.MultiSeparatorValue(default=['one','two'])
     list_comma = dbsettings.MultiSeparatorValue(separator=',',default=('one','two'))
     date = dbsettings.DateValue(default=datetime.date(2012, 3, 14))
     time = dbsettings.TimeValue(default=datetime.time(12, 3, 14))
     datetime = dbsettings.DateTimeValue(default=datetime.datetime(2012, 3, 14, 12, 3, 14))
コード例 #3
0
class TestSettings(dbsettings.Group):
    boolean = dbsettings.BooleanValue()
    integer = dbsettings.IntegerValue()
    string = dbsettings.StringValue()
    list_semi_colon = dbsettings.MultiSeparatorValue()
    list_comma = dbsettings.MultiSeparatorValue(separator=',')
    date = dbsettings.DateValue()
    time = dbsettings.TimeValue()
    datetime = dbsettings.DateTimeValue()
    string_choices = dbsettings.StringValue(choices=(("String1",
                                                      "First String Choice"),
                                                     ("String2",
                                                      "Second String Choice")))