| 119 | |
| 120 | |
| 121 | class ProjectEnvVarForm(Form): |
| 122 | env_var_id = HiddenField() |
| 123 | key = StringField( |
| 124 | _l("Name"), |
| 125 | validators=[ |
| 126 | DataRequired(), |
| 127 | Length(min=1, max=100), |
| 128 | Regexp( |
| 129 | r"^[A-Za-z_][A-Za-z0-9_]*$", |
| 130 | message=_l( |
| 131 | "Keys can only contain letters, numbers and underscores. They can not start with a number." |
| 132 | ), |
| 133 | ), |
| 134 | ], |
| 135 | ) |
| 136 | value = TextAreaField(_l("Value"), validators=[Optional()]) |
| 137 | environment = SelectField( |
| 138 | _l("Environment"), |
| 139 | default="", |
| 140 | choices=[("", _l("All environments")), ("production", _l("Production"))], |
| 141 | ) |
| 142 | delete = BooleanField(_l("Delete"), default=False) |
| 143 | |
| 144 | |
| 145 | class ProjectEnvVarsForm(StarletteForm): |
nothing calls this directly
no outgoing calls
no test coverage detected