Re: How to select a single field from database with django QuerySet API?

2009-02-26 Thread marco sedda
Thanks!!! On Feb 26, 10:28 am, Eric Abrahamsen wrote: > On Feb 26, 2009, at 6:23 PM, marco sedda wrote: > > > > > Hi, > >   I want to select a "single" field from a table, i've read the > > QuerySet API reference but i can't find anything to so

How to select a single field from database with django QuerySet API?

2009-02-26 Thread marco sedda
Hi, I want to select a "single" field from a table, i've read the QuerySet API reference but i can't find anything to solve my query. Just to explain: If i've a table like: User first_name = models.CharField(max_length=30) last_name = models.CharField(max_length=30) how i can execute

database trigger or what ?

2009-02-25 Thread marco sedda
Hi, i'm newbie in django and i'm writing a model to record a general booking in a particular date for a particular item The booking model looks like this: class Booking(models.Model): item = models.ForeignKey(Item) startDate = models.DateField("From") endDate = models.DateField("To")

Django unittest fails to check empty values

2009-01-26 Thread marco sedda
Hi, I've a problem with unittest in django: I've described a models.py: class Season(models.Model): name = models.CharField(max_length=30, unique=True) startDate = models.DateField("From") endDate = models.DateField("To") and the test.py: def testSeasonCreateEmp