Re: How would I do this with Djangol?

2006-08-17 Thread John M
HBTaylor wrote: > By the way, it seems like having the symbol in your Price model would > be redundant, since you can use myprice.holding.symbol to get the > symbol if you are listing (for example) all of the prices for a given > day. > > H.B. Actually H.B., after looking it over closer, i need

Re: How would I do this with Djangol?

2006-08-14 Thread John M
HBTaylor wrote: > I'm not sure about your models, but I assume it is something like the > following: > > from django.db import models > > class Holding(models.Model): > symbol = models.CharField(maxlength=10) > > def __str__(self): > return self.symbol > > def

Re: How would I do this with Djangol?

2006-08-05 Thread HBTaylor
I'm not sure about your models, but I assume it is something like the following: from django.db import models class Holding(models.Model): symbol = models.CharField(maxlength=10) def __str__(self): return self.symbol def _get_latest_price(self): return

Re: How would I do this with Djangol?

2006-08-05 Thread John Matthew
Thanks Chris,I looked at that but it only gives me one record.  What i need is the last price for each stock.  Maybe im using the latest() function wrong?ThanksJohn On 8/4/06, Chris Long wrote:This might help: http://www.djangoproject.com/documentation/db_api/#latest-field-name-noneChris

Re: How would I do this with Djangol?

2006-08-05 Thread Chris Long
This might help: http://www.djangoproject.com/documentation/db_api/#latest-field-name-none Chris --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

How would I do this with Djangol?

2006-08-04 Thread John M
I have a model of stock holdings(id, symbol) and a model of stock prices(id, symbol, price, date) How would I go about filtering for just the latest prices for all the stocks? Your help is appreciated. John --~--~-~--~~~---~--~~ You received this message