Re: Idea: Allow queryset.get() and queryset.filter() to accept a positional argument for implicit primary key filtering

2018-10-31 Thread Antwan
oupled with extra args and kwargs. > > e.g. > > Book.objects.get(isbn, author__name='Daniel Roy Greenfeld') > > I'd be in favor of preventing pk and kwarg or Q args mixing. > > Count me +1 for the get() case and -1 for the filter() one. > > Simon &

Idea: Allow queryset.get() and queryset.filter() to accept a positional argument for implicit primary key filtering

2018-10-31 Thread Antwan
Hi, I'm creating this topic to see if there is interest to implement positional arguments in queryset filtering. Current situation Currently the only way to use positional arguments to filter can be either: - Passing a single or multiple Q objects: MyClass.objects.filter(Q(key=valu