Re: Signals - Need a signal after annotations are added

2019-02-23 Thread Philip James
Hi! I think I'm misunderstanding what you're asking for. I've looked at
every doc I can find on annotations to refresh my memory, and it looks like
annotations only apply to query sets, not to objects? Could you say a bit
more about your use case to help me grok what's going on?

Thanks,
Philip

PJJ
http://philipjohnjames.com


On Sat, Feb 23, 2019 at 12:08 PM Mike Brown  wrote:

> I have a situation where I need a signal for when a model object is fully
> instantiated.
>
> Currently, there are signals for pre_init and post_init. However, when
> post_init is fired,
> the object is not fully 'initialized' in the sense that annotations have
> not yet been added to the object.
>
>
> In django.db.models.query there is class ModelIterable(BaseIterable)
>
> In this class there is code to run a query and then apply annotations.
>
> Should there be a new signal added to Django that is fired after the
> annotations are complete and the object is fully instantiated?
>
> Maybe a signal called 'instantiation_complete'?
>
>
> --
> 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/bc4516df-71da-429f-af80-7c98a60ab91f%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/CACXM1yFDmDRP%3D2aRpgrzk4PvgPSGbBSMQh%3D0D7XTmRES%2BQ99Tg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Password reset emails in combination with click tracking do not work with Intelligent Tracking Prevention on Safari for iOS 12 and macOS Mojave

2019-02-20 Thread Philip James
Mat, are you saying you're seeing Safari still blocking, even with click
tracking turned off, because GMail itself is inserting a redirect?

PJJ
http://philipjohnjames.com


On Wed, Feb 20, 2019 at 4:46 AM Mat Gadd  wrote:

> We're also now seeing Gmail users complain that the password reset links
> don't work, even after we disabled click tracking. It seems that Google are
> inserting their own click tracking into users' emails, which is… weird?
>
> The markup of links is transformed to the following (where … is our
> original URL):
>
> https://www.google.com/url?q=…;>Link text here
>
> Gmail is a *huge* provider of emails, and they make up around 54% of our
> user base. Anyone using the Gmail web app can no longer reset their
> password simply by clicking the link in the email.
>
> On Wednesday, 23 January 2019 12:51:22 UTC, Perry Roper wrote:
>>
>> It would appear that this affects a large number of users. We're also
>> experiencing this in the following configurations.
>>
>> - Mailgun click tracking enabled + Safari 12.0 on MacOS or any browser in
>> iOS 12
>> - Clicking the link in the Gmail app or web app (Mailgun click tracking
>> disabled) + Safari 12.0 on MacOS or any browser in iOS 12.
>>
>> All iOS 12 browsers and MacOS Safari users using the Gmail app, or in any
>> email client if the site they are requesting a password from uses link
>> tracking.
>>
>> On Thursday, 22 November 2018 20:43:15 UTC+7, Mat Gadd wrote:
>>>
>>> Hi all,
>>>
>>> I raised a ticket 
>>> regarding this and was directed here to discuss the topic. The summary is
>>> that the combination of using click-tracking redirects (which are popular
>>> with a variety of email providers) with the Django contrib.auth password
>>> reset views does not work in Safari on macOS and iOS as of the latest major
>>> versions.
>>>
>>> It took me quite a long time to work out what was happening, so I wanted
>>> to at least raise a ticket where other people might find it, but was also
>>> hoping to start a discussion around how else the problem could be
>>> mitigated. An option to disable the internal token redirect might be
>>> useful, but that then re-opens the token up to being leaked via the
>>> HTTP_REFERER header.
>>>
>>> Regards,
>>>  - Mat
>>>
>> --
> 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/c10f608f-7f5e-4bba-aa89-4779e37d61f0%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/CACXM1yGLRk9zXvHX3DGdSbh%2B3MT2G%3DmhJ_%2BdUsPEVTf%2By%3DqaJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Easy prod setup for noobs

2017-12-10 Thread Philip James
Hey Barney! 

Thanks for reaching out. I think in general we are super careful about giving 
recommendations for hosting setups, because they things that end up in the 
official Django docs carry a lot of weight - sometimes more than we intend!

I think it’s unlikely we would include this today, but we have in the past 
tossed around the idea of a “recommended other resources” section. If that ever 
gets off the ground we could look at adding that there. 

Thanks again!

> On Dec 10, 2017, at 09:34, Barnabas Szabolcs  
> wrote:
> 
> Hi guys,
> 
> you do an awesome job, developing Django, and I've used it for quite a few 
> years. Still, always struggled how to get it reliably in production. (shame 
> on me, I know...) 
> Now, I have just come across an awesome tutorial that looks very robust, 
> simple and elegant to me (and even a noob-ish person like me managed to make 
> it work:P ):
> 
> http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/
> 
> maybe you could put something along these lines into your manual. So others 
> will have less difficult time.
> I don't know this guy, but I decided to drop a letter for him anyway, 
> I reckon it could be a win-win for both of you..
> 
> Cheers,
> Barney
> -- 
> 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/7aed54e4-1cb0-44e4-be4a-abba06a1707e%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/CB22C307-56EF-435D-9E72-52E37A6302F9%40philipjohnjames.com.
For more options, visit https://groups.google.com/d/optout.


Re: Admin browser support policy

2017-06-14 Thread Philip James
I certainly care about mobile support. Being able to use even a limited
version of Django admin on my phone would make my life significantly better.


PJJ
http://philipjohnjames.com

On Wed, Jun 14, 2017 at 4:02 PM, Curtis Maloney  wrote:

> This topic seems to appear frequently over the years, but I've yet to see
> a clear decision.
>
> Without a clear Browser Support Policy for admin, it can be very unclear
> what cleanups, optimisations, and improvements can be made.
>
> Collin Anderson suggested supporting IE11+ ("as that's the latest on
> Windows 7 and there's not much 9-10 usage"), and I'd suggest also
> considering the general Google approach:
>
> Basically, it's "Current and Previous version", and considering IE as
> separate from Edge (so IE 10/11, Edge current and previous).
>
> Does this sound fair and reasonable?
> Do we care about mobile browsers?
> Does Safari deserve/require special casing?
>
> Once we can resolve this, I want to start working on revising all the JS.
> But I won't start that until I know what dross I have to still drag along.
>
> --
> Curtis
>
> --
> 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/c03cd097-de5c-7538-2866-a989291b9a3e%40tinbrain.net.
> 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/CACXM1yFuL13wX4g%2BrGt%3DE%3D8P29W1zw5iN00dgwUrq6KGqwieLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: New to django

2016-11-28 Thread Philip James
Hi there. you've reached the Django Developers list, the list we use for
people who are working on Django itself. It sounds like you're interested
in building things with Django; if so, we recommend starting with the
tutorial: https://docs.djangoproject.com/en/1.10/intro/tutorial01/

Cheers,
Philip

PJJ
http://philipjohnjames.com

On Mon, Nov 28, 2016 at 10:30 AM, harisaicharan.cha...@gmail.com <
harisaicharan111.cha...@gmail.com> wrote:

> I am new to django. so can someone help me  in getting started quickly.
>
> --
> 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/CAPnJTnJcj%3D44Wn%3DefKb6LyMy%
> 3DyrP6KXu919iLsYeYCBh%3DzM0wQ%40mail.gmail.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/CACXM1yE1eHtwWwjUJfkViA4JWxsYgkZF2RmmH443XKdDCRc%2Bhw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Should we require pytz for timezone support in Django?

2016-06-04 Thread Philip James
Adding pytz to install_requires might not contribute to a bug fix or new
feature right now, but it does remove a point of confusion from the docs. I
think it also reduces friction in getting Django up-and-running, which
seems valuable for Django users and Django contributors.

PJJ
http://philipjohnjames.com

On Sat, Jun 4, 2016 at 11:42 AM, Carl Meyer <c...@oddbird.net> wrote:

> On 06/03/2016 03:55 PM, Philip James wrote:
> > Is there consensus on making pytz required? (I, personally, am in favor,
> > since I too can't remember the last project I did that didn't need it.)
> >
> > If it's required, should it be vendored?
>
> -1 on vendoring pytz. I think it's fine to just make it a required
> dependency if that saves us significant work on a valuable new feature
> or refactoring. I don't really see the hurry to make it a required
> dependency just for its own sake, though.
>
> Carl
>
> --
> 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/57532114.20003%40oddbird.net
> .
> 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/CACXM1yEYWzpZMSNk8Sy9x%3DsBvFaLWK5Cokg3ujZYf%3D2koc5OSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Should we require pytz for timezone support in Django?

2016-06-03 Thread Philip James
Is there consensus on making pytz required? (I, personally, am in favor, 
since I too can't remember the last project I did that didn't need it.)

If it's required, should it be vendored?

On Thursday, May 19, 2016 at 11:10:09 PM UTC-7, akki wrote:
>
> Corresponding ticket - #26622 
> .
>
> On Tuesday, 17 May 2016 05:51:29 UTC+5:30, Josh Smeaton wrote:
>>
>> While writing timezone tests for 
>> https://github.com/django/django/pull/6243 I ran into some issues where 
>> pytz seemed to be required for just about every database and platform 
>> combination except postgres on linux. The docs for timezone support (
>> https://docs.djangoproject.com/en/dev/topics/i18n/timezones/) say:
>>
>> Installing pytz  is highly recommended, 
>>> but may not be mandatory depending on your particular database backend, 
>>> operating system and time zone. If you encounter an exception querying 
>>> dates or times, please try installing it before filing a bug. 
>>
>>
>> I tried to find some documentation on the broader internet that would 
>> more accurately describe when and for what platforms pytz is actually 
>> required for timezone support, but was unable to find anything. I've opened 
>> a new ticket https://code.djangoproject.com/ticket/26622 to clarify more 
>> explicitly when pytz is required.
>>
>> However, I'm wondering if we should just go all-in on pytz and require it 
>> for timezone support. I've not run a Django site with timezone support 
>> without pytz, so I'm not sure what exact limitations exist or why you'd 
>> want to use timezone support without pytz. I'd be interested in hearing use 
>> cases for not requiring pytz if there are any. Explicitly requiring pytz 
>> will make test writing a lot easier, and will remove any doubt about 
>> whether or not pytz is required for users.
>>
>> Josh 
>>
>

-- 
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/16ce6fb6-c787-452b-a1b3-5f9891f8c80e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.