Questions tagged [django-postgresql]

Use this tag for PostgreSQL issues which are to be solved in accordance with Django coding best practices.

207 questions
0
votes
1 answer

Django: m2m relationship is not getting updated in post_save signal

In my problem, the m2m relationship is not getting updated in post_save signal. I have a post_save that checks to make sure that the user is a staff member and if they don't have default permissions, then they are assigned default permissions. If…
jackiekazil
  • 5,696
  • 4
  • 21
  • 20
0
votes
0 answers

Django postgresql on Heroku DatabaseError value too long for type character varying(1000)

I'm getting this error when saving a Django Model Object: DatabaseError: value too long for type character varying(1000) Inside the model there is a textfield: models.TextField() I'm saving a string of over 1000 characters into this field (song…
0
votes
0 answers

Django, Postgresql raise OperationalError

I working in Ubuntu 12.04, Django 1.5.1 and Postgresql 9.1 and suddenly i get an error Exception Type: OperationalError Exception Value: FATAL: cache lookup failed for access method 403 ... what did that mean?
Raido
  • 63
  • 2
  • 6
0
votes
0 answers

Read CSV File in Django and then write it to DB Postgresql

How can I read a CSV file, parse the values, and then output it to a particular database table? That's the basic problem. Here is a 'bigger picture' of what I'm trying to do: I'm trying to either read from multiple CSV files (every minute) and or…
Kid Lampa
  • 9
  • 1
0
votes
1 answer

Django syncdb - How does it know if it previously created the tables or if I did?

I manually created some tables in Postgre for a Django project. I manually created the model too. When I try to syncdb, it throws a database error and says the table already exists. If syncdb creates the table previously, this won't happen. How does…
colboynik
  • 447
  • 4
  • 15
0
votes
0 answers

Atomic database operations in Django 1.4

This question is similar to Atomic operations in Django? however for Django 1.4. I'm wondering if there is a way to do this without resorting to "raw SQL". My setup is a little different then his so I'll explain. I have a record for a User and a…
Josh K
  • 28,364
  • 20
  • 86
  • 132
0
votes
1 answer

GeoDjango: 'No such file or directory' when creating PostGIS spatial database template

I am working on MacOS Lion. I have successfully set up the KyngChaos libraries for Postgres and PostGIS, as per the official instructions with no problems. I've reached the section on creating a spatial database template, and now I'm hitting a…
flossfan
  • 10,554
  • 16
  • 42
  • 53
-1
votes
2 answers

How to apply annotation to each item of QuerySet with Django ORM

There are a lot questions similar to this one but none of them worked for me. Let's assume that I have the following models: class Cafe(models.Model): name = models.CharField(max_length=150) def __str__(self): return…
Jasur
  • 99
  • 2
  • 6
-1
votes
1 answer

Render dropdown in django view using values from postgres arrayfield

Here is an example from the model: class Shipment(models.Model): shipment_id = models.BigAutoField(null=False, primary_key=True) potential_shipping_dates = ArrayField(models.DateField(), verbose_name='Ship Dates', null=True) Here is what…
GeneralBear
  • 1,011
  • 3
  • 11
  • 35
-1
votes
1 answer

Is it possible to have a model reference many other models depending on the situation in django?

I honestly don't know how to even phrase my question but i think an example might help. I have mad three apps with their own models respectfully. App1, App2, App3. I want to create a new app (Reports) which will report on each of my other apps…
-1
votes
1 answer

Is PostgreSQL (via ElephantSQL) a much slower database than Django's SQLite, and what to do about it?

I am building a Django webapp including a view, which can upload data into the database through a csv-import. Each import contains around 2,000 rows and 9 columns with DecimalFields and CharFields. So far I've been using Django's SQLite Database and…
Daniel
  • 963
  • 1
  • 12
  • 29
1 2 3
13
14