All Questions
24
questions
3
votes
1
answer
173
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
28
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 ...
1
vote
1
answer
62
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
22
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
256
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 ...
4
votes
1
answer
182
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
878
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
223
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
62
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
174
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 ...
0
votes
1
answer
272
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
149
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 ...
3
votes
1
answer
535
views
Storing database references to files/media
This is an extension of this question due to it not covering an important role of my setup that I think needs more attention.
The files are stored on a different server for separation and convenience....
5
votes
2
answers
7k
views
Model design for Online Food order app
I have been trying to develop online food order application. I have taken the concept of zomato.com where a user or say owner registers his/her restaurant. After adding the restaurant, an executive ...
1
vote
1
answer
14k
views
Django query filter on count in one to many relation
I have the following models:
...
1
vote
1
answer
4k
views
Loading data from a text file into the database as fast as possible
I'm building a Django (1.8.12) application that parses a .bc3 file (Standard Interchange Format for Databases of Construction and Real State) and loads all the data into the database (PostgreSQL 9.3.9)...
3
votes
1
answer
96
views
Mapping different classes to the same database table
I have several very similar subclasses that I (think I) want to be stored in the same database table. Most of the fields are identical, with each subclass adding 1 or 2 custom fields. My code is using ...
3
votes
1
answer
38
views
Updating multiple membership plan expiration dates at once
I have model action in RequestAdmin like this:
...
3
votes
1
answer
867
views
Transaction.atomic with continuations
I have a view that looks like this:
...
15
votes
1
answer
367
views
Modeling a Mage character from nWoD, using Django
Goal
Design a representation of a mage character from the World of Darkness RPG, as well their associated spells.
Here is a visual representation of the schema. You can see it more closely on ...
2
votes
1
answer
2k
views
Django Model field naming convention for lookup tables
I'm currently in the process of refactoring a Django app to use Django REST Framework. Within the existing code there are 15 models for lookup tables. The structure of each model is as follows (using ...
13
votes
1
answer
4k
views
Replacement for commit_on_success
I am porting an application from django 1.4.5 to django 1.6.1. I found that commit_on_success has been deprecated. Moreover I found specific incompatibilities when ...