Re: Fellow Reports - September 2019

2019-09-16 Thread Mariusz Felisiak
Week ending September 15, 2019.

Added https://code.djangoproject.com/wiki/Version3.1Roadmap.

*Triaged:*
https://code.djangoproject.com/ticket/30768 - 
django.forms.boundfield.as_widget() causes an exception when used. (invalid)
https://code.djangoproject.com/ticket/19528 - CachedFilesMixin does not 
rewrite rules for css selector with path. (invalid)
https://code.djangoproject.com/ticket/18929 - CachedFilesMixin is not 
compatible with S3BotoStorage. (invalid)
https://code.djangoproject.com/ticket/29513 - Make 
TransactionTestCase.multi_db documentation more discoverable. (fixed)
https://code.djangoproject.com/ticket/16713 - Fixture loading for tests 
ignore database specific names. (invalid)
https://code.djangoproject.com/ticket/24680 - In testing, warnings appear 
when loading database-specific fixtures. (duplicate)
https://code.djangoproject.com/ticket/15063 - multi_db flag on TestCase 
causes invalid error reporting when loading fixtures. (duplicate)
https://code.djangoproject.com/ticket/23714 - `date` filter raises an 
exception for naive datetimes during DST change (fixed)
https://code.djangoproject.com/ticket/30769 - Access JSON key crashes when 
using annotated field from subquery. (accepted)
https://code.djangoproject.com/ticket/30152 - MySQL: "Cannot change column 
'id': used in a foreign key constraint" when altering pk referenced by 
ManyToMany relation. (fixed)
https://code.djangoproject.com/ticket/27338 - Running an AlterField to 
change a CharField primary key to AutoField crashes. (fixed)
https://code.djangoproject.com/ticket/30771 - Filtering on query result 
overrides GROUP BY of internal query (accepted)
https://code.djangoproject.com/ticket/30770 - Incorrect escaping TruncBase 
on ExpressionWrapper for date arithmetic. (duplicate)
https://code.djangoproject.com/ticket/30773 - Support Algorithm parameter 
on MySQL migrations. (wontfix)

*Reviewed/committed:*
https://github.com/django/django/pull/11751 - Fixed #30426 -- Changed 
X_FRAME_OPTIONS setting default to DENY.
https://github.com/django/django/pull/11742 - Fixed #30757 -- Added a 
system check to ensure max_length fits the longest choice.
https://github.com/django/django/pull/9983 - Refs #29444 -- Allowed 
returning multiple fields from INSERT statements on PostgreSQL.
https://github.com/django/django/pull/11606 - Fixed #28107 -- Added 
DatabaseFeatures.allows_group_by_selected_pks_on_model() to allow enabling 
optimization for unmanaged models.
https://github.com/django/django/pull/11757 - Fixed #30754 -- Prevented 
inclusion of aliases in partial index conditions.
https://github.com/django/django/pull/11683 - Fixed #30591 -- Fixed 
recreation of foreign key constraints on MySQL when altering type of 
referenced unique field.
https://github.com/django/django/pull/11775 - Increased the default PBKDF2 
iterations for Django 3.1.
https://github.com/django/djangoproject.com/pull/933 - Refs #838 -- Marked 
current release on downloads page as LTS (if so).
https://github.com/django/django/pull/11756 - Fixed #29823 -- Doc'd 
limitation of DecimalField on SQLite.

*Reviewed:*
https://github.com/django/djangoproject.com/pull/943 - Fixed #942 -- Added 
docs warning banner to preview releases.

*Authored:*
https://github.com/django/django-contrib-comments/pull/145 - Used 
python_2_unicode_compatible() from six.
https://github.com/django/code.djangoproject.com/pull/97 - Changed header 
to "Issues".
https://github.com/django/djangoproject.com/pull/945 - Updated docs-related 
model fixtures for 2.2 release.

Best regards,
Mariusz

>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/1a3b7336-a44b-4b5b-a322-bf5875a8437c%40googlegroups.com.


distinct on fields is not supported by this database backend sqlite3

2019-09-16 Thread raju m
Is there any way to use distinct on sqlite3.


Early response will be appreciated

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/3cc5d650-b539-4865-9a8a-668b7ec53ac5%40googlegroups.com.


Re: Request to reconsider ticket #27910: using an Enum class in model Field choices

2019-09-16 Thread Fernando Macedo
Hi everyone, I come late to the party and only noticed that Django now has 
support for enums on the 3.0 release notes. As I'm not a core developer I 
never imagined this.

I've wrote a lib that does something similar in mid-2018: 
https://github.com/loggi/python-choicesenum

There's one main diff from the Python default behaviour: The default enum 
requires that you compare the enum against their value, something like `assert 
EnumClass.EnumItem.value == 3`, my custom implementation allow usage with 
`assert 
EnumClass.EnumItem == 3`, the expected behaviour IMHO.

Thanks for your hard work!

Em sábado, 13 de abril de 2019 11:00:47 UTC-3, Tom Forbes escreveu:
>
> I really like this implementation, it seems really clean and simple.
>
> I would suggest that it might be worth seeing it’s simple to make the 
> display text optional, I think in the general case capitalising the key 
> name would be acceptable. Users can always override it if required or if 
> they need translation support.
>
> Even if we decide to make the display names required in all cases, it’s a 
> great improvement over the current way of defining choices IMO.
>
> Tom
>
>
>
>
> On 13 April 2019 at 10:33:39, Shai Berger (sh...@platonix.com 
> ) wrote:
>
> Back to this issue for the DjangoCon EU sprints... 
>
> James' objection about the inclusion testing needed for validation 
> seems moot, because validation can be done by conversion to the enum 
> type (as noted by Tom). 
>
> Raphael's warning about the woes of translation are already handled by 
> the suggested implementation -- because it isn't the enum value that 
> we make translatable, but rather an attribute on it. 
>
> I should point that the suggested implementation uses IntEnum and 
> StrEnum. The Python documentation recommends against using these, 
> except in the case that one needs to account for compatibility with an 
> existing protocol -- which, I submit to you, is exactly our case (the 
> "protocol" being the types available for database fields). 
>
> As a reminder, the relevant links are: 
>
> https://code.djangoproject.com/ticket/27910 
>
> https://github.com/django/django/compare/master...shaib:ticket_27910?expand=1 
>
> Thanks, 
> Shai. 
>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django developers (Contributions to Django itself)" group. 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-d...@googlegroups.com . 
> To post to this group, send email to django-d...@googlegroups.com 
> . 
> Visit this group at https://groups.google.com/group/django-developers. 
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-developers/20190413113323.1342ed7d.shai%40platonix.com.
>  
>
> For more options, visit https://groups.google.com/d/optout. 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/97fe821e-ab06-4dc1-95a6-276b25a42f07%40googlegroups.com.


Re: distinct on fields is not supported by this database backend sqlite3

2019-09-16 Thread neeraj garg
Please visit this:
https://stackoverflow.com/questions/12262923/django-query-to-filter-and-distinct


On Mon, Sep 16, 2019, 8:36 PM raju m  wrote:

> Is there any way to use distinct on sqlite3.
>
>
> Early response will be appreciated
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/3cc5d650-b539-4865-9a8a-668b7ec53ac5%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAGR%2BsperxHSZBUr6pw8pa-eFip1%3Dgu_wGhiVzXHrS_PCLG5NOg%40mail.gmail.com.


Re: distinct on fields is not supported by this database backend sqlite3

2019-09-16 Thread Adam Johnson
Hi!

I think you've found the wrong mailing list for this post. This mailing
list is for the development of Django itself, not for support using Django.
This means the discussions of bugs and features in Django itself, rather
than in your code using it. People on this list are unlikely to answer your
support query with their limited time and energy. Read more on the mailing
lists at https://www.djangoproject.com/community/

For support, please use the NEW Django forum at
https://forum.djangoproject.com , django-users mailing list, or IRC #django
on Freenode, or a site like Stack Overflow. There are people out there
willing to help on those channels, but they might not respond if you don't
ask your question well. Stack Overflow's question guide can help you frame
it well: https://stackoverflow.com/help/how-to-ask .

Also if you haven't read it, please take a look at Django's Code of
Conduct: https://www.djangoproject.com/conduct/ . These are our "ground
rules" for working well as a community, and will help you get the most out
of Django and our fantastic community.

Thanks for your understanding,

Adam

On Mon, 16 Sep 2019 at 16:34, neeraj garg  wrote:

> Please visit this:
>
> https://stackoverflow.com/questions/12262923/django-query-to-filter-and-distinct
>
>
> On Mon, Sep 16, 2019, 8:36 PM raju m  wrote:
>
>> Is there any way to use distinct on sqlite3.
>>
>>
>> Early response will be appreciated
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django developers (Contributions to Django itself)" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-developers+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-developers/3cc5d650-b539-4865-9a8a-668b7ec53ac5%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-developers+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/CAGR%2BsperxHSZBUr6pw8pa-eFip1%3Dgu_wGhiVzXHrS_PCLG5NOg%40mail.gmail.com
> 
> .
>


-- 
Adam

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAMyDDM3mTuyZpLp3qUqNkwGvzpWducPOnp08mesYdy5arRfV-A%40mail.gmail.com.


Possible AuthenticationForm Max Length Regression in Django 2.1?

2019-09-16 Thread cbodend...@live.com
I had posted this in the Django Forums, but I was told to repost here. The 
link to the forum post is below.
The tl;dr is: Was it intentional to remove the max length HTML form 
validation from the AuthenticationForm in Django 2.1, or is it a regression?

https://forum.djangoproject.com/t/possible-authenticationform-max-length-regression-in-django-2-1/241

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/4b9328fc-1e7d-4ec8-80bc-c32215c6ea6b%40googlegroups.com.


Re: Possible AuthenticationForm Max Length Regression in Django 2.1?

2019-09-16 Thread Mariusz Felisiak
Thanks for the report.

Previously AuthenticationForm's username field had "max_length" always set 
to 254, currently it should use "max_length" from the model's username 
field (see https://code.djangoproject.com/ticket/27515 and 
https://github.com/django/django/commit/5ceaf14686ce626404afb6a5fbd3d8286410bf13).
 
However HTML "maxlength" attribute is not set anymore so it's a regression 
I created a new ticket https://code.djangoproject.com/ticket/30776.

Best,
Mariusz

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/f5f9a13f-96c0-448a-946e-3f6786f8285e%40googlegroups.com.