Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
14 views

What is a common design pattern in Django Model: custom Manager vs custom QuerySet

In Django, I have a model Country. Along with many columns, there is a BooleanField is_deleted. Most of the times, data retrieved from this table will be with filter is_deleted=False, however there ...
fishfin's user avatar
  • 101
0 votes
1 answer
104 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 ...
scaryhamid's user avatar
0 votes
0 answers
45 views

How should I design my library website security wise?

I am building a library website (sort of) based on django but I'm getting lost in the security paradigm. The user can choose a book from the system library or upload their own books. The book is then ...
Sy Ker's user avatar
  • 101
0 votes
1 answer
72 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 ...
Lucifer Darknight's user avatar
-3 votes
1 answer
111 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 ...
rafal.sz's user avatar
0 votes
0 answers
67 views

Maintaning isolation between modules in Django monolith

In our company we have a monolith. Right now is not that big but we are already seeing some problems with the isolation between the modules we have. Our setup is pretty similar to other Django ...
Antonio Gamiz Delgado's user avatar
0 votes
0 answers
151 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 ...
Alex Li's user avatar
  • 109
1 vote
1 answer
422 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-...
AhmedBilal's user avatar
-1 votes
1 answer
59 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 ...
Farzad's user avatar
  • 3
1 vote
1 answer
241 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 ...
noob112233's user avatar
0 votes
0 answers
48 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 ...
M3RS's user avatar
  • 129
0 votes
0 answers
188 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 ...
Guillermo Leon Rodriguez's user avatar
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 ...
gandalf113's user avatar
0 votes
1 answer
456 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. ...
Daniel's user avatar
  • 11
0 votes
1 answer
771 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 ...
Leonardo Furtado's user avatar
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. ...
Leonardo Furtado's user avatar
0 votes
1 answer
446 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 ...
Stack's user avatar
  • 151
-3 votes
1 answer
83 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 ...
Kyle's user avatar
  • 1
0 votes
3 answers
207 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 ...
Philipp Doerner's user avatar
0 votes
1 answer
806 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 ...
anthonya's user avatar
  • 109
-2 votes
1 answer
917 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 ...
anthonya's user avatar
  • 109
1 vote
1 answer
430 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. ...
Alex T's user avatar
  • 161
2 votes
2 answers
487 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 ...
Elvin Quero's user avatar
3 votes
1 answer
309 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,...
Freshman's Dream's user avatar
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 ...
Alex T's user avatar
  • 161
1 vote
2 answers
369 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 ...
Alvin's user avatar
  • 19
0 votes
2 answers
82 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 ...
mAsK's user avatar
  • 103
0 votes
1 answer
238 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 ...
bwdm's user avatar
  • 103
0 votes
0 answers
303 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 ...
Asif333's user avatar
-2 votes
1 answer
204 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, ...
flyingfishcattle's user avatar
3 votes
2 answers
966 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 ...
Viktor Vostrikov's user avatar
-1 votes
2 answers
398 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? ...
Kayden Miller's user avatar
2 votes
1 answer
960 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 ...
ardaasik's user avatar
2 votes
2 answers
645 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 ...
genjong's user avatar
  • 123
1 vote
1 answer
390 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 ...
MattG's user avatar
  • 113
0 votes
1 answer
85 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 ...
Paolo's user avatar
  • 101
-3 votes
1 answer
169 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 ...
Antonis Karvelas's user avatar
-4 votes
1 answer
97 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 ...
Alex T's user avatar
  • 161
-1 votes
3 answers
177 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 ...
Fran's user avatar
  • 9
1 vote
1 answer
84 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 ...
Bob's user avatar
  • 13
-5 votes
1 answer
502 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 ...
Jisson's user avatar
  • 93
-1 votes
1 answer
387 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 ...
Khubaib Khawar's user avatar
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 ...
vonSchweetz's user avatar
0 votes
1 answer
807 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 ...
Rodrigo Caicedo's user avatar
2 votes
2 answers
193 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 ...
saintlyzero's user avatar
2 votes
1 answer
285 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 ...
Neil's user avatar
  • 219
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": &...
Neil's user avatar
  • 219
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 ...
Rackamore's user avatar
-3 votes
1 answer
330 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 =...
Sarit's user avatar
  • 97
2 votes
1 answer
226 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 ...
drec4s's user avatar
  • 121

1
2 3 4 5