On Dec 28, 10:01 am, "Russell Keith-Magee"
wrote:
> On Sun, Dec 28, 2008 at 5:32 AM, adambossy wrote:
>
> > Russ,
>
> > Thanks for the reply. Specifically, I am wondering if there is some
> > feature of the Models API that allows me to retrieve the foreign key
> > object so that it is included
On Sun, Dec 28, 2008 at 5:32 AM, adambossy wrote:
>
> Russ,
>
> Thanks for the reply. Specifically, I am wondering if there is some
> feature of the Models API that allows me to retrieve the foreign key
> object so that it is included in the serialized string. That is,
> without writing my own se
Russ,
Thanks for the reply. Specifically, I am wondering if there is some
feature of the Models API that allows me to retrieve the foreign key
object so that it is included in the serialized string. That is,
without writing my own serializer (which I suspect I may have to do).
Alternatively, I wa
On Sat, Dec 27, 2008 at 2:11 PM, adambossy wrote:
>
> I have a model that refers to a ForeignKey, e.g.:
>
> class Template(models.Model):
> type = models.ForeignKey(Type)
> ...
>
> class Type(models.Model)
> name = models.CharField(max_length=32)
> ...
>
> I can fetch these objects fine using t
I have a model that refers to a ForeignKey, e.g.:
class Template(models.Model):
type = models.ForeignKey(Type)
...
class Type(models.Model)
name = models.CharField(max_length=32)
...
I can fetch these objects fine using the model API.
t = Template.objects.get(id=1)
print t.type
>>
print t
5 matches
Mail list logo