All Questions
25 questions
2
votes
3
answers
202
views
Inventory Management System
I'm trying to learn Django by building an inventory management system, here's my final models.py.
I'm looking for feedback!
...
3
votes
1
answer
181
views
Summing categories of financial records per month in a query
My program is working properly but I'm unconfortable with code repetition.
...
1
vote
0
answers
33
views
Django data migration - worked, but far from performant
Background: I am learning web dev and decided on the Django framework as an excuse to learn Python at the same time. (Background is stats with lots of R and ...
2
votes
1
answer
75
views
Wanted to eliminate the repetition in the classes created to reduce duplication
Can some one help me on how to eliminate repetition to reduce duplication score on the below classes created in the code
...
1
vote
0
answers
27
views
processing webhook request coming from a 3rd party application
I need some help to evaluate whether I am doing it right. The scenario is, a 3rd party application is sending a webhook request after a successful payment but the problem is that sometimes this ...
3
votes
0
answers
1k
views
Product inventory database with attributes and variants
I have design a model for product apps. This is the first time I am trying to create a product's database schema and then model it in Django. My code handles the following:
A product type can have ...
2
votes
1
answer
294
views
Speed up Django migration that adds two fields into one
Currently trying to migrate two fields of information into one field. We have many, many objects to go through and it takes roughly 12 minutes to loop through all the objects. That would mean the ...
3
votes
1
answer
227
views
Django model for real estate
I have built a real estate management system with Django. I want to know if my design database was wrong. Please let me know how to improve it.
Should I make the models use more than two tables (...
1
vote
1
answer
930
views
Isolate a Database Change Within Django Transaction.Atomic
I have been typically adding the @transaction.atomic decorator to my endpoints and appreciate if a request fails at any point the data completely rolls back. However, some of my endpoints will make ...
2
votes
0
answers
233
views
Django social network application - database schema
I am writing a simple social media application in Django. I would like to know whether the following model structure is correct, or how can I improve the schema to get better performance. Do I need to ...
3
votes
0
answers
5k
views
Django 'Like' functionality for a post
I am implementing a like button for posts (Using a clustom Like model and the pre-defined User model from django.contrib.auth).
Would appreciate hearing how I can improve this code. Also, I am ...
1
vote
1
answer
70
views
script that imports only data that is not in the database yet
I want to write a script that imports data into a database (in django). The database has a Company class with a name (CharField) instance. Additionally, it has a Person class with name (CharField), ...
7
votes
1
answer
181
views
Database modeling for products and store
I am planning to develop a virtual shopping mall where stores of any kind can be registered, such as in a physical shopping mall. First I want to develop an efficient and effective database modeling ...
1
vote
1
answer
414
views
Django query to find all items without a FK relationship except for excluded list
I have a Book model and an Author model that has a FK relationship to Book (I realize that ...
5
votes
1
answer
165
views
Civil status database with Django
I'm beginning with Django and I have a Civil Status project.
I created my first models.py in order to get a Form, but I had some advices in order to normalize my database.
I made this process and I ...