Skip to content

[FEEDBACK] Clarify with DRF #25

Open
@simkimsia

Description

@simkimsia

I am curious to know so wants to clarify

in https://phalt.github.io/django-api-domains/plugins/#django-rest-framework

you wrote

When using DRF, we can organise the logic in a domain this way:

urls.py - Router and URL configuration.
apis.py - DRF view functions or view classes.
serializers.py - Serialization for models.

and

https://phalt.github.io/django-api-domains/files (let's call this Files section)

you have a

  • models.py
  • apis.py
  • interfaces.py
  • services.py

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions