Problems trying to use ManyToMany field before saving in a ModelForm

2011-09-12 Thread Carlos Brum
Hello guys, I have a problem to deal with a field ManyToMany in Django. It is the following: When I try to access a list of relations that is my ManyToMany field I get an error "%ModelName% instance needs to have a primary key value before a many- to-many relationship Can be used. " I need to

Re: Django testing with existing data

2011-08-29 Thread Carlos Brum
Thanks, Russ! You're perfectly rigth! I was trying to use TDD in a wrong way. Now I understand I *have* to use a new database. "dumpdata" is what I need. Thanks for your advice. On Aug 23, 8:53 pm, Russell Keith-Magee <russ...@keith-magee.com> wrote: > On Tue, Aug 23, 2011

Django testing with existing data

2011-08-23 Thread Carlos Brum
Hello guys, I'm new in Django testing whith django test facilities. I've read "https://docs.djangoproject.com/en/1.3/topics/testing/; but couldn't find what i'm looking for. I'm trying to begin TDD development but wanna use my old data. I don't wanna have to build up all my database again. I