Skip to content

Commit

Permalink
Merge pull request #560 from NASA-IMPACT/backend-changes-feedback-for…
Browse files Browse the repository at this point in the history
…m-EJ

Added backend API endpoint modifications to accommodate EJ feedback responses
  • Loading branch information
bishwaspraveen authored Jan 25, 2024
2 parents 525c605 + 70f4302 commit 2dd1545
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11,766 deletions.
2 changes: 1 addition & 1 deletion feedback/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

@admin.register(Feedback)
class ContactFormAdmin(admin.ModelAdmin):
list_display = ["name", "email", "subject", "comments"]
list_display = ["name", "email", "subject", "comments", "source"]
search_fields = ["name", "email"]
list_filter = ["subject"]

Expand Down
17 changes: 17 additions & 0 deletions feedback/migrations/0003_feedback_source.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Generated by Django 4.2.6 on 2024-01-25 16:48

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("feedback", "0002_alter_contentcurationrequest_additional_info"),
]

operations = [
migrations.AddField(
model_name="feedback",
name="source",
field=models.CharField(blank=True, default="SDE", max_length=50),
),
]
1 change: 1 addition & 0 deletions feedback/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class Feedback(models.Model):
email = models.EmailField()
subject = models.CharField(max_length=400)
comments = models.TextField()
source = models.CharField(max_length=50, default="SDE", blank=True)

class Meta:
verbose_name = "Feedback Response"
Expand Down
2 changes: 1 addition & 1 deletion feedback/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class FeedbackSerializer(serializers.ModelSerializer):
class Meta:
model = Feedback
fields = ["name", "email", "subject", "comments"]
fields = ["name", "email", "subject", "comments", "source"]


class ContentCurationRequestSerializer(serializers.ModelSerializer):
Expand Down
Loading

0 comments on commit 2dd1545

Please sign in to comment.