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.
214 questions
2
votes
1
answer
256
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 ...
2
votes
1
answer
439
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 ...
2
votes
1
answer
5k
views
How is/can front- and backend be separated in Django?
I am evaluating frameworks and I would like to understand Django's architecture better.
Coming form a Java background I developed components separately namely front and backend. More concretely ...
0
votes
0
answers
53
views
How to abstract data provision in django?
Say myModel's data should be populated from multiple third party providers llm/api data.
I want to avoid repeating the get_response logic in multiple models.
My current thoughts consist of inheriting ...
1
vote
1
answer
707
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
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.
...
11
votes
2
answers
1k
views
Unit testing in Django
I'm really struggling to write effective unit tests for a large Django project. I have reasonably good test coverage, but I've come to realize that the tests I've been writing are definitely ...
2
votes
1
answer
6k
views
Populate User info between services on microservices architecture
I'm working on a microservices architecture which contains a couple a REST API as a services and a SPA as an interface. In addition, there are an "special" (is not speacial at all, it just special ...
1
vote
1
answer
87
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 ...
1
vote
0
answers
69
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 ...
2
votes
1
answer
265
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 ...
4
votes
1
answer
1k
views
Separating AngularJs and Django into individual Apps?
I am building a web application using AngularJs and our web server is built in Python Django Rest Framework.
I would like to have the two projects separated and not coupled.
In my current setup the ...
0
votes
1
answer
143
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
1k
views
Django - should I create related objects immediately or on demand?
Let's say you have a ForeignKey MyModel.related_model and this related_model has all fields either null=True or default=something.
Like User.userprofile which I use on several places in my project. ...
1
vote
1
answer
5k
views
Django and websockets: Channels vs Socket.io vs other?
In my Django web app I want to monitor my remote Raspberry PI clients - up to hundreds - using WebSockets: I have to check in their status in real-time (online, working, offline etc.), send commands ...