Re: Set a reasonable default for EMAIL_TIMEOUT

2022-11-17 Thread Arthur Pemberton
> (Why is "Just give it a value in your settings" not OK? 🤔) I'm guessing the issue here is that it's currently an unknown-unknown to most/all newbies. At the very least, it should probably be addressed in the documentation on deployment. Regards, Arthur Pemberton On Th

Re: Model icons

2023-02-18 Thread Arthur Pemberton
I too find the idea of hard coded HTML in a Python file to be inelegant, for what it's worth. Arthur Pemberton On Sat, 18 Feb 2023 at 08:12, 'Adam Johnson' via Django developers (Contributions to Django itself) wrote: > Putting HTML for the admin in model definitions is

Re: Add a minimal Gitignore

2023-03-09 Thread Arthur Pemberton
I like the idea as I've seen novices commit all their .pyc files, but maybe this should only triggered by a flag to startproject, --git perhaps. Arthur Pemberton On Thu, Mar 9, 2023, 14:13 Daniel Azubuine wrote: > Yeah > > What I meant is for the default ‘startproject’ templat

Re: Add a minimal Gitignore

2023-03-10 Thread Arthur Pemberton
What exactly would be considered the burden in maintaining a .gitignore? Arthur On Fri, Mar 10, 2023 at 11:37 AM Tega Ukavwe wrote: > I strongly agree with Adam and Tom, the extra and unnecessary burden of > maintaining the .gitignore file outweighs its advantages. > > Cheers, > Tega. > > On Fr

Production Django use and "real ip"

2023-03-31 Thread Arthur Pemberton
I have read previous discussions (most recent I could find was Dec 2013 [1] ) on the inclusion of `HTTP_X_FORWARDED_FOR` based logic to get the "real" IP address of an HttpRequest. From what I can see, currently there is currently no automatic handling of `HTTP_X_FORWARDED_FOR` in Django. Howe

Re: Production Django use and "real ip"

2023-04-19 Thread Arthur Pemberton
At this point, I'm not even suggesting that Django handle this internally. I'm suggesting that the behaviour/expectation be documented, at least in the deployment guide. Are there any deployment scenarios where META.REMOTE_ADDR is ever even correct? Arthur Pemberton On Wed, Apr 19,

Deploying Django under a sub-path

2023-06-16 Thread Arthur Pemberton
://ruddra.com/deploy-django-subpath-openshift/ to get things to work. Shouldn't this be a complete feature? I've re-checked https://docs.djangoproject.com/en/4.2/howto/deployment/ and there's no information on the topic (that I could find). Arthur Pemberton -- You received this mess

Re: Deploying Django under a sub-path

2023-06-16 Thread Arthur Pemberton
Even with `FORCE_SCRIPT_NAME` `MEDIA_URL` is being prefixed properly, but not `STATIC_URL` . Was `FORCE_SCRIPT_NAME` just not meant to be used with the `runserver` ? Arthur Pemberton On Fri, Jun 16, 2023 at 5:01 PM Arthur Pemberton wrote: > The docs reference `FORCE_SCRIPT_NAME` but say v

Re: Deploying Django under a sub-path

2023-06-16 Thread Arthur Pemberton
I found https://code.djangoproject.com/ticket/7930 seems like `FORCE_SCRIPT_NAME` just isn't meant to work. Maybe the docs should reflect that. Arthur Pemberton On Fri, Jun 16, 2023 at 5:18 PM Arthur Pemberton wrote: > Even with `FORCE_SCRIPT_NAME` `MEDIA_URL` is being prefixed prope

Re: Deploying Django under a sub-path

2023-06-23 Thread Arthur Pemberton
` itself is not documented anywhere; seems like it should at least be mentioned in the Deployment section. Arthur Pemberton On Fri, Jun 23, 2023 at 3:07 PM 'Adam Johnson' via Django developers (Contributions to Django itself) wrote: > Hi Arthur, > > You've found the wro

Use of TIME_INPUT_FORMATS in TimeField

2024-03-04 Thread Arthur Pemberton
ngs.TIME_INPUT_FORMATS seems to be ignored. How does one use settings.TIME_INPUT_FORMATS ? Arthur Pemberton -- 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 fr

Re: Use of TIME_INPUT_FORMATS in TimeField

2024-03-05 Thread Arthur Pemberton
per: > https://docs.djangoproject.com/en/5.0/topics/i18n/formatting/#creating-custom-format-files > > On Tue, 5 Mar 2024 at 18:43, Arthur Pemberton wrote: > >> The documentation ( >> https://docs.djangoproject.com/en/5.0/ref/forms/fields/#timefield) says >> that " the

Re: Use of TIME_INPUT_FORMATS in TimeField

2024-05-18 Thread Arthur Pemberton
urn here once I have some evidence either way, Arthur Pemberton On Tue, Mar 5, 2024 at 3:40 PM Adam Johnson wrote: > USE_I18N does not disable localization, but internationalization. USE_L10N > was the setting to enable/disable localization, but it was deprecated in > Django 4.0: > h

Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-06-23 Thread Arthur Pemberton
Would this be designed to be compatible with "Proposal 14: Background Workers"? On Sun, Jun 23, 2024 at 10:46 PM Mike Edmunds wrote: > I want to propose updating django.core.mail to replace use of Python's > legacy email.message.Message (and other legacy email APIs) with > email.message.EmailM

Re: Proposal to upgrade django.core.mail to Python's modern email API

2024-06-25 Thread Arthur Pemberton
;t > yet investigated whether that use is still necessary, or whether it's there > to get around past bugs/limitations in Python's smtplib. If any of it is > still needed for SMTP, I'd probably want to move that code into the SMTP > EmailBackend(s). > > - Mike >

Case Sensitive Usernames

2021-12-12 Thread Arthur Pemberton
come across [1]. Ideally, it would be great to have a setting (or model field) that would allow easy switching to case insensitive usernames. Arthur Pemberton [1] https://code.djangoproject.com/ticket/2273 -- You received this message because you are subscribed to the Google Groups &qu

Re: Case Sensitive Usernames

2021-12-12 Thread Arthur Pemberton
people with the first letter in uppercase, although their > true address is lowercase. I don't think you want this uppercase letter to > appear on your database in the email field. > > אורי > (Uri) > > u...@speedy.net > > > On Sun, Dec 12, 2021 at 6:02 PM Arth

Re: Case Sensitive Usernames

2021-12-12 Thread Arthur Pemberton
> case-insensitive fields outside of Postgres. I’m not familiar enough with > the other RDBMSs to know how workable that is. But the answer is certainly > not discarding user intent. > > Kye > On 13 Dec 2021, 11:32 AM +0800, Arthur Pemberton , > wrote: > > A

Re: Case Sensitive Usernames

2021-12-12 Thread Arthur Pemberton
outside of Postgres. I’m not familiar enough with > the other RDBMSs to know how workable that is. But the answer is certainly > not discarding user intent. > > Kye > On 13 Dec 2021, 11:32 AM +0800, Arthur Pemberton , > wrote: > > A setting to convert all usernames to lo

Re: Improvements to the startproject template

2022-04-20 Thread Arthur Pemberton
For what it's worth, this is the (general) layout I've used for the past 8+ years of my professional Django development. Arthur On Wed, 20 Apr 2022 at 15:22, Olivier Dalang wrote: > +1 for Adam's suggestion, I use it as well and like it very much. > > > root folder > - manage.py > - ...

Re: Use of TIME_INPUT_FORMATS in TimeField

2024-12-08 Thread Arthur Pemberton
To simplify things further, within a view: TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M', '%I:%M %p'] and forms.TimeField.input_formats = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] On Sun, Dec 8, 2024 at 9:55 AM Arthur

How to run the CustomTimeInputFormatsTests unit test?

2024-12-09 Thread Arthur Pemberton
Even using `./runtests.py forms_tests.tests.test_input_formats.CustomTimeInputFormatsTests.test_timeField` results in an error: TypeError: CustomTimeInputFormatsTests.test_timeField() missing 1 required positional argument: 'self' Arthur Pemberton -- You received this message because you a

Re: How to run the CustomTimeInputFormatsTests unit test?

2024-12-09 Thread Arthur Pemberton
I've submitted https://code.djangoproject.com/ticket/35986 If I'm missing something, please let me know. Arthur Pemberton On Monday, December 9, 2024 at 5:12:57 AM UTC-5 Bendegúz Csirmaz wrote: > Yes you're right, it's not executed for me either. > > On Monday, 9

Re: Use of TIME_INPUT_FORMATS in TimeField

2024-12-09 Thread Arthur Pemberton
test failing. Arthur Pemberton On Sunday, December 8, 2024 at 8:03:22 PM UTC-5 Arthur Pemberton wrote: To simplify things further, within a view: TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M', '%I:%M %p'] and forms.TimeField.input_formats =

Re: Use of TIME_INPUT_FORMATS in TimeField

2024-12-09 Thread Arthur Pemberton
om/adamchainz/django-startproject-templates . > > On Tue, Mar 5, 2024, at 8:48 AM, Arthur Pemberton wrote: > > Thanks, I'll look into that. But does that mean that > settings.TIME_INPUT_FORMATS no longer has any use? I don't see any logic > flows that lead to it being

Re: Use of TIME_INPUT_FORMATS in TimeField

2024-12-08 Thread Arthur Pemberton
ates at > https://github.com/adamchainz/django-startproject-templates . > > On Tue, Mar 5, 2024, at 8:48 AM, Arthur Pemberton wrote: > > Thanks, I'll look into that. But does that mean that > settings.TIME_INPUT_FORMATS no longer has any use? I don't see any logic > f