Fellow Report — January 12, 2018

2018-01-12 Thread Carlton Gibson
Hi all, 

With help from Tim, Aymeric and Frank, I got started on the fellowship this 
week. 
(Thank you all!)


I've Reviewed Patches on: 

https://code.djangoproject.com/ticket/24747 -- Allowed transforms in 
QuerySet.order_by()
https://code.djangoproject.com/ticket/29002 -- Corrected cached template 
loader docs about when it's automatically enabled

https://code.djangoproject.com/ticket/28977 -- Change Local Memory Cache to 
Use LRU
https://code.djangoproject.com/ticket/29004 -- Add optional database view 
support to inspectdb
https://code.djangoproject.com/ticket/28761 -- Document prefixes in 
InlineFormsets
https://code.djangoproject.com/ticket/28885 -- Bottom parts of 
"Congratulations!" page cut off internationalized content


I'm still finding my feet (exactly how things are done etc) so all input is 
welcome and appreciated (!!!)

Kind Regards,

Carlton

-- 
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 post to this group, send email to django-developers@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/f2966dae-a157-4916-85a4-cf6c99a27893%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Fellow Report — January 12, 2018

2018-01-12 Thread Jacob Kaplan-Moss
Hooray, welcome Carlton! Looks like a great first week; glad to have you!

Jacob

On Fri, Jan 12, 2018 at 9:01 AM, Carlton Gibson 
wrote:

> Hi all,
>
> With help from Tim, Aymeric and Frank, I got started on the fellowship
> this week.
> (Thank you all!)
>
>
> I've Reviewed Patches on:
>
> https://code.djangoproject.com/ticket/24747 -- Allowed transforms in
> QuerySet.order_by()
> https://code.djangoproject.com/ticket/29002 -- Corrected cached template
> loader docs about when it's automatically enabled
>
> https://code.djangoproject.com/ticket/28977 -- Change Local Memory Cache
> to Use LRU
> https://code.djangoproject.com/ticket/29004 -- Add optional database view
> support to inspectdb
> https://code.djangoproject.com/ticket/28761 -- Document prefixes in
> InlineFormsets
> https://code.djangoproject.com/ticket/28885 -- Bottom parts of
> "Congratulations!" page cut off internationalized content
>
>
> I'm still finding my feet (exactly how things are done etc) so all input
> is welcome and appreciated (!!!)
>
> Kind Regards,
>
> Carlton
>
> --
> 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 post to this group, send email to django-developers@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/f2966dae-a157-4916-85a4-
> cf6c99a27893%40googlegroups.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 post to this group, send email to django-developers@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/CAK8PqJEb67GjpTHhgwGt9CyH6RkSj58e4yXbL2dj0e6LuqzyNA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: #28975 - Skip automatic creation of postgis extension if it already exists

2018-01-12 Thread Shai Berger
As far as I know, Postgres is smart enough that the SQL statement

CREATE EXTENSION IF NOT EXISTS postgis

actually fails on permissions, only if the extension doesn't exist (we
ran into a very similar issue with the 'hstore' extension just the
other day).

So long as that is true -- I don't really see a problem here. If the
extension is installed, there will be no error; if it isn't, and the
user doesn't have permissions to create it, I see little difference
between an error when setting up the database and an error encountered
in migrations.

Shai.

On Thu, 11 Jan 2018 07:59:05 -0300
Ramiro Morales  wrote:

> On Wed, Jan 10, 2018 at 3:12 AM, Niclas Kron 
> wrote:
> 
> > Hello,
> > I am writing to you to establish some sort of consensus on how to
> > proceed with this bug/PR:
> >
> > * PR https://github.com/django/django/pull/9518
> > * BUG https://code.djangoproject.com/ticket/28975
> >
> > With regard to the problem - the current implementation is that a
> > query is ran to determine
> > if the extension exists or not in the current database. That query
> > unlike `CREATE EXTENSION ...`
> > does not require superuser status on the executing database user.
> >
> > The pros and cons for this implementation:
> >
> > ### Pros
> > * Operates as normal with the only addition that if it already
> > exists we dont
> > run the CREATE EXTENSION thus the application wont fail if the user
> > is a non-superuser.
> >
> > ### Cons:
> > * Hard to test due to the fragility of the tests
> >
> > By hard to test, I mean that I can't easily test it because current
> > implementation leads some sort of race condition
> > and sometimes the tests fail. At least if you look at my current
> > tests (yes I am a new to this).
> >
> > I did talk about this on the irc channel #django and #django-dev to
> > try to solve it - however
> > the recommendation was to write on the mailing list to try to
> > establish a consensus on a proper
> > way to go forward. This especially since another create suggestion
> > was put forward by Ramiro Morales
> > as per: https://code.djangoproject.com/ticket/28975#comment:5
> >
> >  
> Please disregard that comment as I posted it before or in parallel
> with the discussion you and Tim were
> having via the GitHub PR about a non-admin Postgres user being able to
> introspect at runtime if the
> postgis extension is installed or not.
> 
> Had considered the idea myself bud assumed it woudn't be possible or
> that it would introuduce too
> much complexityto the code. Was wrong on both counts.
> 
> 
> Regards,
> 

-- 
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 post to this group, send email to django-developers@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/20180112191150.779cd7a1.shai%40platonix.com.
For more options, visit https://groups.google.com/d/optout.


Re: Fellow Report — January 12, 2018

2018-01-12 Thread Adam Johnson
🎉🎉🎉  Welcome! 🎉🎉🎉

On 12 January 2018 at 17:04, Jacob Kaplan-Moss  wrote:

> Hooray, welcome Carlton! Looks like a great first week; glad to have you!
>
> Jacob
>
> On Fri, Jan 12, 2018 at 9:01 AM, Carlton Gibson 
> wrote:
>
>> Hi all,
>>
>> With help from Tim, Aymeric and Frank, I got started on the fellowship
>> this week.
>> (Thank you all!)
>>
>>
>> I've Reviewed Patches on:
>>
>> https://code.djangoproject.com/ticket/24747 -- Allowed transforms in
>> QuerySet.order_by()
>> https://code.djangoproject.com/ticket/29002 -- Corrected cached template
>> loader docs about when it's automatically enabled
>>
>> https://code.djangoproject.com/ticket/28977 -- Change Local Memory Cache
>> to Use LRU
>> https://code.djangoproject.com/ticket/29004 -- Add optional database
>> view support to inspectdb
>> https://code.djangoproject.com/ticket/28761 -- Document prefixes in
>> InlineFormsets
>> https://code.djangoproject.com/ticket/28885 -- Bottom parts of
>> "Congratulations!" page cut off internationalized content
>>
>>
>> I'm still finding my feet (exactly how things are done etc) so all input
>> is welcome and appreciated (!!!)
>>
>> Kind Regards,
>>
>> Carlton
>>
>> --
>> 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 post to this group, send email to django-developers@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/ms
>> gid/django-developers/f2966dae-a157-4916-85a4-cf6c99a27893%
>> 40googlegroups.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 post to this group, send email to django-developers@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/CAK8PqJEb67GjpTHhgwGt9CyH6RkSj
> 58e4yXbL2dj0e6LuqzyNA%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
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 post to this group, send email to django-developers@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/CAMyDDM3gvmrOagoqnhK5hcf_Lk79PMtu0vZ%3DhXz%2B9QUdgugy-g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Fellow Report — January 12, 2018

2018-01-12 Thread Aymeric Augustin
Welcome Carlton!

For everyone else, here's more info:
https://www.djangoproject.com/weblog/2018/jan/12/dsf-welcomes-carlton-gibson-its-newest-fellow/

Best regards,

-- 
Aymeric.

2018-01-12 18:20 GMT+01:00 Adam Johnson :

> 🎉🎉🎉  Welcome! 🎉🎉🎉
>
> On 12 January 2018 at 17:04, Jacob Kaplan-Moss  wrote:
>
>> Hooray, welcome Carlton! Looks like a great first week; glad to have you!
>>
>> Jacob
>>
>> On Fri, Jan 12, 2018 at 9:01 AM, Carlton Gibson > > wrote:
>>
>>> Hi all,
>>>
>>> With help from Tim, Aymeric and Frank, I got started on the fellowship
>>> this week.
>>> (Thank you all!)
>>>
>>>
>>> I've Reviewed Patches on:
>>>
>>> https://code.djangoproject.com/ticket/24747 -- Allowed transforms in
>>> QuerySet.order_by()
>>> https://code.djangoproject.com/ticket/29002 -- Corrected cached
>>> template loader docs about when it's automatically enabled
>>>
>>> https://code.djangoproject.com/ticket/28977 -- Change Local Memory
>>> Cache to Use LRU
>>> https://code.djangoproject.com/ticket/29004 -- Add optional database
>>> view support to inspectdb
>>> https://code.djangoproject.com/ticket/28761 -- Document prefixes in
>>> InlineFormsets
>>> https://code.djangoproject.com/ticket/28885 -- Bottom parts of
>>> "Congratulations!" page cut off internationalized content
>>>
>>>
>>> I'm still finding my feet (exactly how things are done etc) so all
>>> input is welcome and appreciated (!!!)
>>>
>>> Kind Regards,
>>>
>>> Carlton
>>>
>>> --
>>> 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 post to this group, send email to django-developers@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/ms
>>> gid/django-developers/f2966dae-a157-4916-85a4-cf6c99a27893%4
>>> 0googlegroups.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 post to this group, send email to django-developers@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/ms
>> gid/django-developers/CAK8PqJEb67GjpTHhgwGt9CyH6RkSj58e4yXbL
>> 2dj0e6LuqzyNA%40mail.gmail.com
>> 
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> 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 post to this group, send email to django-developers@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/CAMyDDM3gvmrOagoqnhK5hcf_
> Lk79PMtu0vZ%3DhXz%2B9QUdgugy-g%40mail.gmail.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Aymeric.

-- 
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 post to this group, send email to django-developers@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/CANE-7mUw8Gug8bBir2F3d7FPKeE2cDikdBSij9xYRj1PxDXyzQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Should ModelField.choices accept a callable?

2018-01-12 Thread Adam Johnson
I'd be more in favour of opting specific kwargs out of migrations, it keeps
the interface simpler for users. There's a barrier to understanding
Field(choices=func_that_returns_a_plain_list).

As an note, Django-MySQL's EnumField uses the values in choices at the
database layer to define an ENUM type column:
https://django-mysql.readthedocs.io/en/latest/model_fields/enum_field.html
, so it would need to opt back in choices affecting migrations, if Django
went the route of ignoring it.

On 12 January 2018 at 02:50, Josh Smeaton  wrote:

> Migrations are mainly for tracking database changes. Model attributes not
> SQL related are pushed into the migrations also, presumably for the
> purposes of data migrations (maybe post-hoc justification, only a few
> people would actually know). Providing a callable still provides access to
> the data as defined as migration time. But for dynamic content like
> choices, the set of production values can and will differ from the set of
> dev values.
>
> Perhaps there should be a more general mechanism for opting specific
> kwargs out of migrations - I don't know.
>
> --
> 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 post to this group, send email to django-developers@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/382314ae-b3e4-4ce6-be34-
> 135060978317%40googlegroups.com
> 
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
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 post to this group, send email to django-developers@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/CAMyDDM2o_5yyUS3hQv-3h5O%3Dq561atjEBJAp%2B%3DLtv0SosuC7-A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Default Authorization BackEnd Denying Permissions if Object Provided

2018-01-12 Thread Mehmet Dogan
Created a pull request: https://github.com/django/django/pull/9581

Mehmet

-- 
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 post to this group, send email to django-developers@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/e617c213-a5c7-4b84-a12f-58a4154d1482%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.