예제 #1
0
        class MyEnvParser(env.EnvParser):

            secret_key = env.CharField(max_length=24, as_env=True)

            is_important = env.BooleanField()

            aws_url = env.URLField(as_env='AWS_URL_WHAT')

            number_of_workers = env.IntegerField()
예제 #2
0
        class MyEnvParser(env.EnvParser):

            secret_key = env.CharField()

            is_important = env.BooleanField()

            aws_url = env.URLField()

            number_of_workers = env.IntegerField()
예제 #3
0
        class MyEnvParser(env.EnvParser):

            secret_key = env.CharField(required=False, default='hello')

            is_important = env.BooleanField(required=False, default=False)

            aws_url = env.URLField(required=False, default='http://hi.pl')

            number_of_workers = env.IntegerField(required=False, default=12)
예제 #4
0
        class MyEnvParser(env.EnvParser):

            secret_key = env.CharField(max_length=24, as_file='secret.yml')

            is_important = env.BooleanField()

            aws_url = env.URLField(as_file=True)

            number_of_workers = env.IntegerField()
예제 #5
0
        class MyEnvParser(env.EnvParser):

            secret_key = env.CharField(required=False, allow_null=True)

            is_important = env.BooleanField(required=False, allow_null=True)

            aws_url = env.URLField(required=False, allow_null=True)

            number_of_workers = env.IntegerField(required=False,
                                                 allow_null=True)