I have a ForeignKey field with the option:
limit_choices_to = {'team__id':
Game.objects.get(pk=1).visitor_team.id}
This class is coded to be edited inline by another class. When I use
the limit_choices_to option above, I can access the class directly,
but not through the other class. When I chan
Correction: Use a many-to-ONE field
On Jul 3, 3:06 pm, Charles Wesley <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Since I can't (as far as I can tell) enable inline editing on a one-to-
> one field, I'm trying to use an inline-edited many-to-many field with
> a relat
Correction: Use a many-to-ONE field
On Jul 3, 3:06 pm, Charles Wesley <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Since I can't (as far as I can tell) enable inline editing on a one-to-
> one field, I'm trying to use an inline-edited many-to-many field with
> a relat
Hi,
Since I can't (as far as I can tell) enable inline editing on a one-to-
one field, I'm trying to use an inline-edited many-to-many field with
a related object maximum of 1. Trivial example:
class Trivial(models.Model):
name = models.CharField(maxlength=50)
class Admin:
pass
I want a model where a single table has two OneToOne fields pointing
back to another table. Here's the trivial example:
class Trivial(models.Model):
pass
class Multiple(models.Model):
one_trivial = models.OneToOneField(Trivial,
related_name="one_trivial")
two_trivial = models.OneToO
I am using MySQL. Thanks for clearing that up!
charles
On Jun 25, 3:02 pm, Brian Rosner <[EMAIL PROTECTED]> wrote:
> On 2007-06-25 14:10:30 -0600, Charles Wesley <[EMAIL PROTECTED]> said:
>
>
>
>
>
> > Hello,
>
> > I'm a Django newbie, and
Hello,
I'm a Django newbie, and I'm trying to set up a model that includes
the following table:
class Team(models.Model):
school = models.ForeignKey(School,
unique_for_year="season_start_date")
season_start_date = models.DateField()
division = models.ForeignKey(Division)
coach_fi
7 matches
Mail list logo