All Questions
25
questions
0
votes
1
answer
74
views
Alternative ways to transfer records from one environment to another
I'm working on an application which has a feature of syncing records between two environments. For example, a record A is created in environment A. After a user verifies it, the user can use the sync ...
-1
votes
1
answer
62
views
How to break a bloated decorator into smaller parts in Django?
In a project I am doing, I have to perform a lot of repetitive checks at the beginning of each API end point. As the amount of duplicate code started to grow, I thought of using a decorator to wrap ...
0
votes
3
answers
2k
views
Optimal method of storing image thumbnails
I'm working on an application with a database containing many recipes. The API is written in Django (with Django REST Framework) and frontend in React.Each recipe is assigned a high-quality image. In ...
0
votes
1
answer
854
views
Best way to design multiple paginations in a REST API
Let's suppose that I have a model named Collection. I can create a collection, this collection have two important fields: shared_with_company, shared_list.
currently I have an endpoint: /collections
...
1
vote
1
answer
1k
views
What is the best way to design calls of post and comments in a rest api?
So, currently I have two models: Post and Comment. Where a post can have multiple comments.
I have an endpoint named Posts and an endpoint named Comments that is called to retrieve comments of a post.
...
3
votes
2
answers
2k
views
Communication between two apps
I am thinking of creating two applications, one of which (App 1) will be in Django (DRF) and other (App 2)might be Django but might be another more lightweight framework (maybe Flask or plain Django ...
1
vote
2
answers
385
views
Best Practice: Should cascading updates be handled by the frontend or the REST API?
I am designing a timesheet app for logging user tasks using React for frontend and Django REST Framework for backend. The database is PostgreSQL and I have a table for recording the tasks with 4 ...
-3
votes
1
answer
180
views
REST API Testing best strategy
I'm currently developing a personal project using Django REST + React and as it grows more complex, I want to add unit testing to ensure that changes don't affect previous functionality. However, I'm ...
2
votes
1
answer
2k
views
Should a REST API be used when a websocket is already open?
Background: I was working on a web-socket application integrated into a more conventional http request based website that uses REST APIs.
Task: I need to retrieve user history from the database for ...
1
vote
0
answers
17
views
Hypertext Application Language grouping items in a collection
For the purposes of this question I can use an example document straight from the HAL spec, since my problem is very similar:
{
"_links": {
"self": { "href": &...
4
votes
1
answer
2k
views
Why does the Django Rest Framework encourage separating Model, Serializer and Views for the same object across multiple files?
Summary: Why shouldn't I put model, serializer and view classes for the same object in the same file in my Django Rest Framework application?
I'm building an application using the Django Rest ...
5
votes
0
answers
200
views
Should custom Django Admin be separate from client endpoints?
I am currently in the process of creating a Django REST framework project for a client server web app. I would like to ask the following:
Should I write a custom admin if I want my app to be ...
0
votes
3
answers
533
views
Url pattern for making a 'like' with a REST API
I have an API route as so:
GET /api/item/like
Which makes a like object between the logged in user and item object, and it works fine.
Is this the correct way to have a user 'like' an object? Or ...
0
votes
1
answer
5k
views
Break up django monolith into microservices
We currently have a big Django web application: all data is centrally managed by the webapp, via models backed by Postgres.
We want to offer access to the data in a more decentralized way, and the ...
2
votes
1
answer
1k
views
REST API for different User Roles in a SAAS application
Need some help in the desing of the Auth/Permissions of a REST API for a SAAS app.
I'd done a prototype of a SAAS app and for permissions of the SAAS client, I'd setup the API to request for a header ...