Re: Subquery - Expression | Django 1.11.1

2017-05-16 Thread Алексей Широков
Thanks Simon, I use `OuterRef` when building a queryset so` Subquery` is necessary for me. For myself, I solved the problem as follows: ... uuid__in=Subquery(queryset, output_field=models.IntegerField()) ... -- You received this message because you are subscribed to the Google Groups "Django

Subquery - Expression | Django 1.11.1

2017-05-16 Thread Алексей Широков
Guys help me figure it out. I use an example from the documentation https://docs.djangoproject.com/en/1.11/ref/models/expressions/#limiting-a-subquery-to-a-single-column >>> from datetime import timedelta >>> from django.utils import timezone >>> one_day_ago = timezone.now() - timedelta(days=1)

Re: Little trouble with migration.

2015-05-07 Thread Алексей Широков
Oh thank you very much for the clarification. I understood in what there was a mistake. And I apologize for my carelessness. Thanks! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails

Re: Little trouble with migration.

2015-05-07 Thread Алексей Широков
Oh, sure! INSTALLED_APPS = [ ... 'isar.account', 'isar.account.auth', ... ] -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Little trouble with migration.

2015-05-07 Thread Алексей Широков
I have custom user model. settings.py --- ... AUTH_USER_MODEL = 'account.User' ... also I have following AppConfig account/apps.py --- class AccountConfig(AppConfig): name = 'isar.account' *label = 'Account'* verbose_name = 'Аккаунт' and when I call command

Re: Django builds wrong sql query.

2015-03-19 Thread Алексей Широков
Thanks for your reply, I will try... -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send

Django builds wrong sql query.

2015-03-19 Thread Алексей Широков
*I have the following code:* package_queryset = Package.objects.extra( where=[(' "document_package"."id" IN (SELECT DISTINCT ON ("document_id") "id"' ' FROM "document_package"' ' WHERE "status" NOT IN

Re: Django builds incorrect sql-query

2014-10-20 Thread Алексей Широков
Thank you very much Javier!!! I've thought about it. I will try. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com.

Re: Django builds incorrect sql-query

2014-10-20 Thread Алексей Широков
Javier, I am unable combine 2 parameters in a single call filter(), because It is built on different levels of code. Is there another solution??? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Django builds incorrect sql-query

2014-10-20 Thread Алексей Широков
Hi, I have 2 models: @python_2_unicode_compatible class Document(models.Model): uuid = models.CharField(max_length=32, editable=False, unique=True) contractor = models.ForeignKey(Contractor) stagcy = models.ForeignKey(StateAgency) type = models.CharField(max_length=25) year =