from Hacker News

Ask HN: Who Did Separate a Django's Front End?

by Fazel94 on 8/10/20, 9:46 PM with 2 comments

I need some advice and general thoughts on how to move my Django monolith's front-end to a front-end library. Is it a good thing in of itself? How should I approach it? How did you approach it? What did you learn from doing it?
  • by cyberpanther on 8/10/20, 10:30 PM

    I normally like to use Graphene to create a GraphQL API. Then you can use Vue, React, Angular, etc to build your frontend. You'll convert your read views to Queries that are rendered on the frontend. A big part of the change is likely tied up in Django Forms. You can use these forms in Graphene and convert them to mutations. https://docs.graphene-python.org/projects/django/en/latest/m...