Conversation
oddstr13
left a comment
There was a problem hiding this comment.
All in all, I think we should just create a simple "dummy" endpoint for now.
|
|
||
|
|
||
| # this is the Attendant model, im unsure if we need more data? Maby date of birth? => 18 years maby? | ||
| class Attendant(models.Model): |
There was a problem hiding this comment.
Models should be implemented in the database repo.
We have exactly none of the identifying information listed here for attendants, but we could use some of it for the crew interface.
|
|
||
|
|
||
| @api_view(["GET", "POST", "PUT", "PATCH", "DELETE"]) | ||
| def api_get(request, pk=None): |
There was a problem hiding this comment.
Right now, to get started on the frontend, it would make sense to just return some simple test data (hardcoded Response data, possibly a few mutations based on the provided input variable)
| # Change the model later depending on requirements. Please tell me what, and il remake the model later to fit requirements. | ||
|
|
||
|
|
||
| class AttendantAdmin(serializers.ModelSerializer): # defined a serialiser class |
There was a problem hiding this comment.
Any particular reason for why this is named AttendantAdmin?
| @@ -0,0 +1,31 @@ | |||
| # Generated by Django 5.1.3 on 2024-11-25 08:50 | |||
There was a problem hiding this comment.
Wrong repo, see other comment
|
|
||
| # Register your models here. | ||
|
|
||
| class AttendantAdmin(admin.ModelAdmin): |
There was a problem hiding this comment.
Wrong repo, see other comment
No description provided.