Re: migrate error

2015-10-22 Thread Christoph Knapp
Ahh OK, the only explanation I have, is that someone already tried to use django on the legacy database and the djando tables were already there. The inspectdb tool put them in the models.py file which caused the error. I did what you said and it worked. I just looked at the documentation of the

Re: Corrupted Migration?

2015-10-22 Thread Daniel Chen
Another update: The actual problem was the automatically generated migrations from the makemigrations command removed the database fields before removing the constraints on those fields (leading to a FieldDoesNotExist error when trying to drop the constraint). The solution was just to move the

Re: migrate error

2015-10-22 Thread Mike Dewhirst
On 22/10/2015 10:40 PM, Christoph Knapp wrote: Hi, I have a legacy database and used "python manage.py inspectdb > models.py" to create a models.py file. After I modified the file all errors went away when I makemigrations. This step works without problems on the only app I have in my project. Wh

Iterating over 2 arrays or 1 record array in Django

2015-10-22 Thread Juan Pablo Rivera
I have a numpy record array with 2 values per slot in the array.The name and offset, I want to display both of these values side by side using a Django template. Python code import numpy as npfrom django.template import Template, Context, loaderfrom django.conf import settings dtype={ '

Django admin add related object doesn't open popup window?

2015-10-22 Thread j . cossio . diaz
I already posted this question on Stackoverflow (http://stackoverflow.com/q/33189728/855050), but haven't received any answers, just a comment by another user with the same issue. I am posting here for added visibility. I think this is a bug in Django v1.8. I'll copy the question's text here

Re: Locking / serializing access to one element in database

2015-10-22 Thread Carsten Fuchs
Am 22.10.2015 um 01:16 schrieb Simon Charette: I would suggest you use select_for_update() in a transaction. This only covers the case where the object with the given ID already exists, doesn't it? That is, if a

Re: Issues with django-storages and gunicorn processes

2015-10-22 Thread Vijay Khemlani
Media Library? I'm not aware of something like that in django-storages On Wed, Oct 21, 2015 at 5:22 PM, Mike Herring wrote: > I am using django-storages to store media files in Amazon S3. > > Gunicorn spaws three worker processes, each running their own copy of > S3BotoStorage. When I go into fi

migrate error

2015-10-22 Thread Christoph Knapp
Hi, I have a legacy database and used "python manage.py inspectdb > models.py" to create a models.py file. After I modified the file all errors went away when I makemigrations. This step works without problems on the only app I have in my project. When I go "python manage.py migrate" I get the

Re: Locking / serializing access to one element in database

2015-10-22 Thread Joakim Hove
Thank you; > I would suggest you use select_for_update() in a transaction. That seems to be just what I want! -- You received this message because you are subscribed to the Google Groups "Django users" group. T