Re: new to django

2020-09-02 Thread Adam Johnson
That's a very broad question. Have you seen the contributing guide? Particularly "Advice for New Contributors" ( https://docs.djangoproject.com/en/dev/internals/contributing/new-contributors/ ) and "Writing your first patch for Django" ( https://docs.djangoproject.com/en/dev/intro/contributing/ ).

2020 edition of core.files.storages.Storage.copy method

2020-09-02 Thread Lorenzo Peña
Hi everyone! About providing an interface 'copy' method for file storages, is this still no-go as of 2020? Background reading: - https://github.com/jschneier/django-storages/issues/428 - https://code.djangoproject.com/ticket/20488 - https://github.com/django/django/pull/4244 Thanks! -- You re

Re: 2020 edition of core.files.storages.Storage.copy method

2020-09-02 Thread Carlton Gibson
Hi Lorenzo. You’re asking folks to do quite a lot of homework there. Any chance you could summarise the previous discussions and explain at least, why this might be a good feature, and why (presumably) it was a no-go last time? I think there’s more chance of positive input that way. 🙂 Kind

Re: 2020 edition of core.files.storages.Storage.copy method

2020-09-02 Thread Lorenzo Peña
Apologies for the lazy version. Let me elaborate a bit more :) >From what I read, the blocker last time was a lack of a clear path in how to handle a "file already exists" type of error. [1] In my case, the need for a 'copy' method arose from a two step upload flow: first step is to upload the

Re: 2020 edition of core.files.storages.Storage.copy method

2020-09-02 Thread Lorenzo Peña
Some extra context: in https://docs.djangoproject.com/en/3.1/topics/files/ there is a code example that uses `os.rename`. I consider this behavior to be needed quite often on some scenarios, except that the specific implementation of `rename` will depend on the storage being used. El miércole

Re: 2020 edition of core.files.storages.Storage.copy method

2020-09-02 Thread Adam Johnson
>From what I can see in the original PR, it was closed fairly quickly by the author, without debate. I think the option of using FileExistsError for pre-existing files, even on "non-OS filesystems" like S3, is fine. At the end of the day there's an operating system somewhere, and it's better than

Using directory locale with __init__.py

2020-09-02 Thread אורי
Django developers, I had an exception because of using a directory locale with __init__.py, but I followed Django, which also uses a directory locale with __init__.py. It seems that there is a module *locale *in Python that can't be used with a local directory locale. https://stackoverflow.com/a/

Re: Using directory locale with __init__.py

2020-09-02 Thread Adam Johnson
> > Do you think it's a good idea to use a directory locale with __init__.py? > No, because as you've found it masks the locale stdlib module. I prefer placing my entire django project within one package, this would allow you to have the locale directory as a submodule: myproject/ core/ mo

Logging in from one browser logs me out from other browsers (after any change in PBKDF2PasswordHasher.iterations)

2020-09-02 Thread אורי
Django developers, I would like to reopen #31970 . In short, the problem is - if a user is logged in with more than one browser, and when we upgrade Django to any version which *PBKDF2PasswordHasher.iterations* changes (which is *any* new version), and