Re: Django model problem

2012-01-30 Thread Michael Elkins
On Sun, Jan 29, 2012 at 08:22:40PM -0800, St@n wrote: I am trying to create a RESTful API with a django website i have running. The project folder is called rosebud and inside the folder r2 lies my application. I have tried to retrieve objects by calling the Users table in django's default authe

Django model problem

2012-01-30 Thread St@n
Hi there, I am trying to create a RESTful API with a django website i have running. The project folder is called rosebud and inside the folder r2 lies my application. I have tried to retrieve objects by calling the Users table in django's default authentication model. But i have problems retriev

Re: Django model problem

2009-04-04 Thread MS
On Apr 3, 11:08 pm, Briel wrote: > Hi. > A quick solution would be to add a datefield to the album > the release date. You could then use that to find the > latest and it would be updated automatically when > adding new albums. You could use ot for other things > as well, but I don't know your ne

Re: Django model problem

2009-04-03 Thread Marco Buttu
On Fri, 2009-04-03 at 13:14 -0700, Albert wrote: > > class Musician(models.Model): > first_name = models.CharField(max_length=50) > last_name = models.CharField(max_length=50) > > class Album(models.Model): > artist = models.ForeignKey(Musician) > name = models.CharField(max_leng

Re: Django model problem

2009-04-03 Thread Briel
Hi. A quick solution would be to add a datefield to the album the release date. You could then use that to find the latest and it would be updated automatically when adding new albums. You could use ot for other things as well, but I don't know your needs. Will also make the lookup a bit slower bu

Django model problem

2009-04-03 Thread Albert
Hi, Say I have these simple models: class Musician(models.Model): first_name = models.CharField(max_length=50) last_name = models.CharField(max_length=50) class Album(models.Model): artist = models.ForeignKey(Musician) name = models.CharField(max_length=100) Now in `Musician`