Re: Fellow Reports - March 2021

2021-03-15 Thread Mariusz Felisiak
Week ending March 14, 2021

Rename branch "master" to "main" for: 
   - django/django 
   - django/django-docker-box 

*Triaged: *
   https://code.djangoproject.com/ticket/32520 - Making the admin 
keyboard-only friendly (duplicate) 
   https://code.djangoproject.com/ticket/32521 - Possible documentation 
error re. template directories (invalid) 
   https://code.djangoproject.com/ticket/32522 - Improved error message on 
DoesNotExist (duplicate) 
   https://code.djangoproject.com/ticket/10494 - show query params 
DoesNotExist from QuerySet.get (wontfix) 
   https://code.djangoproject.com/ticket/32524 - unexpected behavior when 
using gettattr for related object (invalid) 
   https://code.djangoproject.com/ticket/32511 - Deferred fields incorrect 
when following prefetches back to the "parent" object (accepted) 
   https://code.djangoproject.com/ticket/32519 - Add support for using key 
and path transforms in update() for JSONFields. (accepted) 
   https://code.djangoproject.com/ticket/32525 - Class Cast throws 
DataError when column contains numeric string or alphabet string in 
postgres (wontfix) 
   https://code.djangoproject.com/ticket/32527 - needs_rollback flag issue 
with implementation of backend that does not support savepoint (needsinfo) 
   https://code.djangoproject.com/ticket/32528 - Replace 
django.utils.topological_sort with graphlib. (someday/maybe) 
   https://code.djangoproject.com/ticket/32529 - Delay creating a test 
suite inside DiscoverRunner.build_suite() (accepted) 
   https://code.djangoproject.com/ticket/32530 - readonly makes field 
return None on cleaned_data? (duplicate) 
   https://code.djangoproject.com/ticket/32526 - Class based custom 
template filters seem to be broken since Django 2.0 (invalid) 
   https://code.djangoproject.com/ticket/32532 - Provide friendlier error 
if a file path is passed as a test label when running tests (accepted) 
   https://code.djangoproject.com/ticket/32534 - Allow using StatReloader 
even if watchman is available. (wontfix) 
   https://code.djangoproject.com/ticket/32536 - Add references to get() 
methods in CBV docs. (accepted) 
   https://code.djangoproject.com/ticket/32538 - Easy - Small Update in 
Django Writing your first app 07 (duplicate) 
   https://code.djangoproject.com/ticket/32539 - Support accessing the 
current filtered queryset from within SimpleListFilter.lookups() (accepted) 
   https://code.djangoproject.com/ticket/32540 - Only do "top level" 
detection in DiscoverRunner.build_suite() when needed (accepted) 
   https://code.djangoproject.com/ticket/32537 - RequestSite and IDN 
(needsinfo) 
   https://code.djangoproject.com/ticket/32542 - Native postgres json field 
support is broken (invalid) 
   https://code.djangoproject.com/ticket/32544 - Add support for GDAL 3.2 
and GEOS 3.9. (accepted) 

*Reviewed/committed: *
   https://github.com/django/django/pull/14089 - Fixed #32517 -- Made 
OrderedSet reversible. 
   https://github.com/django/django/pull/14085 - Refs #32489 -- Simplified 
some test suite functions. 
   https://github.com/django/code.djangoproject.com/pull/107 - Updated Git 
branch "master" to "main". 
   https://github.com/django/djangoproject.com/pull/1070 - Updated Git 
branch "master" to "main" for Django repository. 
   https://github.com/django/deps/pull/72 - Renamed Git branches "master" 
to "main". 
   https://github.com/django/django/pull/14048 - Rename Git branch "master" 
to "main". 
   https://github.com/django/django/pull/14101 - Fixed #32516 -- Fixed 
reorder_suite() with duplicates and reverse=True. 
   https://github.com/django/django/pull/14094 - Refs #24121 -- Added 
__repr__() to OrderedSet. 
   https://github.com/django/django/pull/14088 - Fixed #32512 -- Fixed 
admin dark theme for autocomplete fields. 
   https://github.com/django/django/pull/14108 - Refs #31235 -- Improved 
assertQuerysetEqual() warning message with stacklevel=2. 
   https://github.com/django/django/pull/14103 - Refs #24121 -- Added 
__repr__() to MiddlewareMixin and subclasses. 
   https://github.com/django/django/pull/14107 - Refs #32508 -- Raised 
ImproperlyConfigured instead of using "assert" in middlewares. 
   https://github.com/django/django/pull/14104 - Fixed #32529 -- Delayed 
creating a test suite in build_suite(). 
   https://github.com/django/django/pull/14116 - Refs #31516, Refs #31703 
-- Made makemigrations always name initial migrations "initial". 
   https://github.com/django/django/pull/14090 - Added GitHub action with 
welcome message for first-time contributors. 
   https://github.com/django/django/pull/14109 - Fixed #31516 -- Improved 
naming of migrations with multiple operations. 

*Reviewed: *
   https://github.com/django/djangoproject.com/pull/1072 - Refs #1052 -- 
Added max_value validation to donations. 
   https://github.com/django/django/pull/14031 - Fixed #32466 -- Adjusted 
autocomplete widget to use pk when resolving to_field_name. 

*Authored: *
   https://github.com/django/django/pull/14095 -

Working in Django project through GSOC

2021-03-15 Thread Adarsh Raj Shivam
Hey, I am Adarsh, I am planning to participate in GSOC. I need some kind of 
direction of where I should start. I can work in python.

Thank you

-- 
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/5f2edfca-5821-4026-9535-d59328f6dcaen%40googlegroups.com.


Re: Working in Django project through GSOC

2021-03-15 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Adarsh,

Did you see the Wiki page on GSoC?
https://code.djangoproject.com/wiki/SummerOfCode2021

Let us know if you have any specific questions after reading that, and the
below links I send to everyone who asks about contributing!

Thanks,

Adam

---

There are many different ways to contribute to Django - the forum,
blogging, translating, documenting, writing code, and more. Our
Contributing Guide can help you get started with many of these:
https://docs.djangoproject.com/en/stable/internals/contributing/

If you’re looking to work with the code base (for documentation or code),
check out the “Advice for New Contributors” section:
https://docs.djangoproject.com/en/stable/internals/contributing/new-contributors/
. Then see if you can work through the “Writing Your First Patch” tutorial:
https://docs.djangoproject.com/en/stable/intro/contributing/ .

If you get stuck or have questions, post back here or in the “Mentorship”
section on the forum:
https://forum.djangoproject.com/c/internals/mentorship/10

On Mon, 15 Mar 2021 at 06:29, Adarsh Raj Shivam  wrote:

> Hey, I am Adarsh, I am planning to participate in GSOC. I need some kind
> of direction of where I should start. I can work in python.
>
> Thank you
>
> --
> 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/5f2edfca-5821-4026-9535-d59328f6dcaen%40googlegroups.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/CAMyDDM1u__c09VNG90__3gtN8nyrn%2BMW1-9hNWqUvaDL%3D%3Ds_hg%40mail.gmail.com.


GSOC participation-What next?

2021-03-15 Thread Ananth Raghav
Hello I have read most of the tutorials for beginners on Django's templates 
such as forms, authentication, database etc. and I was wondering as to 
whether that will be enough for contributing to Django. If not, could the 
community please suggest what else should I explore in order to get better 
acquainted with the platform before attempting GSoC.
All inputs are welcome :)
Also I have knowledge of how to use Django as a web framework and use it 
for apps.

-- 
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/cb5acbf4-e6b0-4d47-b7e3-21a8bfd33ef6n%40googlegroups.com.


Participating in GSoC to get exposure to the developer’s world

2021-03-15 Thread Vikky Kumar


Hello, My name is Vikky Kumar from India and I study computer engineering .

I have a decent experience in Python, HTML and CSS. I have been using 
Django as my framework for over a year now and I will like to contribute to 
the Django community anyway.

I am very much interested in participating in GSoC 2021. The main reason 
for doing GSoC is to get exposure to the developer’s world, work with new 
people and contribute more to open source I hope that, despite me being a 
fresher, the Django community welcomes me.

-- 
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/cd0dfafd-9940-4cf1-a51f-9f2d2b571e8bn%40googlegroups.com.


Contributing for GSOC

2021-03-15 Thread Ananth Raghav
Hello my name is Ananth Raghav and I am planning to participate in GSOC 
2021. I would be grateful if the community could offer me some advice with 
the following doubts. I have read the GSOC website for contributing and 
have basic knowledge of python and how to write tests in  Django, how to 
write patches in the development version of Django after extensive reading. 
I know the most basics and my doubt is should I know any pre requisites of 
Django or python before I get started so as to get acquainted with the 
platform.
I have the basic knowledge of python and how Django is used in deploying 
web frameworks efficiently and have even referred to Django's website on 
how to contribute. Any additional advice would be very appreciated :)
Thank you

-- 
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/eb1a3d27-2023-4dab-be29-c10dc093030an%40googlegroups.com.


Re: GSOC participation-What next?

2021-03-15 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Anath,

Did you see the Wiki page on GSoC?
https://code.djangoproject.com/wiki/SummerOfCode2021

Let us know if you have any specific questions after reading that, and the
below links I send to everyone who asks about contributing!

Thanks,

Adam

---

There are many different ways to contribute to Django - the forum,
blogging, translating, documenting, writing code, and more. Our
Contributing Guide can help you get started with many of these:
https://docs.djangoproject.com/en/stable/internals/contributing/

If you’re looking to work with the code base (for documentation or code),
check out the “Advice for New Contributors” section:
https://docs.djangoproject.com/en/stable/internals/contributing/new-contributors/
. Then see if you can work through the “Writing Your First Patch” tutorial:
https://docs.djangoproject.com/en/stable/intro/contributing/ .

If you get stuck or have questions, post back here or in the “Mentorship”
section on the forum:
https://forum.djangoproject.com/c/internals/mentorship/10

On Mon, 15 Mar 2021 at 17:31, Ananth Raghav 
wrote:

> Hello I have read most of the tutorials for beginners on Django's
> templates such as forms, authentication, database etc. and I was wondering
> as to whether that will be enough for contributing to Django. If not, could
> the community please suggest what else should I explore in order to get
> better acquainted with the platform before attempting GSoC.
> All inputs are welcome :)
> Also I have knowledge of how to use Django as a web framework and use it
> for apps.
>
> --
> 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/cb5acbf4-e6b0-4d47-b7e3-21a8bfd33ef6n%40googlegroups.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/CAMyDDM2pJuq6_MBQOQ2ES%3DF%2B2caDg3kZxct9o3s7gNbFt_TroA%40mail.gmail.com.


Re: Contributing for GSOC

2021-03-15 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Ananth

I responded in the other thread you started:
https://groups.google.com/g/django-developers/c/EEij1pzCVD8/m/FkWfc9iHAQAJ

As far as GSoC goes we have limited slots and successful candidates have
often made some contributions to Django or a similar project before, even
if small. If you haven't done that yet, that would be the first place to
look.

Thanks,

Adam

On Mon, 15 Mar 2021 at 16:05, Ananth Raghav 
wrote:

> Hello my name is Ananth Raghav and I am planning to participate in GSOC
> 2021. I would be grateful if the community could offer me some advice with
> the following doubts. I have read the GSOC website for contributing and
> have basic knowledge of python and how to write tests in  Django, how to
> write patches in the development version of Django after extensive reading.
> I know the most basics and my doubt is should I know any pre requisites of
> Django or python before I get started so as to get acquainted with the
> platform.
> I have the basic knowledge of python and how Django is used in deploying
> web frameworks efficiently and have even referred to Django's website on
> how to contribute. Any additional advice would be very appreciated :)
> Thank you
>
> --
> 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/eb1a3d27-2023-4dab-be29-c10dc093030an%40googlegroups.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/CAMyDDM34gBMqdd%3D-AAjCNms5rMOxvU4%2B4-CDrvEz1sRF6ASH_g%40mail.gmail.com.


Re: Participating in GSoC to get exposure to the developer’s world

2021-03-15 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome Vikky,

Have you had a look at the GSoC wiki page?
https://code.djangoproject.com/wiki/SummerOfCode2021 . Do you have any
ideas what you'd like to work on?

I'll also paste below the normal text for anyone seeking to contribute.

Thanks,

Adam

--

There are many different ways to contribute to Django - the forum,
blogging, translating, documenting, writing code, and more. Our
Contributing Guide can help you get started with many of these:
https://docs.djangoproject.com/en/stable/internals/contributing/

If you’re looking to work with the code base (for documentation or code),
check out the “Advice for New Contributors” section:
https://docs.djangoproject.com/en/stable/internals/contributing/new-contributors/
. Then see if you can work through the “Writing Your First Patch” tutorial:
https://docs.djangoproject.com/en/stable/intro/contributing/ .

If you get stuck or have questions, post back here or in the “Mentorship”
section on the forum:
https://forum.djangoproject.com/c/internals/mentorship/10

On Mon, 15 Mar 2021 at 15:34, Vikky Kumar 
wrote:

> Hello, My name is Vikky Kumar from India and I study computer engineering .
>
> I have a decent experience in Python, HTML and CSS. I have been using
> Django as my framework for over a year now and I will like to contribute to
> the Django community anyway.
>
> I am very much interested in participating in GSoC 2021. The main reason
> for doing GSoC is to get exposure to the developer’s world, work with new
> people and contribute more to open source I hope that, despite me being a
> fresher, the Django community welcomes me.
>
> --
> 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/cd0dfafd-9940-4cf1-a51f-9f2d2b571e8bn%40googlegroups.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/CAMyDDM1Sw9g9%3DLK-jGqwoRhsakRVvfWDCqteVwfYoT0-YB4jTA%40mail.gmail.com.


Re: Difference between AdminSite.admin_view and staff_member_required?

2021-03-15 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
+1 for deprecating.


> Yes, it can be reduced to a `user_passes_test` call, but that's more
> verbose for a limited gain (given that this convenience method already
> exists, is tested, etc).
>

I don't see this as an argument not to deprecate staff_member_required,
since the verbosity of user_passes_test can be limited to one place:

staff_member_required = user_passes_test(
lambda u: u.is_active and u.is_staff,
)

...

@staff_member_required
def my_view(request): ...

Additionally, for a newer developer, getting equivalent functionality
> `user_passes_test` requires being able to grok callables
>

I think we can put a little more faith in users. The docs for
user_passes_test show a complete example that can be easily copied.

On Sat, 13 Mar 2021 at 15:18, Kevin Grinberg 
wrote:

> `staff_member_required` is a nice convenience method, quite useful outside
> of the admin if your authorization needs are sufficiently served by
> User.is_staff (which isn't always the case of course, but often *is* on a
> small project).
>
> Yes, it can be reduced to a `user_passes_test` call, but that's more
> verbose for a limited gain (given that this convenience method already
> exists, is tested, etc).
>
> Additionally, for a newer developer, getting equivalent functionality
> `user_passes_test` requires being able to grok callables - again, certainly
> something you're going to need past a certain threshold, but it feels
> unnecessary to require less-experienced folks to grok that when all you
> want to do is "make it so that only people with the is_staff attribute can
> see this view" (with the caveat that yes, the login page is going to be the
> admin login page - which for a smaller project is exactly what you want).
>
> On Saturday, March 13, 2021 at 10:03:15 AM UTC-5 pyt...@ian.feete.org
> wrote:
>
>> I think deprecating it is a good idea. I think it's actually a small
>> footgun - I've seen it used to restrict access to non-admin functionality,
>> when `user_passes_test` would be appropriate. In the case I found it, it
>> made adding tests trickier than it should have been.
>>
>> Ian
>>
>> On Tue, 9 Mar 2021 at 21:51, Timothy McCurrach 
>> wrote:
>>
>>> > It seems like a good idea. However, it leads us to another question.
>>> Do we really need the is_staff field on the User Model if it is deprecated?
>>>
>>> User.is_staff is still used, just from Adminsite.has_permission instead:
>>>
>>> https://github.com/django/django/blob/main/django/contrib/admin/sites.py#L196
>>>
>>> On Tue, Mar 9, 2021 at 9:45 PM Matthew Pava  wrote:
>>>
 > Thoughts on deprecating it?

 It seems like a good idea. However, it leads us to another question. Do
 we really need the is_staff field on the User Model if it is deprecated?



 *From:* django-d...@googlegroups.com  *On
 Behalf Of *Timothy McCurrach
 *Sent:* Tuesday, March 9, 2021 3:22 PM
 *To:* django-d...@googlegroups.com
 *Subject:* Re: Difference between AdminSite.admin_view and
 staff_member_required?



 staff_member_required feels like a bit of a relic from the past:

 - It looks like before a massive refactor of the admin that happened 12
 years ago (
 https://github.com/django/django/commit/a19ed8aea395e8e07164ff7d85bd7dff2f24edca
 )
 staff_member_required played a similar role to what Adminsite.admin_view
 does now (checks permissions and redirects to login if appropriate). Before
 the refactor, all of the relevant views were wrapped with
 staff_member_required.
 - The above commit introduced AdminSite which has its own
 'has_permissions' method. Adminsite.root (which was the old get_urls)
 called self.has_permissions before calling any other views, so
 staff_member_required was now no longer really required.
 - staff_member_required did however continue to be used in the
 admindocs app (which was now split off into its own app).
 - Adminsite.root was eventually replaced with get_urls and the call to
 has_permissions  was moved into `Adminsite.admin_view` (which also does a
 few other things: adds csrf protection, and deals with caching)
 - Over time staff_member_required became simpler and simpler as things
 like user_passes_test were introduced, and there was no need to repeat
 logic.
 - It's now just a very specific version of `user_passes_test` and is
 only used internally one place - the admindocs app.


 Tobias - In terms of permissions and redirecting; the behaviour of
 admin_view and `staff_member_required` are very similar. The differences
 are that:
  i) admin_view defers to Adminsite.has_

Re: Another approach to ticket373:Add support for multiple-column primary keys

2021-03-15 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Arisophy

I am interested in seeing composite PK's land in Django - I recently made a
composite PK table for a client with a hack to make it work on Django. I'm
sure others are interested too - I just guess at this point there is not so
much momentum on the topic since it's so long running with no solution.

Your approach seems to be fairly limited, so perhaps it's gotten easier
with recent ORM improvements. How well does your method work? Are there any
limitations with which queries are supported, migrations, etc.?

Thanks,

Adam

On Fri, 29 Jan 2021 at 14:31, Arisophy  wrote:

> Hi, django developers.
>
> Is anyone still interested in ticket373?
>
> https://code.djangoproject.com/ticket/373
>
> I'm gradually migrating legacy systems built with Ruby On Rails to Django.
> So made an extended Model class that supports composite primary keys.
>
> https://github.com/Arisophy/django-compositepk-model
>
> It worked nicely with a small amount of code.
>
> FYI
>
> Arisophy
>
> --
> 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/CA%2B2LtkDBof5M9aG-QjgeUTa9EbXRCtnNEOCqqt2aT%3DeexN4DGA%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/CAMyDDM2VAnD6tLwdO2oFLaqpxmUJ%3Dg_GJAa3RdstV0H3Lntrsg%40mail.gmail.com.