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
167
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
134
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
173
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
85
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
388
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
327
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
...
0
votes
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.
...
0
votes
1
answer
830
views
How to Properly Design an API Prefetch System
I'm creating an API for a web service. There are a couple of endpoints in this API that require some time (lets say +5min) to compute, so I'm creating a prefetch system that will call in the ...
-3
votes
1
answer
101
views
Creating a Django web-app with Sage 200 Database
I have been asked to create a Django/Python web app that creates web-based, .pdf and excel reports from a Sage Evolution database. While the sage front-end is still being used. My client essentially ...
0
votes
3
answers
274
views
Fetch the most recently updated records in a database across multiple tables in a performant manner
I have an Angular + Django web application in which Django functions as my backend.
In this web application, I have 12 different tables about articles, each table representing a different kind of ...
0
votes
1
answer
1k
views
Appointments using time slots
I would like to create a dynamic appointment system between teacher and student to easily allow them to make an appointment.
In this system, teachers select their 30 minutes time slot availabilities ...
-2
votes
1
answer
1k
views
Appointments Booking Using Slots
I'm looking for an efficient way to create appointments between teachers and students.
I want teacher to be able of make their students know their availabilities : For example, A Teacher writes on the ...
1
vote
1
answer
527
views
Is microservice approach always best fit for ETL processes?
In our project we are using Django and Django Rest Framework as main application to get/query the data from database and send it to the frontend. Those endpoints are very fast as they should be. ...
2
votes
2
answers
615
views
Reading a large CSV file and then loading data to a DB
I have a Django application of 2 GB running and I need to receive a CSV file of more than 1 GB, read it and load the data to a PostgreSQL DB in IBM Cloud. The problem is that if I receive the file, it ...
3
votes
1
answer
534
views
Distributing Web application to multiple customers
I am building an app (stack is Python/Django/React and DB is PGSQL) that is supposed to be used internally in companies to track their work, assign people to different tasks, throw some statistic data,...
3
votes
2
answers
3k
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
462
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 ...
0
votes
2
answers
101
views
What's the right way to handle authentication of users across 2 web applications
There are 2 independently functioning web applications. Web-app1: (Flutter+Django+Postgres). Web-app2: (Angular+Spring+Postgres). Each of the web-apps has its own user database and are functioning ...
0
votes
1
answer
316
views
Is it good practice to use the Django template system and/or its admin site for commercial applications?
As a beginner to web applications and front end stuff, I'm really confused about if it's good practice to use the Django template system and its admin interface in commercial applications.
As far as I ...
0
votes
0
answers
368
views
Best route for multiple user roles with toggleable permissions with React and Django Rest Framework
What is the best way to create dynamic user roles that can have toggleable permissions?
I am currently creating my very first website which has a react front end with redux toolkit and redux saga and ...
-2
votes
1
answer
261
views
Use 1 to many relationship on same model or split it into two different models?
I'm building a forum application using the Django web framework but I'm not sure how to design the entity relationship diagram when it comes to the Post model. Since one Post can have many replies, ...
3
votes
2
answers
1k
views
How should I structure my database entities with invites and recipients for e-signing web app?
I am interested in implementing the following requirements for my e-signature web application.
A user can create a new signing contract. That contract can include multiple users to sign. The contract ...
-1
votes
2
answers
482
views
What makes LINQ (C#) unique compared to another DSL such as Django query syntax?
My question to the community is this:
What makes C#'s LINQ Unique from other query language in other languages and frameworks, or does it not have anything to make it unique at this point?
...
2
votes
1
answer
1k
views
Best approach for developing a stateful computation-heavy application with a rest-api interface using python?
I want to develop an end-to-end machine learning application where data will be in GPU-memory and computations will run on the GPU. A stateless RESTfull service with a database is not desirable since ...
2
votes
2
answers
859
views
Understanding the importance of Gunicorn and Nginx for Django web development
I'm entirely uninitiated to the world of web development, and only have a tentative grasp on Django and web development through the test server it works through.
From the guide I'm reading, the author ...
1
vote
1
answer
486
views
How to efficiently communicate with Raspberry Pi using Django/Python
I have a raspberry pi that is sending an https request to my Django application every 2 seconds. The request is essentially asking the application 'Has a user requested data from me?'
My Django ...
0
votes
1
answer
101
views
Email Notifications Implementation - Web Application
Good day,
I'm having difficulty structuring how I should set up email notifications for a Django app that I built.
As I'm seeing an increase of users in the app, it increases the occurrence of email ...
-3
votes
1
answer
278
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 ...
-4
votes
1
answer
146
views
Keeping JSON in database
I'm trying to create web app(flask or django-rest) that would scrape some data and save it to JSON so that it can be viewed in the frontend (VueJS).
I'm wondering if it is better to save the scraped ...
-1
votes
3
answers
204
views
Can I manage thousands of concurrent connections with a non-Node stack?
I'm developing a social network with Django (Python) + Postgres SQL. My site will have a chat feature so that users can communicate to each other in real-time, and the communication will be only from ...
1
vote
1
answer
110
views
Scraper in separate repo from visualization component?
Let me explain my thoughts about architecture of the project I'm working on.
The project code repository consist of:
Scrapy component - of course it serves to scrape data, process it and calculate ...
-5
votes
1
answer
779
views
Sync local database with remote
My client has a business which work mostly in remote areas where internet felicity is limited, We have a central database and the branches in remote areas need to connect to the central database.
We ...
-1
votes
1
answer
418
views
Is Python's Django WebFramework good to design Expert System as a Web App?
I hope everyone is good. Well, I am at the end of my degree BS (Software Engineering), and in the third Phase of my Final Year Project named as 'Test Phase'.
My Project is to build an Expert System ...
3
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 ...
0
votes
1
answer
848
views
Double way parent child relationship in Django
I am building an app to register and update children information, this information is to be provided by their tutors. Every child can have multiple tutors, and a tutor can be a tutor for multiple ...
2
votes
2
answers
209
views
Architecture to populate graphs from real-time data
I'm developing an application where graphs need to be populated from realtime data.
The Real-Time data comes from a Kafka Queue.
How should I send this real-time data to the front-end which is in ...
2
votes
1
answer
408
views
Using Django Sessions when views are accessed by API
I'm making an app which is a Django backend and a React frontend (being developed by someone else). The plan currently is to fully decouple the two and have them communicate over API. However, I would ...
1
vote
0
answers
22
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 ...
-3
votes
1
answer
348
views
Why do people keep reusing superclass names in their subclasses?
In my project, I found one of the project's classes reusing the same name as an official one.
For example:
from django.db import models
class Model(models.Model):
class Meta:
abstract = ...
2
votes
1
answer
243
views
Access control to Django App running on private server
I am a self-learning programmer (with a fair share of python knowledge), and currently a company asked to develop a simple application so that they can track employee expenses (and I thought of using ...