MCPcopy Create free account
hub / github.com/hunvreus/devpush / ProjectEnvVarForm

Class ProjectEnvVarForm

app/forms/project.py:121–142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119
120
121class 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
145class ProjectEnvVarsForm(StarletteForm):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected