> I am trying to figure out if there is a way to pass additional context
> to a template from the view, say I have made a contact page but this
> page needs to access a form, currently I don't know how I would be
> able to do that, that is, to pass the form context to whatever
> template the Page
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
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 _get_latest_pric
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 self.price_se
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
--~--~---
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 django-us
6 matches
Mail list logo