-
Notifications
You must be signed in to change notification settings - Fork 70
Source config endpoint #692
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,3 +5,4 @@ | |
| from .registration import * # noqa | ||
| from .schema import * # noqa | ||
| from .banner import * # noqa | ||
| from .sourceConfig import * # noqa | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Tiny changes:
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| from rest_framework import viewsets | ||
|
|
||
| from api.serializers import SourceConfigSerializer | ||
| from share.models import SourceConfig | ||
|
|
||
| class SourceConfigViewSet(viewsets.ReadOnlyModelViewSet): | ||
| serializer_class = SourceConfigSerializer | ||
|
|
||
| def get_queryset(self): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since there isn't any special logic, we can just define
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, the file should be renamed 👍 |
||
| return SourceConfig.objects.all() | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sourceConfig-->source_config