Looking to hire Django developers in Pleasantville NY

2010-04-22 Thread Steve Bywater
Hopefully it's ok to post job openings here... The team that brought you HudsonValleyHelpWanted.com and 300+ other job boards around the US and Canada and Cupid.com (and then sold it all... yes those were options you wished you were in on) has started a new project: 10LocalCoupons.com! We're look

change an object from parent to child

2010-05-04 Thread Steve Bywater
Given... class Place(models.Model): name = models.CharField(max_length=50) class Restaurant(Place): serves_hot_dogs = models.BooleanField() ...it is trivial to create either a place or restaurant. But how do you take an instance that is already a place and create a restaurant from it? Is

Re: change an object from parent to child

2010-05-05 Thread Steve Bywater
Here is a realistic example: I have a model Employee that is a subclass of User, the standard django authentication class, and a model called Supervisor that subclasses Employee. I have Bob, an instance of Employee, that I want to promote to Supervisor. So trying to move the Bob object to the chil

Re: How to reload an object's member field?

2010-05-14 Thread Steve Bywater
I needed to do something similar just yesterday, and did it the same way you discovered. I agree, kinda weird: foo = Foo.objects.get(foo.id) On May 13, 12:25 pm, Chia Hao Lo wrote: > I have a model Foo. If I've got a model instance foo, and I know that > foo.value may be changed after I got it.

Re: Testing: Fixtures vs Factories vs ???

2012-02-19 Thread Steve Bywater
I work on a complex django project -- our test suite is over 1000 tests. We've begun converting them from fixtures to factories. Here's why: - Factories were measurably faster. At least in my local environment, which may be more IO bound than others, but I was looking at the results of tests and s

Re: save out a test database?

2011-06-03 Thread Steve Bywater
n you can runserver or dumpdata etc.. Good luck! - Steve Bywater -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django

Re: Handling huge fixtures

2011-01-15 Thread Steve Bywater
I use this exact dataset. Instead of using a fixture called initial_data.json for that whole dataset, call it something else like zip_code.json. You can use loaddata to load it whenever you are setting up a new environment. For your tests, have a minimal subset of zips in initial_data, or in anothe