Re: getting errors from my Django app

2020-03-31 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: Migrations for dropping columns/tables must not have CASCADE keyword

2020-03-31 Thread Adam Johnson
Hi Marcin, I'm sorry to hear that your views got dropped. I hope they were easy to recreate. I imagine the reason the migrations framework uses CASCADE is because we assume Django manages all your database. I know without CASCADE, PostgreSQL (at least) can also be hard to fight against with permi

Re: models.E026: The model cannot have more than one field with primary_key=True.

2020-04-01 Thread Adam Johnson
Hi Marcin Multiple column primary keys is a long-open feature request. There's a wiki page: https://code.djangoproject.com/wiki/MultipleColumnPrimaryKeys and the ticket, still open, is #373: https://code.djangoproject.com/ticket/373 . I'm not sure your suggestion of removing the ".pk" mapping wil

Re: Proposal: Add simply way to use upper index in Meta.models.indexes

2020-04-03 Thread Adam Johnson
Hannes, thank you for working on this PR! I hope we can get it into Django 3.1. Pavel, I think the SQL in the documentation is for illustration purposes only. It seems ILIKE is not used on PostgreSQL only, as it does the UPPER / ::text conversion in its backend: https://github.com/django/django/bl

Re: Adding ability to choose AutoField type (signed vs unsigned)

2020-04-06 Thread Adam Johnson
I'm in favour of the move. The setting strategy seems appropriate. Simon's comment on the PR that this affects a small % of projects is true. But if your project does reach that scale, you're probably one of the bigger Django organizations in the world - hopefully key advocates for the framework.

Re: Adding ability to choose AutoField type (signed vs unsigned)

2020-04-06 Thread Adam Johnson
only difference is IntegerField vs > PositiveIntegerField and in this case skip generating the migration (for > migrating the field to an unsigned one). There could also be a flag to the > management command specifying to force generating said migrations. > > Of course, ignore if this is gi

Re: Problema validacion pbkdf2_sha256 hash

2020-04-06 Thread Adam Johnson
¡Hola! (Traducido con Google Translate, inglés al final) Creo que has encontrado la lista de correo incorrecta para esta publicación. Esta lista de correo es para discutir el desarrollo de Django en sí, no para el soporte con Django. Esto significa la discusión de errores y características en Djan

Re: Does "Someday/Maybe" triage stage imply a low change of pull request getting merged?

2020-04-08 Thread Adam Johnson
Yes, please unassign yourself and find another ticket. There are similar experimental headers that we won't include until they're accepted specs, such as feature-policy. I'm maintaining this in a third party package until it's "ready": https://github.com/adamchainz/django-feature-policy On Wed, 8

Re: Proposal: Allow stopwords in slugs generated by ModelAdmin.prepopulated_fields

2020-04-09 Thread Adam Johnson
I for one am quite surprised to learn the admin has this behaviour. I'm extra surprised it assumes it's in English if only ASCII letters are used. This is quite a naïve assumption 😂 (See what I did in that sentence?) Was removal of these words introduced for SEO reasons? > Seems likely. Persona

Re: Error while creating an API

2020-04-09 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: Adding ability to choose AutoField type (signed vs unsigned)

2020-04-10 Thread Adam Johnson
Ah yes third party apps would be tricky. An AppConfig setting would make sense, although I don't believe there's any precedent. It could also be done by making DEFAULT_AUTOFIELD take a dictionary mapping app labels to field names. On Fri, 10 Apr 2020 at 08:29, Nick Pope wrote: > Ah. I hadn't th

Re: Proposal to not implicitly create varchar/text-pattern opclass indexes on PostgreSQL

2020-04-14 Thread Adam Johnson
For some numbers: I just checked on a long-running client project using PostgreSQL, and it looks like several of the *_like indexes are in use: core=> select right(indexrelname, 10), idx_tup_read, idx_tup_fetch from pg_stat_all_indexes where indexrelname like '%_like' order by 1; right| id

Re: Proposal to not implicitly create varchar/text-pattern opclass indexes on PostgreSQL

2020-04-14 Thread Adam Johnson
n Tue, 14 Apr 2020 at 14:17, charettes wrote: > Makes we wonder under which circumstances an OAuth token would need to be > looked up using LIKE. I would expect the unique b-tree index which covers > exact lookups to be sufficient. > > Simon > > Le mardi 14 avril 2020 09:01:48 U

Re: Swappable sessions

2020-04-14 Thread Adam Johnson
Hi Lorenzo Using a different Session model is already supported - see the docs: https://docs.djangoproject.com/en/3.0/topics/http/sessions/#extending-database-backed-session-engines . Or is there something beyond that which you wanted? Thanks, Adam P.S. Please don't start your message addressed

Re: Hashing Session Keys in backends

2020-04-14 Thread Adam Johnson
Hi Mark Thanks for looking into this tricky security issue. I'm suggesting to use the names frontend_key and backend_key for these two > concepts. > They seem reasonable to me, as long as there's an explanatory comment. Perhaps it even needs documenting for third party backends. My second sugge

Re: New Merger nomination.

2020-04-16 Thread Adam Johnson
This has fallen by the wayside, let's try restarting. As Carlton points out, Claude hasn't been merging in code without others reviewing it. But as I understand it is useful to keep translations moving that he can merge in his or others' (accepted) PR's. It gets us to the minimum of three mergers,

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

2020-04-16 Thread Adam Johnson
> > Folks wanting this can subclass URLValidator. > For anyone who does want this, the subclass is not so much work. You can inherit the regex pieces from URLValidator and edit them to insert _ as a valid character: In [18]: import re ...: ...: from django.core.validators import URLValida

Re: Technical Board statement on type hints for Django

2020-04-17 Thread Adam Johnson
So we in the technical board were a bit opaque and had our discussion in private before Carlton posted our summary. Apologies for this. We'll repeat the discussion in the open so you can see our reasoning. On 4 March Carlton prompted for our input. I replied: My experience using types, so far: >

Remove automatic date-naming of migrations (00XX_auto_YYYMMDD)

2020-04-22 Thread Adam Johnson
Hi djangonauts, In a blog post earlier this year I outlined my technique to prevent Django creating migration files with automatic date names. I had a lot of response with other techniques and ended up adding two more techniques to the post. It's at https://adamj.eu/tech/2020/02/24/how-to-disallow

Re: Generate JWTs with Django

2020-04-22 Thread Adam Johnson
Hi Claude JWT's are indeed popular for API's. I think if Django was being created "from the ground up" today, JWT's would be a no-brainer to include, so it seems reasonable to add some support. I've had a look at the PR, and yes it is indeed a small amount of code - and thanks for the documentati

Re: While executing a Celery Task , Error Occured: 'AsyncResult' object is not iterable

2020-04-22 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: Providing inline "force_login" if "user" keyword argument provided to TestClient. calls (or TestClient.generic)

2020-04-22 Thread Adam Johnson
Hi Pavel I think this is a reasonable suggestion to allow tests to be written quickly. It should be noted django-webtest supports this argument already. I'm not sure it's as simple as a force_login before the request though. Take these tests: s

Re: Deadlock bug in logging? Reproducible case

2020-04-23 Thread Adam Johnson
Brian - You didn't describe the exact symptoms you're seeing. "Deadlock" has a particular technical meaning around multiple processes requesting locks mutually off each other, and normally ends in one process being terminated. But I presume you're experiencing more of a "standstill" and future requ

Re: Deadlock bug in logging? Reproducible case

2020-04-23 Thread Adam Johnson
What version of Python René? On Thu, 23 Apr 2020 at 10:58, René Fleschenberg wrote: > Hi, > > On 4/23/20 9:40 AM, Adam Johnson wrote: > > Brian - You didn't describe the exact symptoms you're seeing. "Deadlock" > > has a particular technical mea

Re: Deadlock bug in logging? Reproducible case

2020-04-23 Thread Adam Johnson
I ran it on Python 3.7.6 and Python 3.8.2 and found the deadlock issue on both. I then adjusted the settings to *only* have the console logger, and added these lines at the end of the settings file: import faulthandler faulthandler.enable() print(os.getpid()) faulthandler allows getting a stackt

Re: Deadlock bug in logging? Reproducible case

2020-04-23 Thread Adam Johnson
w someone once told me env > vars should be passed in via the Apache config. Is there a better way to do > that? Like I want to define an env var in the Apache block, > but I want it to then be available to the app via os.environ. Is there a > best-practices way to make that happen? >

Re: Deadlock bug in logging? Reproducible case

2020-04-23 Thread Adam Johnson
Actually that might not work entirely, since your settings file will be imported before the environment variables are copied over. Instead you can lazily construct the django application on the first request: django_application = None def application(environ, start_response): global django_a

Re: Remove automatic date-naming of migrations (00XX_auto_YYYMMDD)

2020-04-23 Thread Adam Johnson
name. > > That said, the number is the only part that actually matters, and while > the date is sometimes useful for people to resolve merge conflicts, I don't > think it's better than more informative autogenerated names, so I'm happy > to go with the change. > > (

Re: Proposal: FileSystemFinder and AppDirectoriesFinder shall serve unminimized assets in DEBUG mode

2020-04-23 Thread Adam Johnson
Maybe we can move to always serving minimized assets with corresponding source maps? I was under the impression this is the "best practice" these days. On Thu, 23 Apr 2020 at 10:09, Jacob Rief wrote: > When specifying paths to assets like JavaScript files, but also CSS, the > Django documentatio

Re: Proposal: Allow stopwords in slugs generated by ModelAdmin.prepopulated_fields

2020-04-24 Thread Adam Johnson
ify = newURlify; })(); On Thu, 23 Apr 2020 at 21:21, Andy Chosak wrote: > Thanks, Adam, for your reply. I've opened a ticket at > https://code.djangoproject.com/ticket/31511, which includes a link to a > PR that makes this change. > > Any advice on documenting how to wrap win

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

2020-04-24 Thread Adam Johnson
I'm -1 on deprecating the form field. The different widgets make sense. Forms are decoupled from models for reasons like this. On Fri, 24 Apr 2020 at 11:39, Mariusz Felisiak wrote: > `models.NullBooleanField` is now deprecated [1]. > > I would like to ask again about opinions on deprecating `for

Re: Remove automatic date-naming of migrations (00XX_auto_YYYMMDD)

2020-04-24 Thread Adam Johnson
" we could have > "0026_book_add_remove" - especially when multiple fields were involved. > > Alternatively, makemigrations could also generate multiple migrations (by > default?) in order to obtain the goal of meaningful names? Have a parameter > to force combining?

Re: Remove automatic date-naming of migrations (00XX_auto_YYYMMDD)

2020-04-25 Thread Adam Johnson
m callable seems more appropriate then too much hand-holding. > > > +1 for “auto_” prefix by default. > > My filename char limit would be 255 :) > > > ‪On Sat, Apr 25, 2020 at 12:08 PM ‫אורי‬‎ wrote:‬ > >> >> On Wed, Apr 22, 2020 at 4:06 PM Adam Johnson wro

Re: Django for beginners

2020-04-25 Thread Adam Johnson
Larbi, that is the roadmap for Django CMS, a separate project that is an extension to Django. Elisabetta, yes this is more of a support question. If you’re looking for learning materials, check out the awesome Django list: as a start: https://github.com/wsvincent/awesome-django On Sat, 25 Apr 202

Re: Remove automatic date-naming of migrations (00XX_auto_YYYMMDD)

2020-04-26 Thread Adam Johnson
ns to know how many have been (possibly) generates > by Django. > > This would make the common case more convenient and simpler, which is good. > > Tom > > On 25 Apr 2020, at 17:45, אורי wrote: > >  > > > On Sat, Apr 25, 2020 at 5:48 PM Adam Johnson wrote: >

Re: Generate JWTs with Django

2020-04-26 Thread Adam Johnson
James, I too would like to know your criticisms! I've always understood that they aren't much different to signed cookies, but I haven't looked too deeply at them. On Sun, 26 Apr 2020 at 16:00, Ryan Hiebert wrote: > > > On Sun, Apr 26, 2020 at 8:29 AM James Bennett > wrote: > >> JWTs are an abs

Re: Google Groups contingency plan

2020-04-26 Thread Adam Johnson
> > I think python.org and Django are managed by different (legal) entities > so it doesn't make sense for Django mailing lists to use the domain name > python.org I think it's fine to share with them, if possible. As Tom, says other projects like scikit do. Tom - you didn't mention backing u

Re: Generate JWTs with Django

2020-04-27 Thread Adam Johnson
dread when I saw a JWT Thread appear > as, for me synonymous with flaws security and I'd rather Django stay well > clear of them > > On Monday, 27 April 2020 03:53:39 UTC+1, James Bennett wrote: >> >> On Sun, Apr 26, 2020 at 8:46 AM Adam Johnson wrote: >> > &g

Re: [FEATURE] Allow squashmigrations to squash the whole project

2020-04-28 Thread Adam Johnson
One concern here is to avoid squashing third party apps' migrations. Django doesn't currently distinguish between third party and project apps. It might be possible to use the heuristic "is site-packages in the apps' module's absolute path?" But this is not 100% accurate since third party packages

Re: [FEATURE] Allow squashmigrations to squash the whole project

2020-04-28 Thread Adam Johnson
That's good, but unfortunately BASE_DIR is only a "pseudo setting." It's something in the startproject template that's useful for building file paths but nothing inside Django actually relies on it or checks that it's set. Perhaps we should consider "promoting" it to a real setting though, to make

Re: [FEATURE] Allow squashmigrations to squash the whole project

2020-04-28 Thread Adam Johnson
ions should be squashed? That way we > don't need to rely on paths at all, but can log up all migrations in > question, based on the provided app labels. > > Cheers, > > Markus > > On Tue, Apr 28, 2020, at 2:47 PM, Adam Johnson wrote: > > That's good, but unfor

Re: Ticket #25236: Remove ifequal from the template language

2020-05-04 Thread Adam Johnson
+1 for removal. 5 years have nearly passed since that discussion with the docs saying "The ifequal and ifnotequal tags will be deprecated in a future release." so I think it's worth actioning. (I could even put a recommended command in the release notes). > I like this idea. It would also be wort

Re: I get a 404 error with “id-” in slug, I don't know if it's a bug or I'm doing something wrong.

2020-05-05 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: Removing url() ?

2020-05-05 Thread Adam Johnson
+1 for deprecating as per usual, as per all the reasons here. I'll also reply to Karen's comment: I'd be much happier with fewer tedious upgrade tasks and the ability to use > client's money for new features rather than "keeping up", sigh. > Since becoming a consultant just over a year ago, I've

Rename request.GET and POST, and lowercase COOKIES, FILES, and META

2020-05-05 Thread Adam Johnson
request.GET and request.POST are misleadingly named: - GET contains the URL parameters and is therefore available whatever the request method. This often confuses beginners and “returners” alike. - POST contains form data on POST requests, but not other kinds of data from POST requests

Re: GSoC 2020

2020-05-05 Thread Adam Johnson
Thank you both for writing proposals and contributing to the community! On Mon, 4 May 2020 at 19:14, Abhijeet Viswa wrote: > Hi guys, > > I'd like to say the same. It was a wonderful opportunity. Thanks everyone. > > Regards. > > On Mon, 4 May 2020 at 23:41, Sanskar Jaiswal > wrote: > >> Hey ev

Re: Rename request.GET and POST, and lowercase COOKIES, FILES, and META

2020-05-06 Thread Adam Johnson
> > I always took the capitalisation of GET &co to come from HTTP > — I'd say that's where PHP > took it from too but 🤷‍♀️ > Yes GET and POST are capitalized in HTTP, but then COOKIES is not (Set-Cookie / Cookies headers), and FILES and META aren't dir

Re: Rename request.GET and POST, and lowercase COOKIES, FILES, and META

2020-05-06 Thread Adam Johnson
since uppercase is usually reserved for >> constants in Python. The names of the requests ("GET" / "POST") can be used >> in strings to check the request method (uppercase). But there is no sense >> in using uppercase names for variables. >> אורי >>

Re: Selected projects for Google Summer of Code 2020

2020-05-06 Thread Adam Johnson
per Szmigiel, an undergraduate student at Technical University of >>> Lodz in Poland, will work on a refactor of the mypy plugin plugin that is >>> part of [django-stubs][0]. His primary mentors are Nikita Sobolev, and >>> Artem Malyshev, maintainers of django-stubs. >>>

Re: Removing url() ?

2020-05-09 Thread Adam Johnson
Automated upgrade tooling would be great. Developers end up building their own anyway. One more tool we could copy is pyupgrade ( https://pypi.org/project/pyupgrade/ ). It's based upon an extension to 'tokenize' by the author (Anthony Sottile) that allows roundtripping (which I guess would be usef

Re: Django Version 3.2 Roadmap

2020-05-13 Thread Adam Johnson
Hi Carlton This looks good to me, it fits the preset release cadence. Although the final release will be on "April fools day," it's something we've done several times before. I edited the wiki page slightly to rename "committer" to "merger" in accordance with DEP 10. Thanks, Adam On Wed, 13 Ma

Re: Django Version 3.2 Roadmap

2020-05-14 Thread Adam Johnson
. > > (I obviously live a sheltered life: April fools never occurred to me... 😳) > > On Thu, 14 May 2020 at 00:02, Florian Apolloner > wrote: > >> On Wednesday, May 13, 2020 at 4:40:55 PM UTC+2, Adam Johnson wrote: >>> >>> This looks good to me, it fits th

Re: Proposal: django project name

2020-05-14 Thread Adam Johnson
Hi Christian > TL;DR: Django has no (builtin/explicit) settings variable like > PROJECT_NAME. Should have. > I can see how it would be useful in several situations. But in most long-lived projects I've come across, the "project name" is different to the website name (or names, plural, if it has

Re: Signal on management command exception

2020-05-15 Thread Adam Johnson
Yo-Yo Ma, Typically I've edited manage.py to handle this use case: def main(): # ... try: execute_from_command_line(sys.argv) except Exception: # whatever raise This doesn't capture programmatic calls via call_command() . But in my experience that's rarely use

Re: Reverting Django 3.1. to Django 3.0.6 raises "binascii.Error: Incorrect padding".

2020-05-15 Thread Adam Johnson
Hi Uri Smooth upgrade-ability is hard. Smooth downgrade-ability is even harder. It also imposes a tax on development, and can slow the roll out of new features as they can need roll out over multiple versions. I agree both would be nice to have, but given the limited engineering resources for Dj

Re: Proposal: Allow stopwords in slugs generated by ModelAdmin.prepopulated_fields

2020-05-16 Thread Adam Johnson
There's a bit more support now, and there have been no opinions against it. Because of this I've reopened the older closed ticket #11157: https://code.djangoproject.com/ticket/11157 . Andy/Scott, I hope you can retarget your PR as per my comment there. Thanks! Admin users still get a preview of t

Re: Clear all filters

2020-05-18 Thread Adam Johnson
I disagree Mariusz. I would NOT expect this. The "Clear all filters" button is grouped with the filters, visually separate from the search and sort controls. It's a very legitimate use case to clear the filters and maintain the search or sort, and quite a common workflow when trying to find a parti

Re: Clear all filters

2020-05-19 Thread Adam Johnson
Fran, your design looks nice. I think we should make a ticket that combines making the "X total" link preserve the query params and adding your other suggested changes. On Tue, 19 May 2020 at 08:12, Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote: > On 18 May 2020, at 11:10, Mariusz

Re: Should the docs suggest namespace packages?

2020-05-20 Thread Adam Johnson
+1 for always showing standard packages in the docs. We could also add a recommendation against namespace packages inside Django apps, for all the reasons that James lists. I'm not sure the best place for that though. On Wed, 20 May 2020 at 12:03, James Bennett wrote: > The use case for namespa

Re: Should the docs suggest namespace packages?

2020-05-21 Thread Adam Johnson
+1 for reverting ccc25bf . On Wed, 20 May 2020 at 19:54, Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote: > Hello, > > Commit ccc25bf refers to ticket #23919 in the commit message. In that > ticket, I argued that the __init__.py files should be kept: > https://code.djangoproject.com/

Re: Admin accessibility

2020-05-21 Thread Adam Johnson
Hi Tom It's a laudable goal to make the admin accessible. Thank you for doing the research on currently laws and guidelines. I haven't audited the entire admin, but I have run a checker through some > pages. > Which checker did you use? I see Google's Lighthouse checks for many accessibility iss

Re: QuerySet.iterator together with prefetch_related because of chunk_size

2020-05-21 Thread Adam Johnson
lor wrote: >>>> >>>> I agree that 2 makes sense and isn't a huge usability issue. It looks >>>> like the PR is ready to go whenever this is decided >>>> https://github.com/django/django/pull/10707/files >>>> >>>> On Monday, Janu

Re: timesince 'depth' parameter

2020-05-23 Thread Adam Johnson
+1 I belive I’ve copy-paste-modified timesince in a past project to implement “depth=1” On Sat, 23 May 2020 at 10:04, Tobias Kunze wrote: > On 20-05-22 19:02:02, Toby Such wrote: > >Looks like other people seemed to have the same idea as me for a little > >fix, seems to me like it should be par

Re: Additional column in Queryset with condition

2020-05-23 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: Additional arguments for url lookup in sitemap index

2020-05-26 Thread Adam Johnson
> > I'm trying to add sitemaps on a per object base to my project. Can you explain this a little more? I don't follow what sitemap structure you're pursuing that's different to the default, nor why. On Tue, 26 May 2020 at 09:24, Sandro Covo wrote: > Hello, > > I'm trying to add sitemaps on a p

Re: Additional arguments for url lookup in sitemap index

2020-05-26 Thread Adam Johnson
Oh I see. I think your sitemap structure is quite different to what Django's sitemaps index is intended for. I think it's probably better that you create your own index view based copy-pasting the built-in one, rather than adding extra parameters to it. It's not much code, and Django can't be infin

Re: to send data from our site to various sites

2020-05-27 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: Django wizard form issue

2020-05-28 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: Implement QuerySet.__contains__?

2020-06-02 Thread Adam Johnson
> > If you already fetched the queryset, `if obj in queryset` will make a new > database query I don't see why we couldn't implement __contains__ to do a walk through _result_cache if it has been fetched? On Tue, 2 Jun 2020 at 10:13, Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote:

Re: Dynamic SESSION_COOKIE_DOMAIN and CSRF_COOKIE_DOMAIN settings

2020-06-02 Thread Adam Johnson
You can already achieve what you're aiming to do in an outer middleware by mutating the cookie in response.cookies. The cookie object can have its domain changed before it is sent to the client: >>> from django.http import HttpResponse >>> resp = HttpResponse() >>> resp.set_cookie('foo', 'bar', do

Re: Django and Vuejs

2020-06-02 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: What happens if a Fellow has a holiday?

2020-06-04 Thread Adam Johnson
I'm happy to help reviewing like that. The team handle will be useful in future. Enjoy your week off Carlton! ☀️ On Thu, 4 Jun 2020 at 11:47, Carlton Gibson wrote: > Hi all. > > Short answer is we don't really know, since we never take holidays. 🙂 > > I though am having a much needed week off f

Re: Geodjango Exception when importing django.contrib.gis.gdal

2020-06-04 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: Implement QuerySet.__contains__?

2020-06-05 Thread Adam Johnson
I'm with Shai, against changing bool() and len() behaviour. I think the "fetch the whole queryset" behaviour is normally helpful for beginners, who write things like: if qs: for x in qs: ... # really common for anyone new to Python: for i in len(qs): do_something(qs[i]) We have hig

Re: Unsolicited mentorship requests

2020-06-08 Thread Adam Johnson
I get about one random mentorship / free support question a week, but no cluster recently. I normally tell people no with a similar message to Markus'. On Mon, 8 Jun 2020 at 18:23, Markus Holtermann wrote: > Interesting. Because I got a similar messages this morning, one on Twitter > and one on

Re: Add verbosity option to manage.py checks that outputs which checks are ran

2020-06-10 Thread Adam Johnson
I am with Mariusz. Displaying the names of the check functions is a bit against the intention of the checks framework. The check ID's are intended to be enough information to reference the problem. This is different to unit tests, where the function names are intended to carry information. Django

Re: I need a mentor on django

2020-06-10 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: Add verbosity option to manage.py checks that outputs which checks are ran

2020-06-10 Thread Adam Johnson
not being able to > confirm they actually ran somewhat negates the peace of mind that all is > well. > > Thanks, > Gordon > > > > On Wednesday, June 10, 2020 at 11:59:39 AM UTC-4, Adam Johnson wrote: >> >> I am with Mariusz. Displaying the names of the check functions i

Re: Defaulting to use BigAutoField in models

2020-06-11 Thread Adam Johnson
Big +1 on solving this from me. - The setting would take any dotted path to a class, or a single class name > for a build in field. This would potentially solve [3], and could be useful > to people who want to default to other fields like UUIDs (or a custom > BigAutoField) for whatever reason > I

Re: Defaulting to use BigAutoField in models

2020-06-12 Thread Adam Johnson
even though I cannot think of a case where it would have any practical > effect. > > On 11 Jun 2020, at 19:22, Adam Johnson wrote: > > Big +1 on solving this from me. > > - The setting would take any dotted path to a class, or a single class >> name for a build in field

Re: Proposal - Warn user when creating or applying a delete migration?

2020-06-12 Thread Adam Johnson
'makemigrations' is a code generator, not a "do it right all the time" wizard. There are many situations where it doesn't do what the user intended. Users are ultimately responsible for the contents of migration files and should read them before applying them, and also use sqlmigrate to see what th

Re: Proposal - Warn user when creating or applying a delete migration?

2020-06-12 Thread Adam Johnson
/makemigrations.py#L216 > > On 12 Jun 2020, at 12:52, Adam Johnson wrote: > > 'makemigrations' is a code generator, not a "do it right all the time" > wizard. There are many situations where it doesn't do what the user > intended. Users are ultimately respon

Re: Add verbosity option to manage.py checks that outputs which checks are ran

2020-06-12 Thread Adam Johnson
uld you be in favor of a flag for the check command that errors if > checks aren't run from a particular namespace? > > Like `python manage.py check --require-checks foo` which would exit with a > non-zero exit code if zero checks for `foo` are run? > > > > On We

Re: The blacklist / master issue

2020-06-15 Thread Adam Johnson
I was preparing a post on this Tom, it was sitting in my drafts awaiting a little more research, but here we go. My summary: This small language change has been suggested many times in the technology sphere for two reasons. First, the allow/deny terms avoid the potentially offensive assocation of

Re: The blacklist / master issue

2020-06-16 Thread Adam Johnson
On the branch rename, right now I'd rather wait to see what GitHub builds that could help with this. It might allow aliasing master->main so that existing PR's don't need targeting, local clones don't need updating, etc. It also seems Git will make a change and it might be worth waiting to see what

Re: HttpResponse headers interface

2020-06-17 Thread Adam Johnson
I have also found this a little odd when writing tests. It would certainly make it easier to write both normal Django code and tests, and it's a small addition, so +1 from me. On Wed, 17 Jun 2020 at 15:35, Tom Carrick wrote: > I don't find myself using HttpResponse very often, usually I'm using

Re: Defaulting to use BigAutoField in models

2020-06-17 Thread Adam Johnson
be 8 bytes. >> >> This would take care of third party apps with migrations and not require >> a setting but the downside is that model state will be slightly different >> from the database. All models would have `BigAutoField`’s whereas the >> database would only ha

Re: Defaulting to use BigAutoField in models

2020-06-18 Thread Adam Johnson
the field is no longer auto_created. On Thu, 18 Jun 2020 at 13:24, Caio Ariede wrote: > > On 17 Jun 2020, at 16:56, Adam Johnson wrote: > > I think special casing the migrations framework is an avenue to explore, >> so I created this today and to my surprise it seems to work

Re: Defaulting to use BigAutoField in models

2020-06-18 Thread Adam Johnson
ate every AutoField to BigAutoField without the > need to specify them manually. > > > -- > Caio > > > > On 18 Jun 2020, at 09:40, Adam Johnson wrote: > > Would we be able to provide instructions on how to migrate from SIGNED INT >> to UNSIGNED BIG INT? Pe

Re: Mechanics of the EmailValidator.domain_allowlist rename.

2020-06-18 Thread Adam Johnson
I also lean towards #1. I doubt many third party packages use the argument since it seems quite site specific. I scrolled through 5 random-ish pages of github code search for "domain_whitelist" in python files and found nothing that looked like a django related usage. On Thu, 18 Jun 2020 at 16:42

Re: The blacklist / master issue

2020-06-20 Thread Adam Johnson
Alexander, it's not really up for debate any more. We've already merged the PR's to Django. On Sat, 20 Jun 2020 at 13:51, Alexander Lyabah wrote: > let's not change the subject > > we are not talking about black and white, we are talking about whitelist / > blacklist and master / slave. Those st

Re: i encounter this error when i first try http://localhost:8000/ ( module 'json' has no attribute 'JSONDecoder')

2020-06-20 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: Making startproject's settings more 12-factor-y

2020-06-26 Thread Adam Johnson
> > i dont belive in adding default names to environment variables, they're up > to the user to define > Javier, I think you missed what Florian was talking about. He was suggesting there shouldn't be default *values* for some settings. > I personally rather have no solution in Django itself bef

Re: Making startproject's settings more 12-factor-y

2020-06-27 Thread Adam Johnson
> > There is no reason Django should complain a missing secret key when it > does not need one at all. I agree with this. It is an extra step in making really basic apps that don't use any encryption functionality. IIRC, the "Django needs a secret key" check has always been a custom check rather

Re: Django project to run on nodes independently for data entry and sync with server when possible

2020-06-28 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: Feature request: Possibility to declare transactions as read only

2020-07-01 Thread Adam Johnson
Christian, FYI you can do this already for all new connections with something like this in an apps.py: from django.db.backends.signals import connection_created @connection_created.connect def transactions_readonly(*, connection, **kwargs): with connection.cursor() as cursor: cursor.e

Re: Unable to export images from django model to the excel sheet

2020-07-04 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: Facing issue in Django

2020-07-05 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: Welcome email

2020-07-05 Thread Adam Johnson
I can't find a google groups feature that would allow this. Do you know of one? It might otherwise require a custom bot. On Sun, 5 Jul 2020 at 16:14, Arvind Nedumaran wrote: > Oh I understand. I meant we could include the distinction in the welcome > email and possibly a link to the other list.

Re: Welcome email

2020-07-08 Thread Adam Johnson
from the DSF board, the ops team, or the fellows? On Mon, 6 Jul 2020 at 00:02, Ahmad A. Hussein wrote: > +1 on this. Here's the relevant feature > <https://support.google.com/a/users/answer/9308780?hl=en> I found. > > > Ahmad > > On Sun, Jul 5, 2020 at 7:58 PM

<    1   2   3   4   5   6   7   8   9   10   >