-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/github_actions/docker/build-push-…
…action-6
- Loading branch information
Showing
19 changed files
with
329 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from __future__ import annotations | ||
|
||
from django import forms | ||
|
||
from firefighter.incidents.models import Environment | ||
|
||
|
||
def initial_environments() -> Environment: | ||
return Environment.objects.get(default=True) | ||
|
||
|
||
class EditMetaForm(forms.Form): | ||
title = forms.CharField( | ||
label="Title", | ||
max_length=128, | ||
min_length=10, | ||
widget=forms.TextInput(attrs={"placeholder": "What's going on?"}), | ||
) | ||
description = forms.CharField( | ||
label="Summary", | ||
widget=forms.Textarea( | ||
attrs={ | ||
"placeholder": "Help people responding to the incident. This will be posted to #tech-incidents and on our internal status page.\nThis description can be edited later." | ||
} | ||
), | ||
min_length=10, | ||
max_length=1200, | ||
) | ||
environment = forms.ModelChoiceField( | ||
label="Environment", | ||
queryset=Environment.objects.all(), | ||
initial=initial_environments, | ||
) |
27 changes: 27 additions & 0 deletions
27
src/firefighter/incidents/migrations/0004_incidentupdate_environment.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 4.2.14 on 2024-09-27 10:06 | ||
|
||
from django.db import migrations, models | ||
|
||
import firefighter.incidents.models.environment | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("incidents", "0003_delete_featureteam"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="incidentupdate", | ||
name="environment", | ||
field=models.ForeignKey( | ||
blank=True, | ||
null=True, | ||
on_delete=models.SET( | ||
firefighter.incidents.models.environment.Environment.get_default | ||
), | ||
to="incidents.environment", | ||
), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.