ith"
>
> add this here so it gets an id??
> f.save()
>
>>>> p.friend = f
>>>> p.save()
>
> On Jul 22, 12:15 pm, Dudley Fox wrote:
>> I have a simple test model defined:
>>
>> class Friend(models.Model):
>>name = models.CharF
I have a simple test model defined:
class Friend(models.Model):
name = models.CharField(max_length=120)
class Person(models.Model):
name = models.CharField(max_length=120)
friend = models.OneToOneField(Friend)
Here is a sample of usage, and obviously I am doing something wrong...
>>> p
On Fri, Jul 17, 2009 at 3:45 PM, Sam Tregar wrote:
> On Fri, Jul 17, 2009 at 3:23 PM, Dudley Fox wrote:
>>
>> Should I have posted this to the developer's list? I ask because I
>> have received no responses yet. Not even a "...you shouldn't do that."
Should I have posted this to the developer's list? I ask because I
have received no responses yet. Not even a "...you shouldn't do that."
:)
Sincerely,
Dudley
On Wed, Jul 15, 2009 at 11:38 AM, Dudley Fox wrote:
> I want to create a new type of field for django model
I want to create a new type of field for django models that is
basically a ListOfStrings. So in your model code you would have the
following:
models.py:
from django.db import models
class ListOfStringsField(???):
???
class myDjangoModelClass():
myName = models.CharField(
5 matches
Mail list logo