*From:* django-users@googlegroups.com [mailto:
> django-users@googlegroups.com] *On Behalf Of *b...@tanners.org
> *Sent:* Monday, May 6, 2019 12:44 PM
> *To:* Django users
> *Subject:* Re: ORM help with INNER JOIN and GROUP BY
>
>
>
> Just want to make sure I understand. ForeighKeys need
;
> *From:* django...@googlegroups.com [mailto:
> django...@googlegroups.com ] *On Behalf Of *b...@tanners.org
>
> *Sent:* Monday, May 6, 2019 11:28 AM
> *To:* Django users
> *Subject:* ORM help with INNER JOIN and GROUP BY
>
>
>
> I've inherited an applicati
Maybe that was a typo?
The foreignkey relationship would look like this:
object = models.ForeignKey(FacePng'', max_length=128, blank=False,
null=False, unique=True)
On Mon, May 6, 2019 at 12:44 PM wrote:
> Just want to make sure I understand. ForeighKeys need to be integers?
>
> Only integers?
: Re: ORM help with INNER JOIN and GROUP BY
Just want to make sure I understand. ForeighKeys need to be integers?
Only integers?
You need a ForeignKey relationship between the two models, which is an integer
value, not a char. You’d have to do migrations to get this adjusted properly.
--
You
Just want to make sure I understand. ForeighKeys need to be integers?
Only integers?
You need a ForeignKey relationship between the two models, which is an
> integer value, not a char. You’d have to do migrations to get this adjusted
> properly.
>
--
You received this message because you a
The field within your class should be set to ForeignKey.
Try this:
Object = models.ForeignKey(‘FacePng’, on_delete=SET_NULL, max_length= some_int)
on_delete and max_length need to be set based on your requirements
Sent from my iPhone
> On May 6, 2019, at 11:28 AM, b...@tanners.org wrote:
>
>
users
Subject: ORM help with INNER JOIN and GROUP BY
I've inherited an application written django 1.11. The old application uses
raw() with INNER JOIN and GROUP BY.
I cannot seem to figure out how to do inner join and group by properly the ORM
way.
The raw() query is below.
S
I've inherited an application written django 1.11. The old application uses
raw() with INNER JOIN and GROUP BY.
I cannot seem to figure out how to do inner join and group by properly the
ORM way.
The raw() query is below.
SELECT * FROM items_monolithic
INNER JOIN items_facepng
ON items_monoli
Hi Daniel,
On Apr 22, 5:57 pm, Daniel Gerzo wrote:
> I have a following models:
>
> class Movie(models.Model):
> title = models.CharField(max_length=255)
> year = models.IntegerField(max_length=4)
> rating = models.DecimalField(max_digits=2, decimal_places=1, default=0)
>
> class R
Hello guys,
I have a following models:
class Movie(models.Model):
title = models.CharField(max_length=255)
year = models.IntegerField(max_length=4)
rating = models.DecimalField(max_digits=2, decimal_places=1, default=0)
class Request(models.Model):
movie = models.ForeignKey(Movi
10 matches
Mail list logo