-
Notifications
You must be signed in to change notification settings - Fork 61
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
[FEEDBACK] Clarify with DRF #25
Comments
So many questions! Let me tick off a few of the easy ones:
|
So to summarize and clarify for my own understanding
Correct? What abt custom methods/actions? Such as change an object from status |
Custom methods: So the |
But the APIView itself would still have the custom endpoint action yes? Using my example of
in the APIView class yes? |
In my experience with experimenting with this styleguide, how you structure your views in # apis.py
class PublishPostView(APIView):
def post(self, request, *args, **kwargs):
result = PostService.publish(post_uuid=kwargs['pk'])
return Response(result) # urls.py
from .apis import PublishPostView
urlpatterns = [
path(
'posts/<uuid:pk>/publish',
PublishPostView.as_view(),
name='publish_post',
),
] I also make use of serializers in |
I am curious to know so wants to clarify
in https://phalt.github.io/django-api-domains/plugins/#django-rest-framework
you wrote
and
https://phalt.github.io/django-api-domains/files (let's call this
Files
section)you have a
Plus you have this helpful diagram https://phalt.github.io/django-api-domains/styleguide/#visualisation
Can you help me to understand how the files work with DRF situation? Perhaps another diagram?
Because I cannot visualize how to use DRF on top of what you recommend under
Files
Another related question is
DO you recommend the use of GenericAPIView or APIView classes in DRF for the
apis.py
?Do you mind giving a visual idea of how two different domains both using DRF would interact with one another similar to https://phalt.github.io/django-api-domains/examples/ ?
What if they are different apps of the same Django project?
The text was updated successfully, but these errors were encountered: