Skip to content

Emergency pages: Add new model and register for translation.#2767

Draft
sandeshit wants to merge 4 commits into
project/dref-emergency-pagesfrom
feat/dref-summary-emergency-endpoint
Draft

Emergency pages: Add new model and register for translation.#2767
sandeshit wants to merge 4 commits into
project/dref-emergency-pagesfrom
feat/dref-summary-emergency-endpoint

Conversation

@sandeshit

Copy link
Copy Markdown
Contributor

Changes

  • Add new summary model.
  • Add summary fields to emergency endpoint.
  • Register for translation
  • Update tests/

Checklist

  • Updated/ran unit tests
  • Updated CHANGELOG.md

@sandeshit sandeshit changed the title (Emergency pages): Add new model and register for translation. Emergency pages: Add new model and register for translation. Jun 23, 2026
@sandeshit sandeshit marked this pull request as draft June 23, 2026 05:46
Comment thread dref/models.py
)

created_at = models.DateTimeField(auto_now_add=True)
updated_at = models.DateTimeField(auto_now=True)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

Comment thread dref/models.py
Comment on lines +1707 to +1710
class SummaryStatus(models.IntegerChoices):
PENDING = 100, _("Pending")
SUCCESS = 200, _("Success")
FAILED = 300, _("Failed")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's also add Processing status too. Here!

Suggested change
class SummaryStatus(models.IntegerChoices):
PENDING = 100, _("Pending")
SUCCESS = 200, _("Success")
FAILED = 300, _("Failed")
class SummaryStatus(models.IntegerChoices):
PENDING = 100, _("Pending")
PROCESSING = 200, _("Processing")
SUCCESS = 300, _("Success")
FAILED = 400, _("Failed")

Comment thread dref/serializers.py
)


class DrefSummarySerializer(serializers.ModelSerializer):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
class DrefSummarySerializer(serializers.ModelSerializer):
class DrefSummarySerializer(ModelSerializer):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge this Migrations!

Comment thread dref/models.py
Comment on lines +1721 to +1724
hash = models.CharField(
max_length=64,
unique=True,
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
hash = models.CharField(
max_length=64,
unique=True,
)
prompt_hash = models.CharField(
max_length=64,
unique=True,
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants