Questions tagged [django]

The tag has no usage guidance.

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

django-admin: postgresql trigger function

I have this table in django admin site the (Student_enrollment_record), if i select an student and update/save the Section field and it will search the Section field on what i select on the table (...
-1
votes
1answer
148 views

How to downgrade sqlite3 that comes with Python and Django

So I am stuck in this problem: https://stackoverflow.com/questions/53637182/django-no-such-table-main-auth-user-old I can't upgrade Django because many other applications are connected to it using ...
1
vote
1answer
32 views

UUID as primary key and download ID

I'm designing a Django Rest Framework API with PostgreSQL. In the database I'll be recording information about documents which can be requested for download. I want the request to include a unique id, ...
-3
votes
1answer
32 views

How to copy data from a table to another in O(1) time complexity?

I have a table Customer with fields id, account_balance, etc. At the end of every month at midnight I want to copy the whole list of customers with their account balance to another table(month, year, ...
0
votes
0answers
9 views

Django - Database design improvement

In a simple scenario, where I have many measurements table that describe the measurements that comes from a specific protocol and every measurement is linked to the respective parent device, I was ...
1
vote
0answers
29 views

How to model complex relationship between three Models in Django

I have to model the following entities: BuildingSite, Company, Worker. Each entity has a many-to-many relationship with the other entities, and each relationship some attributes like start_date, ...
0
votes
0answers
118 views

Building an Entity-Relationship Diagram for a Language Dictionary

I need advice on how to build entity-relationship diagram (ERD) for Language Dictionary. Since I did not build ERD before, I will try to explain and show the ultimate goal of this project below. ...
0
votes
0answers
143 views

Authintcation error 28000 + 18456

I have been trying to link my mssql database to Django. When I run the Django server I get the error below. For normal query (out of Django), it works fine, however, the Django doesnt even connect. ...
0
votes
1answer
217 views

django_session table killing my MySQL server and django app

I need your help I hav a Django app that is about 7 years old and have been degrading now..every time the website goes down and back up and the issue is with mysql server Usually i need to just ...
2
votes
0answers
93 views

Database Design for tracking user flow

I want to design a user tracking system between different tables/models. I want to track the user's progress. There is a Module table which is related to sections and sections are related to sub-...
1
vote
0answers
79 views

Why my heap read/heap hit ratio is negative?

I have a database with 200k rows (one of this column is a jsonb data type column), i'm using this database to store some various devices informations (currents, pressure, etc...) and i'm using this ...
1
vote
0answers
230 views

PGPool II + Django w/ psycopg2 load balancing

I've a pool of applications running django 1.6 with psycopg2 on top of a PGPool II with two backends PostgreSQL servers. But all queries (read and/or write) are going to master PostgreSQL even SELECT. ...
1
vote
0answers
62 views

Scalable way to manage aggregated statistics over time in hierarchy?

I'm using a closure table (Postgres through Django) to roll up stats through a hierarchical tree. When a node that is 10 layers deep has a value that increases, each parent's sum total of that value ...
2
votes
1answer
3k views

Django postgres multiple schema

I'm trying to develop a django interface for an existing postgresql db, the db makes use of various schemas, looking at the literature the following example should work, but it only returns the schema ...
0
votes
1answer
6k views

How to fix all duplicate key value violates unique constraint

I have a Postgres database that I created with a Django application. When I transferred it over, it never reindexed anything and it gives me errors trying to do this. It seems as if there are lots of ...
0
votes
1answer
52 views

Mongo DB Memory Utilisation freezes app needs restart

I am running a project using Mongo DB and Django, I have 2 separate instance for my Django project and database each 16GB ram t2xlarge ubuntu ec2 instances. I am facing issue that within a day or two ...
3
votes
1answer
92 views

Modelling a database for a travelling business that involves Vehicules, Routes, Subroutes and Prices

I am working on travelling app, where users can book online vehicles to travel. On the customer side I would like this flow: Users have to select a from location and a to location Enter how many ...
0
votes
1answer
389 views

MySQL select returns no rows while there are many

I'm using django to create a database and I manually created a test values in the database by creating objects and saving them to the database. Now when I run this query: select TABLE_NAME, ...
1
vote
2answers
2k views

Psycopg2 - PGBouncer - Postgresql > Server does not support SSL but SSL was required

I've setup my Django application to use SSL while connecting to the Postgresql database via pgbouncer. I'm using Psycopg2 library. I've done this before successfully, so I just did the same steps ...
2
votes
1answer
95 views

Getting Postgres CREATE TABLE statements

I created some tables (9, to be exact) with a Django (1.9.6) migration and now I'm trying to get simple CREATE TABLE statements for them. I tried this answer, but using pg_dump in this way gives me ...
0
votes
1answer
50 views

Concurrent usage of rdbms, write 4K rows without lockdown [closed]

I am working on a django project using Postgresql. The use case is as follows: A user needs to upload an excel (containing 2.5-4K rows) 2-3 times daily. There will be 100s of users (somewhere between ...
0
votes
1answer
404 views

MySQL query taking a long time

I have a performance issue with a MySQL query that takes a long time. I'm trying to figure out why. I'm using Django, a web framework that comes with ORM (Object relational Mappers) and basically ...
2
votes
1answer
95 views

Field/datatype for searchable address components?

I'm using Django with Postgres, and I'm looking for a field/datatype to store address components that come from Google Places API in this format: "address_components": [ {"long_name": "27", "...
1
vote
1answer
73 views

Are lots of columns or joins better in Django

I am writing a simple Django app that stores and displays user objects with lots of attributes. The user may have up to three hundred attributes. These attributes however, can be grouped off. For ...
0
votes
1answer
2k views

AWS Postgres RDS dumping data into sql format

My team has hosted a django project in AWS with a Postgres RDS instance. What is the proper way to get export the database into SQL or pg_dump?
0
votes
1answer
375 views

Django Multi Table Inheritance and Preserving Child and Child History

Place can have many different one to one fields, that’s why it can have bookstore, restaurant, and hardware store. But can the same place be both a bookstore and a restaurant at the same time? Now if ...
0
votes
1answer
29 views

Make a boolean false after every n number of minutes in MySQL

I have a table with a boolean value, if that value is not explicitly set to anything in the database for a few minutes by the back-end (django) then it must automatically be set to false. How do I do ...
2
votes
1answer
82 views

Postgresql tables seem duplicated (with suffixes such us pkey, hashes, etc)

due to some problems I came to check the state of my current database in production and I found that some tables are "duplicated". By duplicated I mean that there appear to be some clones of the ...
1
vote
0answers
30 views

Great slowdown of Django object list retrieval after moving from sqlite3 to mySQL on Amazon RDS

Be warned, there will be some Python programming stuff; my problem is tightly connected to database engine differences though - or at least I think so. tl;dr: Querying for list of items and all ...
2
votes
1answer
1k views

Database in postgresql with missing rows, how to fill the missing rows with a backup copy?

I have a big problem and I'm not that good with postgresql since I use Django to make queries and I only have the basics of sql for querys. My problem is that there was a problem where a super user ...
0
votes
1answer
446 views

Django Auth user as well as custom users table?

So we've been using djangos database authentication for a while now and have recently decided we want to implement a completely new login system for our website. We are keeping the django ORM as we ...