Re: future of QuerySet.extra()?

2015-08-06 Thread Adam Johnson
I've seen *extra()* misused in cases where developers came from a background of writing raw SQL and then used it rather than figuring out the (often relatively simple) ORM way of doing it. This is then a big maintenance burden, and the harsher warning against its use is a good idea. Also thanks

Document/make public prefetch_related_objects

2015-08-14 Thread Adam Johnson
*prefetch_related* is great, but it would be nice to be able to reuse its capabilities with lists of model instances already retrieved by other code (or from cache, or newly constructed, etc.). It seems this is possible by using *django.db.models.query.prefetch_related_objects* which is the fun

Re: How to disable system check framework?

2015-08-14 Thread Adam Johnson
Marcin - you can "tidy up" some monkey patches, or at least make them robust to the code you're replacing changing, by using https://github.com/adamchainz/patchy . I'm -1 - we've recently been implementing project system checks for our team and they are super useful. We even have one that check

Re: Document/make public prefetch_related_objects

2015-08-15 Thread Adam Johnson
newticket > > On 14 August 2015 at 13:26, Adam Johnson wrote: > >> *prefetch_related* is great, but it would be nice to be able to reuse >> its capabilities with lists of model instances already retrieved by other >> code (or from cache, or newly constructed, etc.). I

Re: future of QuerySet.extra()?

2015-08-21 Thread Adam Johnson
ess I'm missing something... any suggestions welcome ( https://github.com/adamchainz/django-mysql/pull/144/files ). On Thursday, August 6, 2015 at 10:06:38 PM UTC+1, Adam Johnson wrote: > > I've seen *extra()* misused in cases where developers came from a > background of writing ra

Re: Django reusable app versions.

2019-11-12 Thread Adam Johnson
Hi Kevin, I feel like this is a support question more than a question around developing Django, so I've pasted my canned response below. But to answer your question: yes you have to downgrade your database while on version 0.0.2. Django can't downgrade a migration without the file being there :) I

Re: Django reusable app versions.

2019-11-12 Thread Adam Johnson
No worries, glad to have you in our community. On Tue, 12 Nov 2019 at 19:09, Kevin Sallée wrote: > You are totally right, my mistake. Sorry about that, noob here. > > On Tuesday, November 12, 2019 at 12:16:12 PM UTC-6, Adam Johnson wrote: >> >> Hi Kevin, >> >&

Re: django-admin startproject settings.py has some security holes

2019-11-16 Thread Adam Johnson
There is such a link since 2013: https://github.com/django/django/commit/912b5d2a6bc78067d6a7e130f10514c51bd1a58f On Thu, 24 Oct 2019 at 23:31, Olivier Dalang wrote: > Hi, > > Just a reminder about this page in the docs: > https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/ > It ba

Deprecate HttpRequest.is_ajax

2019-11-16 Thread Adam Johnson
Django's HttpRequest.is_ajax method determines whether the request was made with the JS API XMLHttpRequest https://docs.djangoproject.com/en/2.2/ref/request-response/#django.http.HttpRequest.is_ajax . It does so by checking the X-Requested-With header. The new way of making "AJAX" requests from th

Re: Deprecate HttpRequest.is_ajax

2019-11-17 Thread Adam Johnson
e), which > isn’t great and isn’t reliable. > > > On 16 Nov 2019, at 16:08, Adam Johnson wrote: > > Django's HttpRequest.is_ajax method determines whether the request was > made with the JS API XMLHttpRequest > https://docs.djangoproject.com/en/2.2/ref/request-response/#

Re: The Missing Piece in Indexing

2019-11-20 Thread Adam Johnson
Hi Behzad Your database will automatically use the appropriate indexes for given queries, thanks to its optimizer. See https://en.m.wikipedia.org/wiki/Query_optimization and DB specific docs such as: https://www.postgresql.org/docs/9.0/planner-optimizer.html , https://dev.mysql.com/doc/internals/e

Re: Add subdomains of localhost to ALLOWED_HOSTS in DEBUG mode

2019-11-21 Thread Adam Johnson
I’m all in favour of making development easier. Would be in favour of this if I could see a source :) Also can you check the behaviour in more browsers than Chrom(e|ium)? :) On Thu, 21 Nov 2019 at 21:40, Gordon wrote: > Good afternoon, > > It seems pretty straightforward to me as a win with no d

Re: Add subdomains of localhost to ALLOWED_HOSTS in DEBUG mode

2019-11-22 Thread Adam Johnson
s by 2090. But it does make development >> on Chrome nice now =) >> >> On Thu, Nov 21, 2019 at 4:49 PM Adam Johnson wrote: >> >>> I’m all in favour of making development easier. Would be in favour of >>> this if I could see a source :) Also can you check the

Re: ngettext_lazy and ngettext

2019-11-23 Thread Adam Johnson
Uri, I understand this is frustrating for you as a user. Thank you for documenting your issues extensively so they're easy to follow. However it seems like a complicated problem and that Claude is the only person spending significant time working on translations these days. If you have some resour

Re: Django front end usage

2019-11-25 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer yo

Re: django last version installation

2019-11-26 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer yo

Re: New to Open Source Contribution Need Help With Setting Up Environment For Channels to Reproduce Issues After Cloning From Git

2019-11-28 Thread Adam Johnson
Hi Suvodeep, Did you see this documentation page? https://channels.readthedocs.io/en/latest/contributing.html If you use the command: pip install -e . You can install your cloned channels copy in a virtual environment and use that as normal in a channels app. Afraid I haven't worked on it myse

Re: Add an --unapplied option for showmigrations

2019-11-29 Thread Adam Johnson
I think you want "manage.py migrate --plan" - new in Django 2.2 https://docs.djangoproject.com/en/2.2/ref/django-admin/#cmdoption-migrate-plan On Fri, 29 Nov 2019 at 10:59, Sky Christensen wrote: > I'd like to be able to easily see a list of only unapplied migrations. > > I often find myself swi

Re: Status of 3.0 release blockers

2019-12-01 Thread Adam Johnson
Recai, I’m afraid that’s not true. Django 3.0 adds ASGI support for asynchronous calls to the outermost handler. However all the rest of the stack remains synchronous. See the release notes: https://docs.djangoproject.com/en/dev/releases/3.0/ For a single file demo app see my blog post: https://ad

Re: Forms submitted by bots

2019-12-14 Thread Adam Johnson
Preventing bot submissions is a bit of an arms race. Django could add some protection but if many Django sites use it then bot scripts might be adapted to workaround it. I've had success using django-recaptcha in the past: https://github.com/praekelt/django-recaptcha . django-honeypot looks good t

Re: Add an --unapplied option for showmigrations

2019-12-14 Thread Adam Johnson
w only the > unapplied migrations, use `django-admin migrate --plan`." > > > On 2019-11-29 04:31, Adam Johnson wrote: > > I think you want "manage.py migrate --plan" - new in Django 2.2 > > > https://docs.djangoproject.com/en/2.2/ref/django-admin/#cmdoption-mi

Re: Adding json lines (jsonl) serializer ro django

2019-12-16 Thread Adam Johnson
Hi Ali Thanks for coming back to this. As I wrote on the ticket I'd be in favour of adding this. If you've got some code already it'd be good to see it in a PR As for your question about overly long lines I think the .replace() style is fine, or a consrtuction like this: ''.join([ "{" '

Re: Suggestion to change the Logger date format to ISO 8601

2019-12-16 Thread Adam Johnson
Hi I think the change you're referring to is in runserver: https://github.com/django/django/blob/ff00a053478fee06bdfb4206c6d4e079e98640ff/django/core/servers/basehttp.py#L132 . Django uses a function from the standard library wsgiref simple server here to generate server_time which is then shown i

Re: Suggestion: Add validators to Model Meta options

2019-12-16 Thread Adam Johnson
Hi Mathias I feel like this has been suggested on the mailing list or ticket tracker before, a few years ago. However after a quick check I can't find the discussion/ticket in mind. Perhaps if you hunt a bit better than me you can find it. I think it's definitely a whole in the validation API. I

Re: Static files configuration

2019-12-17 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer yo

Re: Automatic admins registration

2019-12-18 Thread Adam Johnson
Hi Vladimir Posting code to this mailing list is the wrong way to try make contributions. Thanks for offering though. Please read the guides at https://docs.djangoproject.com/en/dev/internals/contributing/ for how to post tickets and code. However from a quick skim I'm not sure your code is valu

Re: Sounding out for GSoC 2020.

2019-12-18 Thread Adam Johnson
> > This year was interesting. Sage in particular did well putting together a > cross-db JSONField, but he was probably under-mentored, > since Mariusz has spent quite a bit of time reworking the PR, and still > has a bit to go, before we can pull it in, hopefully for 3.1 > > So, one consideration

Re: what is the efficient way for Testing and making changes to the code

2019-12-20 Thread Adam Johnson
If you're looking to develop *Django itself* I think you're looking for this guide: https://docs.djangoproject.com/en/3.0/intro/contributing/ Otherwise - I've pasted my common "wrong mailing list" post below. Thanks for your understanding, Adam Hi! I think you've found the wrong mailing list f

Re: [new contributor] Where to find resources to make changes to djangoproject.com ?

2019-12-20 Thread Adam Johnson
This guide may also be useful: https://docs.djangoproject.com/en/3.0/intro/contributing/ On Fri, 20 Dec 2019 at 14:11, Abhijeet Viswa wrote: > Hey, > > You can find the tutorial for Writing documentation here: > > https://docs.djangoproject.com/en/dev/internals/contributing/writing-documentation

Google Patch Rewards program

2019-12-21 Thread Adam Johnson
I just saw Google is expanding their Patch Rewards program for open source security improvements: https://security.googleblog.com/2019/12/announcing-updates-to-our-patch-rewards.html They are offering two tiers of rewards - $5,000 or $30,000 - for open source projects making security improvements

Re: declarative settings

2019-12-31 Thread Adam Johnson
When using settings for my third party packages I use: * A class to read django.conf.settings and add defaults/other logic through properties - for example https://github.com/adamchainz/django-cors-headers/blob/31b9c2ef8a333a40f18081ffc1f1cba9fb34574d/src/corsheaders/conf.py . This has the benefit

Re: remove_stale_contenttypes doesn't remove entries for renamed apps.

2019-12-31 Thread Adam Johnson
Hi Gowtham My Django ticket was closed > Please link to the ticket here. May be we can add an optional kwarg to remove_stale_contenttypes command to > remove all contenttypes that do not have a corresponding model in existing > appsv > That sounds somewhat reasonable to me. I think there are mo

Re: remove_stale_contenttypes doesn't remove entries for renamed apps.

2020-01-01 Thread Adam Johnson
Mariusz makes the point on the ticket that this can cause data loss for custom content types, which is true. This seems to be a fairly thorny problem to me since there are several different data loss risks. Perhaps a documentation change would be the easiest first step - one can always remove part

Re: declarative settings

2020-01-01 Thread Adam Johnson
nswer all (for me) relevant things at once here - sorry to > write such a huge mail. > *@Adam Johnson:* > > * A class to read django.conf.settings and add defaults/other logic > through properties - for example > https://github.com/adamchainz/django-cors-headers/blob/31b9c2ef

Re: Potential performance related bug in django`s Queryset.get().

2020-01-02 Thread Adam Johnson
Hi Anudeep Your change makes get() perform an extra query for count() before it . This would be a regression for most uses of get(). get() is not intended for use "when multiple objects exists in very big numbers". You may want to perform a single query, something like Model.objects.filter(id__in

Re: remove_stale_contenttypes doesn't remove entries for renamed apps.

2020-01-02 Thread Adam Johnson
I guess an optional kwarg would be okay then. On Thu, 2 Jan 2020 at 03:08, Javier Buzzi wrote: > @adam I agree with your points, about data loss, but this can still see > this as being beneficial, perhaps the approach was just too harsh. Perhaps > adding a flag in the management command would ge

Re: Integrate Django with React

2020-01-03 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer yo

Re: Extent of async integration into 3.0

2020-01-07 Thread Adam Johnson
Hi Jure Andrew laid out the general plan in DEP 0009: https://github.com/django/deps/blob/master/accepted/0009-async.rst I think this answers all your questions, for example: WebSocket support will not be in Django itself; instead, we will make sure > that Channels has all the hooks it needs to

Re: Worth raising a warning when `order_by('?')` is used with specific backends?

2020-01-10 Thread Adam Johnson
Hi Santiago There are any kinds of queries that can be slow in Django. ORDER BY RANDOM() will be just as slow on large tables as ORDER BY some_unindexed_column, or many other SQL constructs. Django can't predict well how expensive a query will be - that's the job of the database's optimizer. It v

Re: Django3.0 / async - use cases

2020-01-13 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer yo

Re: Use "raise from" where appropriate, all over the codebase

2020-01-18 Thread Adam Johnson
Agree with Tom here. Is there anything we can do to control the way python displays them? And how would we ensure the format is kept going forwards? Is there a flake8 rule/plugin we could activate to enforce it? On Sat, 18 Jan 2020 at 10:23, Tom Forbes wrote: > I agree with this change from a

Re: Use "raise from" where appropriate, all over the codebase

2020-01-18 Thread Adam Johnson
> > I would like to make the point that chained exceptions might be slightly > annoying when displayed via console output, as you see the inner exception > first and have to scroll up to see the exception you actually have to > handle. Just coming back to this, Tom it's not quite true. Yes you se

Re: Use "raise from" where appropriate, all over the codebase

2020-01-20 Thread Adam Johnson
Nice work Jon. I don't think we can generally apply R100 though - thre are definitely cases where "raise" inside an exception handler is not *caused* by the other exception - but maybe that's a sign refactoring is needed. On Sun, 19 Jan 2020 at 22:52, Jon Dufresne wrote: > > > I think it's rare

Re: Keep https://code.djangoproject.com/ login

2020-01-24 Thread Adam Johnson
Please file this as an issue at https://github.com/django/djangoproject.com/issues ‪On Fri, 24 Jan 2020 at 07:35, ‫אורי‬‎ wrote:‬ > Django developers, > > https://code.djangoproject.com/ logs me out after about 24 hours, and > each time I have to login again (with GitHub). Why doesn't it keep me

Re: the design of django group permission should be optimized in django.contrib.auth.ModelBackend

2020-01-24 Thread Adam Johnson
Exactly as you see, nothing is done in secret. On Fri, 24 Jan 2020 at 08:44, LBris wrote: > Hi everyone. > > > What is the state of this discussion and its attached ticket ? > > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to

Re: Keep https://code.djangoproject.com/ login

2020-01-24 Thread Adam Johnson
of dependencies but not > getting how to solve this > > please respond , I'm not able to sort out this problem ... > > Thank You … > > > On 24-Jan-2020, at 2:09 PM, Adam Johnson wrote: > > Please file this as an issue at > https://github.com/django/djangoproject.com

Re: Error with running test suite while contributing to django

2020-01-24 Thread Adam Johnson
Please don’t repost on the mailing list, I responded on the other thread On Fri, 24 Jan 2020 at 11:41, Muhammed abdul Quadir owais < quadirowais2...@gmail.com> wrote: > Hi , > > I want help over here ,.. > I'm a newbie for django contributions so I got stuck over here... > After cloning the djang

Re: extension for arangodb

2020-01-29 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer yo

Re: extension for arangodb

2020-01-29 Thread Adam Johnson
It would be normal to write this as a third party package first, and only when it shows wide community interest would it be considered for inclusion in the django project itself, via a DEP: https://github.com/django/deps On Wed, 29 Jan 2020 at 18:35, hh am wrote: > i dont want to write a project

Re: "s" duplicados

2020-02-01 Thread Adam Johnson
Hi This mailing list is in English and is not the correct forum for bug reports. Also there is no bug - you probably have a model called "Clientes" that is being "pluralized" by Django, adding "s". Set verbose_name_plural to control this: https://docs.djangoproject.com/en/3.0/ref/models/options/#

Re: Autoincrement primary key in mysql not working in case of django.when i insert data how to i to solve it..

2020-02-02 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer yo

Re: About contributing to django...

2020-02-03 Thread Adam Johnson
Hi Xero, There have been a few email threads about this previously, with links to the relevant locations: https://groups.google.com/d/msgid/django-developers/af075d59-ece3-4044-9204-b690c746b9e0%40googlegroups.com https://groups.google.com/d/msgid/django-developers/3d87d5a8-ab76-45a7-ab28-b8a650

Re: Where to post to ask questions about solving a Django ticket

2020-02-03 Thread Adam Johnson
Post here On Mon, 3 Feb 2020 at 16:58, Ahmad A. Hussein wrote: > I'm currently stuck on solving a Django ticket I assigned to myself, and I > don't know where to post to ask for help/feedback. > Should I post here or ask someone on the #django IRC channel or should I > make a post on the django

Re: recurring slot booking/reservation code

2020-02-03 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer yo

Re: Enhancement to assertQuerysetEqual

2020-02-04 Thread Adam Johnson
Seems reasonable to me. I would certainly read `assertQuerysetEqual(qs1, qs2)` as checking they contain the same items. On Tue, 4 Feb 2020 at 16:34, Peter Inglesby wrote: > Hi folks, > > I always find the behaviour of assertQuerysetEqual surprising, > particularly when I pass it two querysets th

Re: Beginner-friendly issue to start contributing to codebase

2020-02-06 Thread Adam Johnson
Hi Vibhu Thank you for your documentation improvements. There are certainly many more bigger improvements that can be made. For similar small typo fixes in the future, you can just directly submit a PR rather than do all the paperwork of adding an issue. Yes, "easy pickings" tickets get resolved

Re: CrossDB JSONField — Testing needed.

2020-02-06 Thread Adam Johnson
Thanks for your testing! It's being passed through json.dumps to check it would be possible to store it as JSON. Seems legitimate to me. The other libraries default to an encoder that allows storage of Decimals, whilst the new field doesn't. Since Decimals don't round-trip in JSON (they're encode

Re: Adding support for SQL Server

2020-02-12 Thread Adam Johnson
Microsoft posted in 2015 and there was an update last April about a working backend that claims support for 3.0: https://groups.google.com/d/msg/django-developers/FbBcUCzrSZo/EoFNbR2BDgAJ Any support in core would need clear evidence of widespread demand. I don't think there's much demand - e.g. t

Re: Relax system check on fields intermediary tables for db_table collision when database routers are installed

2020-02-13 Thread Adam Johnson
Please create a new ticket with a reference to the old one, and then a PR against that, since your change is for a different check. On Thu, 13 Feb 2020 at 12:15, Anonymous Rabbit wrote: > Hello there, > > This regards multi-database Django. > > On https://github.com/django/django/pull/11630, a c

Re: Improve migration conflict detection

2020-02-13 Thread Adam Johnson
I don’t think many people can answer this off the top of their heads. I certainly can’t and I have contributed a couple things to migrations. It’s probably quite necessary there’s only one leaf node but I can’t say for sure. On Thu, 13 Feb 2020 at 13:58, caio wrote: > Cool. If I'm understanding

Re: [Feature Request] Option to implicitly create tables within a database schema based on their model's app

2020-02-16 Thread Adam Johnson
Schema support is this 12 year old ticket: https://code.djangoproject.com/ticket/6148 On Sun, 16 Feb 2020 at 20:02, Matt del Valle wrote: > EDIT: > > Actually, after some further digging it turns out it's worse than I > thought. Unless I'm missing something it looks like there currently isn't >

Re: Rename salt to mask in CSRF

2020-02-19 Thread Adam Johnson
The wikipedia page says: In cryptography, a salt is random data that is used as an additional input > to a one-way function that hashes data, a password or passphrase. Salts are > used to safeguard passwords in storage. Ram is right - this variable is not a salt in that definition. We aren't usi

Re: Consider renaming `mark_safe` to `dangerously_trust_html` (etc)

2020-02-19 Thread Adam Johnson
I made a ticket for this: https://code.djangoproject.com/ticket/31287 On Fri, 23 Feb 2018 at 08:53, Kamil wrote: > The name "mark_safe" unnecessarily exposes an implementation detail. > People who misunderstand this API probably have no idea how this "marking" > happens, it would make sense to n

Re: Consider renaming `mark_safe` to `dangerously_trust_html` (etc)

2020-02-19 Thread Adam Johnson
That's a battery we could include. > But we can't really do that, because html5lib is unmaintained, and there's > no alternative. > Whatever effort there is to be spent on this, I'd rather see it spent > there. > > > Kind Regards, > > Carlton > >

Re: Rename salt to mask in CSRF

2020-02-19 Thread Adam Johnson
I guess it's not a very big change so could be worth it to increase readability. On Wed, 19 Feb 2020 at 16:12, Ram Rachum wrote: > In any case, if it's decided that it's a worthwhile change, I'll be happy > to make the patch. > > On Wed, Feb 19, 2020 at 10:31

Re: Property-based "fuzzy" testing (Hypothesis) in Django

2020-02-21 Thread Adam Johnson
Hi Elena, I like fuzz testing and how Hypothesis does it. I have used it on a couple of projects and it always found bugs. In fact it was my first Pycon that I sat with David and sprinted on adding it to a project :) That said I've always found it quite a leap from straightforward tests, being sl

Re: help For GSoC Proposal (Improve Admin Filters)

2020-02-24 Thread Adam Johnson
Hi both, Have you seen: * The wiki page: https://code.djangoproject.com/wiki/SummerOfCode2020 * Recent responses on the mailing list on GSoc (search it) e.g. https://groups.google.com/d/msg/django-core-mentorship/_GO8rLu881k/V6mYQKmMCAAJ Keshav: you made a great first PR. Searching for other iss

Re: Add a "humanized" widget for DurationField in admin interface

2020-02-25 Thread Adam Johnson
Hi Artem I've used such a widget on a project. There's a third party package that implements such a custom widget: https://github.com/devangpadhiyar/django-durationwidget . However on the project we found it's a bit immature and forked it internally (with some customizations). I think I'd like to

Re: Deprecating logout via GET

2020-02-27 Thread Adam Johnson
> The reason this was not changed yet is backwards compatibility. Do you have any mailing list / ticket links as reference? It should be noted that the popular allauth already doesn’t allow logout by GET (by default). Personally I’m in favour. On Thu, 27 Feb 2020 at 17:10, René Fleschenberg

Re: Deprecating logout via GET

2020-02-28 Thread Adam Johnson
> On 2/28/20 12:12 AM, Adam Johnson wrote: > > > The reason this was not changed yet is backwards compatibility. > > > > Do you have any mailing list / ticket links as reference? > > Sorry, I forgot to link them here. The main ticket seems to be > https://code.djan

Re: Deprecating logout via GET

2020-02-29 Thread Adam Johnson
Google (=Gmail): GET, but with a security token in the URL Facebook: POST Instagram: POST Twitter: POST ‪On Sat, 29 Feb 2020 at 08:08, ‫אורי‬‎ wrote:‬ > I'm interested: Google, Gmail, Facebook, Instagram, Twitter: How do they > use logout? POST or GET? > אורי > u...@speedy.net > > > On Thu, Feb

Re: Deprecating logout via GET

2020-03-01 Thread Adam Johnson
-- I personally would prefer it if we would not need javascript for a >> fundamental functionality like this. >> >> On Saturday, February 29, 2020 at 9:26:23 AM UTC+1, Adam Johnson wrote: >>> >>> Google (=Gmail): GET, but with a security token in the URL >&

Re: making registration app compatible with older versions of django

2020-03-03 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer yo

Re: AttributeError: 'ImageField' object has no attribute '_check_image_library_installed'

2020-03-03 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer yo

Re: Deprecating logout via GET

2020-03-04 Thread Adam Johnson
If your suggestion is limited to the admin, I think it would be fine, but it's not necessary. But I don't think there is a compelling reason - there aren't any difficulties with the CSS since Rene has already written it. If your suggestion is for all logout views, there's no way to enforce it, and

Re: Review needed: Proposed behavior change in Field.contribute_to_class()

2020-03-04 Thread Adam Johnson
+1 from me Afraid I don't know any of the why. Also worth noting from the PR description: Previously: DeferredAttributes would not get stapled onto models where the > model (or an ancestor) already had an existing *non-falsey* attribute. > Non-falsey! I almost spat out my tea. Thanks for the d

Re: LiveServerTestCase - self.client.force_login() when called more than once returns django.db.utils.DatabaseError

2020-03-04 Thread Adam Johnson
Hi! I'm pasting my "wrong mailing list" standard text below. This is a support query for an old version of Django. The ticket you linked to was committed in https://github.com/django/django/commit/eedc88bd4a8468c2a0daa8346c9b57183dd77782 which I can see was released in Django 2.0. You should rea

Re: LiveServerTestCase - self.client.force_login() when called more than once returns django.db.utils.DatabaseError

2020-03-04 Thread Adam Johnson
l we (my organization) are stuck on this version. > > *For anyone else, if you have a helpful response - request you to respond > to it in the django-users mailing list - link to this post: * > https://groups.google.com/forum/#!topic/django-users/GbU7FekodGY > > Thank you > > On

Re: #31319 URL dispatcher does not handle multislashes

2020-03-04 Thread Adam Johnson
I'd be against this Merging multiple slashes is a way of duplicating canonical URL's for things, something Django actively tries to avoid with APPEND_SLASHES. If you want this functionality you should be able to create it yourself with a custom URL converter or URLPattern subclass. On Wed, 4 Mar

Re: #31319 URL dispatcher does not handle multislashes

2020-03-04 Thread Adam Johnson
D_SLASH only adds a slash at the end of the path > I'm more concerned about having multiple slashes in the middle of the path > I get your point about canonical URLs - I'm just confused why other major > HTTP servers are handling this different > > On Wednesday, 4 March

Re: IRC Chat

2020-03-10 Thread Adam Johnson
Hi José irc.freenode.net is up but is not accessible with a web browser, only with an IRC client. You can use webchat.freenode.net to connect. Since it can be a bit confusing I've opened a Django documentation ticket to update our links to go via the freenode "how to connect" article that mentio

Re: Proposal for better managed raw SQL migrations

2020-03-11 Thread Adam Johnson
Hi Petr I too often end up managing some database objects like triggers, normally in order to support database migrations. I have always been happy using RawSQL migration operations though. What types of database objects are you mostly using? And how? I think django-migrate-sql is a neat idea, b

Re: [Probably BUG] set_password and check_password accept values other than string as parameters

2020-03-11 Thread Adam Johnson
Hi Dawid, Welcome to the django-developers mailing list! This is pretty normal Pythonic behaviour. Inside these methods, Django casts the given object to a string with str() (specifically, in force_bytes). Most objects can be cast to a string, although I agree many of them won't necessarily make

Re: [Probably BUG] set_password and check_password accept values other than string as parameters

2020-03-12 Thread Adam Johnson
User provided passwords are validated already: https://docs.djangoproject.com/en/3.0/topics/auth/passwords/#module-django.contrib.auth.password_validation When using set_password directly, you as the programmer are responsible for ensuring the value you use for password is valid. Normally this mea

Re: New Merger nomination.

2020-03-13 Thread Adam Johnson
Big +1 from me, Claudes contributions are solid. On Fri, 13 Mar 2020 at 19:33, charettes wrote: > I second this nomination. > > Le vendredi 13 mars 2020 15:30:19 UTC-4, Mariusz Felisiak a écrit : >> >> I nominate Claude Paroz to a new MERGER for 8 years of contributions to >> Django, including t

Re: [Feature Request] Having an middleware to be able to force authentication on views by default

2020-03-15 Thread Adam Johnson
Hi Mehmet, I like your move to fail-closed here. I've certainly seen missing auth decorators as a recurring issue in my career, and I do think as an OWASP top ten we should try tackle it better in the framework. Your implementation is very few lines of code. It could be made more robust, using th

Re: [Probably BUG] set_password and check_password accept values other than string as parameters

2020-03-15 Thread Adam Johnson
Dawid, thank you for checking these other implementations. I agree it's somewhat surprising and clearly something the developers of the other password libraries decided to guard against. One question I have is - did you experience any real world issue with this? Reading back over the thread, you h

Re: Proposal to deprecate NullBooleanField (and remove in Django 4.0)

2020-03-17 Thread Adam Johnson
+1 from me. On Tue, 17 Mar 2020 at 07:59, Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote: > Hello, > > I'm inclined to Accept as well. > > -- > Aymeric. > > > > On 17 Mar 2020, at 08:49, Carlton Gibson wrote: > > Hi all. > > > https://code.djangoproject.com/ticket/31369 > Proposes

Re: Django dynamic form creation

2020-03-19 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer yo

Re: [Feature Request] Having an middleware to be able to force authentication on views by default

2020-03-20 Thread Adam Johnson
I personally am in favour of including this in Django at this point. It seems like a desirable feature, it has circulated the community since 2008 (!), and there are at least two community packages implementing the pattern. No one on this thread is explicitly against it ever happening. I'm in fav

Re: TestCase.setUpTestData in-memory data isolation.

2020-03-22 Thread Adam Johnson
+1 from me - I was thinking of this the other day. On Sun, 22 Mar 2020 at 22:38, charettes wrote: > For anyone interested I finally submitted a ticket[0] to add this feature > to core since the third-party app[1] > was proven to be quite functional in all the projects I've used it so far > and n

Re: Discuss ticket 20264: URLValidator should allow underscores in local hostname

2020-03-24 Thread Adam Johnson
Hi Pavel The ticket ( https://code.djangoproject.com/ticket/20264 ) doesn't mention any specific use cases, and nor have you. What has this behaviour blocked for you? Thanks, Adam On Tue, 24 Mar 2020 at 12:46, Pavel Savchenko wrote: > Hi Folks, > > I've just encountered this issue, and it see

Re: Discuss ticket 20264: URLValidator should allow underscores in local hostname

2020-03-25 Thread Adam Johnson
a URL to store > and render it as a link, would be more common and thus more frequently > needing to override the class. > > I can also propose a solution that would still work for both: (deprecate > and) rename the current class to StrictURLValidator (or > URLValidatorRFC1034),

Re: AUTH_USER_MODEL refers to model 'restro_app.CustomUser' that has not been installed

2020-03-26 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely to answer yo

Re: GSoC Mentors

2020-03-26 Thread Adam Johnson
Happy to help mentor in both realms! 🤗 On Thu, 26 Mar 2020 at 15:59, Carlton Gibson wrote: > Hi David. Thanks. > > That makes a few folks that have put their hands up so 👍 > > On Thu, 26 Mar 2020 at 13:47, David Smith wrote: > >> Hi Carlton, >> >> I'm happy to help out with 1), if you think I w

Re: GSOC Student

2020-03-29 Thread Adam Johnson
Hi Edidiong The page Asif refers to is this one: https://code.djangoproject.com/wiki/SummerOfCode2020 I'm not sure if you've contributed much to Django or the ecosystem (including GraphQL libraries) before. If you don't have much of a track record of contributions, your application is less likely

Re: GSoC Proposal to extend the parallel test runner to Windows and macOS and to support Oracle parallel test running

2020-03-29 Thread Adam Johnson
> > Currently what I'm figuring out is getting a SQL dump to change SQLite's > cloning method and implementing an Oracle cloning method. I'm searching > through Django's documentation and internal code to see if there is a > ready-made SQL dump method for SQLite and if not I'll search for it in a >

Re: Suggestions for Django restframework project

2020-03-29 Thread Adam Johnson
Hi! I think you've found the wrong mailing list for this post. This mailing list is for discussing the development of Django itself, not for support using Django. This means the discussions of bugs and features in Django itself, rather than in your code using it. People on this list are unlikely t

Re: GSoC Proposal to extend the parallel test runner to Windows and macOS and to support Oracle parallel test running

2020-03-30 Thread Adam Johnson
sses don't share an >>> environment with parent processes. >>> >>> There are two possible workarounds: >>> 1. To copy our in-memory database >>> into an on disk database using VACUUM INTO and subsequently restor

Re: End of extended support for Django 1.11

2020-03-31 Thread Adam Johnson
I agree with James, the cutoff date has been more than reasonable. Also, if there aren't any show-stopping bugs you know about, asking for the extension of the EOL "by a few weeks" doesn't really mean much. If we were past the cutoff date, and a high impact, wide reaching bug was found - yes, mayb

  1   2   3   4   5   6   7   8   9   10   >