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
3answers
42 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 ...
0
votes
1answer
46 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
0answers
14 views

Django: organization of project with dynamic database

Full-stack development is not new to me (1 year of professional NodeJS experience), however, I have not previously worked with Django. Therefore I could use some advice on what would be the proper way ...
0
votes
1answer
41 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
1answer
45 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
1answer
48 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
3answers
80 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
1answer
41 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
1answer
40 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 ...
0
votes
0answers
31 views

Inheritance and instance-storage design suggestions in Django system

I am learning Django and to make the most out of the educational process I am thinking of this hypothetical system and tries to figure out how I would design and implement it. The hypothetical system ...
0
votes
0answers
21 views

Cache problem on a django made api, already solved but i need to understand what is happening

I made a little application using djangoRESTFramework+vue+axios that is basically a crud, in this little spa (there are two tabs) i send info in the first page and in the second one i fill a table ...
0
votes
0answers
31 views

How to setup micro architecture in python-django multi tenant SAAS?

First of all forgive me if it is not right place to ask this question but I need more discussion on this question from valued engineers and developers please. We have been working on multi tenant ...
-2
votes
1answer
119 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 ...
1
vote
1answer
75 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
1answer
292 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 ...
1
vote
2answers
103 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 ...
1
vote
1answer
59 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
0answers
12 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": "/orders" }, "next": { ...
1
vote
1answer
233 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
1answer
308 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
1answer
85 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 ...
3
votes
0answers
48 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 ...
2
votes
0answers
59 views

Use model instance to access model's manager 'objects'

In the Django documentation it's mentioned that Django managers are accessible only via model classes rather than model instances to enforce table and record level operations. What are table and ...
0
votes
2answers
100 views

How should I update non-maintained database tables between production and development?

I'm working on a Django web application (with a mySQL back-end) that uses non-maintained tables(tables not modified by the web app). However, I have two copies of the data tables (one for production ...
1
vote
3answers
1k views

How can we make a UML diagram (or something similar) for a project which doesn't contains classes (like non object oriented)?

I am working on a python project and I didn't use classes but created different modules and added functions in them. Now I need to draw a diagram to describe the project/application for a paper. I ...
0
votes
3answers
188 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 ...
1
vote
1answer
33 views

Most readable way of generic views placement

What are your suggestions on placing many generic views? Let's consider a classic situation where I have many generic views for CRUD for given models. What is the best way to place them in views.py? ...
4
votes
2answers
251 views

Does software architecture depend on framework being used?

When I was building my backend API I used Django combined with django-rest-framework (DRF) because it was the easiest and fastest way to create what I needed. And I haven't thought about an ...
2
votes
1answer
330 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. ...
-2
votes
1answer
83 views

Ways to get up to speed understanding an existing Django program

I have just started a new job in which I will be overhauling and updating a web-application written in Django. I have a loose familiarity with Django (and have been reading up on the documentation for ...
1
vote
1answer
56 views

Bulk Inserting Data with Duplicates or Line by Line Insertion Without

I am loading a large amount of data (2,000 files with about 30,000 rows, 30 columns) for use in a Django application. The files are based on 40 different templates. The column names are consistent ...
0
votes
1answer
4k 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 ...
1
vote
1answer
689 views

Django Fat Models: Where should I put model creation logic?

I'm reading Two Scoops of Django 1.11. At 7th chapter it introduces "fat models". It says that best practice is to put a big part of logic into the model and keep views as thin as possible, but then ...
1
vote
1answer
132 views

How can I model unknown and an unknown number of attributes on an object?

My example might be slightly contrived, because I've modified it so that the project isn't recognizable by my employer. I'm a newer developer at a very small company. We have an object - Posts - that ...
-4
votes
1answer
93 views

How do I know a product is in the “will_expire” state? [closed]

I am developing a software system and in it there are time-measured products. The customer buys the product for a period of time, such as one month. If the user does not list their products everyday, ...
1
vote
1answer
609 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 ...
0
votes
1answer
733 views

Refactor Django application - split monolith into REST API and frontend

I am in the process of refactoring a Django web app. It is written in the usual MVT style, and I would like to change this for a REST + frontend approach. In my first iteration I would like to do as ...
1
vote
1answer
153 views

What are the most effective ways to manage rot in your platform's dependencies?

I have a couple of inactive Pinax sites at different versions (0.9.x and 0.7.x). These both started with two common features: While the version of Pinax was the most recent to have a (nonempty) ...
0
votes
1answer
160 views

Django Project for REST endpoints and client view

I have a project where I will be creating certain data models, and managing them. I also want to provide functionality to external clients to access and modify this database. So the question is around ...
0
votes
2answers
1k views

How to secure web services when authentication is done at client side (frontend)

I have web application which structure is as- webapi : django web services [NOT REST] no security implemented frontend : Angular2. authentication implemented via SAML Database : Mongodb Can you ...
0
votes
1answer
2k 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 ...
3
votes
3answers
328 views

What's the proper way to create a list of several slightly different models?

I'm specifically asking about Django here, but I'd appreciate any insight. I'm currently writing up a basic social network. My plan is to allow users to make different kinds of posts (ie text posts, ...
2
votes
1answer
4k views

Django - separation from the frontend (Templates)

Long story short, let's assume I want to create a webpage that would enable the users to sell used cars. I am a beginner to webdev, so pardon my ignorance. Fun fact: two months ago I knew literally ...
1
vote
3answers
334 views

Django web app: how to save thousands of variables per user

There is a website driven by Django where the user logs in and can answer thousands of questions. I want to persistently save whether a given user has answered a given question or not. My approach so ...
2
votes
1answer
335 views

How do I create front end test data based on backend model's schema?

I'm really struggling with creating robust tests for my frontend because of the coupling in data schema between my backend and frontend. To clarify, I have a Django rest API and I have a front end ...
0
votes
1answer
338 views

Looking for advice on how to implement Likes

I'm using Django and Django-Rest-Framework to build a simple photo sharing app/website and just now getting around to implementing a "Like" system. A couple of options I've thought about (surely there ...
-1
votes
1answer
107 views

How should I handle an object that has copies of another object?

I really hope this is a good place to ask this since the answers might be subjective, but here it my problem: This is probably irrelevant, but I'm working with Python and Django here. I have the ...
3
votes
2answers
624 views

What is the right time to go for Code Refactoring, not optimization?

I've been working on a Python(Django)/JavaScript(AngularJS) based application for some time now.(I learnt all of these on the way, had previously been a Java only programmer)and have hit moments where ...
1
vote
2answers
766 views

Hardcoding on frontend

I have an API which returns a list of articles. An article can have three status: Approved, Pending and Rejected. Now the front-end needs to hit the API in following scenarios: Get all the articles ...
1
vote
1answer
583 views

Data Transfer Between Loosely Coupled Modules of an Application

Let's say we have a rather large project written in Python using the Django framework that is made up of multiple modules (proper term in Django is a project made up of multiple apps, but for the sake ...