<s> """<STR_LIT>""" <EOL> import pytz <EOL> from datetime import datetime <EOL> from django . forms import IntegerField <EOL> from django . core . validators import MinValueValidator <EOL> from dynamic_preferences . types import IntegerPreference , ChoicePreference <EOL> from dynamic_preferences import global_preferences_registry <EOL> from django_select2 . forms import Select2Widget <EOL> class PositiveIntegerField ( IntegerField ) : <EOL> min_value = <NUM_LIT:1> <EOL> default_validators = [ MinValueValidator ( min_value ) ] <EOL> def __init__ ( self , * args , ** kwargs ) : <EOL> defaults = { '<STR_LIT>' : self . min_value } <EOL> defaults . update ( kwargs ) <EOL> super ( PositiveIntegerField , self ) . __init__ ( ** defaults ) <EOL> class PositiveIntegerPreference ( IntegerPreference ) : <EOL> field_class = PositiveIntegerField <EOL> @ global_preferences_registry . register <EOL> class CrashLimitStorageDays ( PositiveIntegerPreference ) : <EOL> section = '<STR_LIT>' <EOL> verbose_name = '<STR_LIT>' <EOL> name = "<STR_LIT>" <EOL> default = <NUM_LIT> <EOL> @ global_preferences_registry . register <EOL> class CrashLimitStorageSize ( PositiveIntegerPreference ) : <EOL> section = '<STR_LIT>' <EOL> verbose_name = "<STR_LIT>" <EOL> name = "<STR_LIT>" <EOL> default = <NUM_LIT:100> <EOL> @ global_preferences_registry . register <EOL> class CrashLimitDuplicateNumber ( PositiveIntegerPreference ) : <EOL> section = '<STR_LIT>' <EOL> verbose_name = '<STR_LIT>' <EOL> name = "<STR_LIT>" <EOL> default = <NUM_LIT:10> <EOL> @ global_preferences_registry . register <EOL> class OmahaLimitSize ( PositiveIntegerPreference ) : <EOL> section = '<STR_LIT>' <EOL> verbose_name = "<STR_LIT>" <EOL> name = "<STR_LIT>" <EOL> default = <NUM_LIT:100> <EOL> @ global_preferences_registry . register <EOL> class SparkleLimitSize ( PositiveIntegerPreference ) : <EOL> section = '<STR_LIT>' <EOL> verbose_name = "<STR_LIT>" <EOL> name = "<STR_LIT>" <EOL> default = <NUM_LIT:100> <EOL> @ global_preferences_registry . register <EOL> class FeedbackLimitStorageDays ( PositiveIntegerPreference ) : <EOL> section = '<STR_LIT>' <EOL> verbose_name = '<STR_LIT>' <EOL> name = "<STR_LIT>" <EOL> default = <NUM_LIT> <EOL> @ global_preferences_registry . register <EOL> class FeedbackLimitSize ( PositiveIntegerPreference ) : <EOL> section = '<STR_LIT>' <EOL> verbose_name = "<STR_LIT>" <EOL> name = "<STR_LIT>" <EOL> default = <NUM_LIT:100> <EOL> @ global_preferences_registry . register <EOL> class SymbolsLimitSize ( PositiveIntegerPreference ) : <EOL> section = '<STR_LIT>' <EOL> verbose_name = "<STR_LIT>" <EOL> name = "<STR_LIT>" <EOL> default = <NUM_LIT:100> <EOL> @ global_preferences_registry . register <EOL> class TimeZone ( ChoicePreference ) : <EOL> choices = [ ( tz , '<STR_LIT:U+0020>' . join ( [ tz , datetime . now ( pytz . timezone ( tz ) ) . strftime ( '<STR_LIT>' ) ] ) ) <EOL> for tz in pytz . common_timezones ] <EOL> widget = Select2Widget <EOL> section = '<STR_LIT>' <EOL> verbose_name = "<STR_LIT>" <EOL> name = "<STR_LIT>" <EOL> default = "<STR_LIT>" <EOL> global_preferences = global_preferences_registry <EOL> global_preferences_manager = global_preferences . manager ( ) </s>
