Questions tagged [django]
Django is an open source server-side web application framework, written in Python. It is designed to reduce the effort required to create complex data-driven websites and web applications, with a special focus on less code, no-redundancy and being more explicit than implicit.
213 questions
2
votes
1
answer
160
views
Serving several external APIs in Django + Angular application
I'm working on a web-based app that uses Django and Angular. This app uses several external APIs to fetch environmental data from different monitoring networks. We then use these data to perform ...
1
vote
0
answers
65
views
How can I use django to render a rotating view of a database?
As a toy problem for learning Django, I am trying to create a simple web app that tracks encounters and initiative for one of my D&D campaigns. I have a database with models for combatants:
class ...
0
votes
1
answer
68
views
Best way to approach connection between game server to client connection with Django web server as middleman
I have a web game design question. I am trying to build a multiplayer web game with non-intensive graphics (ex tic-tac-toe, chess). I am trying to figure out how to take already authenticated users in ...
0
votes
1
answer
130
views
Implementing Real-Time Signal Failure Handling (Django)
I'm developing a trading platform using Django, where users can publish trading signals with specific stop losses. I'm facing a challenge in implementing a real-time feature to automatically mark ...
0
votes
1
answer
99
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 ...
-3
votes
1
answer
172
views
Learn a framework on a project, or mix languages between backend services [closed]
I am designing my next project, which will do various domain-specific tasks, but all that will be controlled and used via a generic crud web app.
I have been professionally using Java with Spring for ...
0
votes
0
answers
216
views
How to maintain state for a turn-based game in django
I am using django to develop a turn based chess variant. I just finished using django-channels to create a lobby and match 2 players together. Now, I need to make them play each other and I'm thinking ...
1
vote
1
answer
520
views
Is storing access token in private data, refresh token in http-only cookie safe?
Backend: Django / Django Rest Framework, would be hosted at GCP k8s
Frontend: Angular, would be hosted at some CDN e.g Vercel
Authentication: JWT (https://github.com/jazzband/djangorestframework-...
-1
votes
1
answer
78
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 ...
1
vote
1
answer
383
views
Django: Is there a reason to separate api calls into their own url endpoints?
I started a project awhile back and have made a lot of progress since then. In the beginning I didn't think much about restful architecture and how I'd serve data to the frontend. Now, however, it ...
0
votes
0
answers
61
views
In (Django) web application should if-else logic be at a high level (view) or a low level (template)?
Given a (Django) web application following the model-template-view model, when returning a template based on an object should if-else logic be in the view or the template?
The API endpoint (view) gets ...
0
votes
0
answers
325
views
How to store multiple-users authorization tokens from a single service if I can't use a persistent storage?
I'm new to "web development" so I don't know much about ways to store data.
I'm trying to build a web app using Python-Django which accesses private data from multiple accounts. The data ...
0
votes
3
answers
4k
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
651
views
Should I Add Integration Or Unit Tests To Django Views
I am currently exploring adding unit tests to my Django REST Framework project. I totally understand adding unit tests for other components of the app like models. However, I'm stuck at testing views. ...
0
votes
1
answer
1k
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
...