Re: Django's issue tracker uses timezone CDT

2021-08-09 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I'd be +1 on moving the default to UTC. Or we could change Trac to pick up the browser's timezone offset and display datetimes accordingly. On Fri, 6 Aug 2021 at 15:28, Tom Carrick wrote: > While moving the default to UTC is probably a good idea - you can change > this for yourself in

Re: Is there any reason to set the default reverse relationship name in the current format?

2021-08-09 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Ruby on Rails uses "correct" plural forms in code. But in order to do this it contains a special library to pluralize words correctly, e.g. octopus -> octopuses. And naturally that strategy requires per-language and per-word knowledge, and can go wrong when trying to use non-english words. Rather

Re: Errors

2021-08-10 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
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

Re: Errors

2021-08-11 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Please take this conversation elsewhere as per my previous post. On Wed, 11 Aug 2021 at 13:33, Umar Farooq wrote: > Sorry code screenshots > > On Wed, 11 Aug 2021, 5:27 PM Rana Zain, wrote: > >> Okay I am sending screenshot.[image: erroits.PNG] >> >> On Tuesday, August 10, 2021 at 6:26:42 PM

Re: Add warning or prohibit module level queries?

2021-09-25 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I noticed I've continued to encounter this problem in code review relatively frequently, so I made a ticket: https://groups.google.com/g/django-developers/c/7JwWatLfP44/ . Tim then pointed me back to this discussion. I'm happy to implement Tim's suggestion of a RuntimeWarning followed by

Re: Why can't range function be added in templates?

2021-10-09 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Please don't use shouty capitals or angry slang like "Bruh no" on this mailing list. This mailing list is for calm professional discussion. On Sat, 9 Oct 2021 at 11:35, Dhruva Shaw wrote: > SINCE THE NO OF SELECT BOXES THAT I HAVE GENERATE COMES DIRECTLY FROM THE > DATABSE, THUS RANGE FUNCTION

Re: Preparing Django code for the Black stable release

2021-10-20 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
The extension I added to the DEP may be a bit involved: > All code Django generates will also be Black-formatted (startproject, > migrations, inspectdb, etc.), at least if the user has Black installed. > But then again it may only need a few calls to black.format_str() in the right places. On

Re: Idea

2021-10-20 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Check out htmx as a way to avoid needing JavaScript in your Django applications: https://htmx.org/ Example app: https://github.com/adamchainz/django-htmx On Sun, 19 Sept 2021 at 00:00, Jet Ezra wrote: > I know this may not be necessary at the moment because we are comfortable > depending on

Re: Proposed change in ORM model save logic

2021-10-20 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I am also in favour. Thanks for explaining Barry. On Mon, 18 Oct 2021 at 11:22, Carlton Gibson wrote: > OK, thanks all, let's reopen. These kind of wontfix+MailingList issues is > more about getting more eyes on it than anything else, and the explanation > you've given is super Barry. > > C. >

Re: Changelist links for proxy model admins

2021-10-20 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Niccolò I suspect no one has replied to your thread because your use case is too niche. Perhaps try showing the issue with more words and more visually with a screenshot or two. To me it sounds like "the admin links to the wrong place for proxy models" which sounds like a plain bug, and if

Re: Why can't range function be added in templates?

2021-10-08 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Django’s general policy is that templates should be kept as simple as possible. It's possible to create range() objects in the view, place them in the context, and then iterate over them in templates. Also, adding range() for a project is a few lines of code with simple_tag:

Re: Violating unique constraint in the admin

2021-10-08 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
See also https://code.djangoproject.com/ticket/30581 which hoists constraint validation to forms in general, not just the admin. On Fri, 8 Oct 2021 at 13:43, Tim Graham wrote: > Hi, there have been some past discussions, e.g. >

Re: DEFAULT_AUTO_FIELD

2021-10-06 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
As Mariusz wrote, it depends upon at least the M2M field migration being fixed first. ‪On Mon, 4 Oct 2021 at 10:36, ‫אורי‬‎ wrote:‬ > Thank you. > > >> In a future Django release the default value of DEFAULT_AUTO_FIELD >>>

Re: Django ORM query syntax enhancement

2021-10-06 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I would not be for merging anything into Django at this time. There are several libraries providing "enhanced" query syntax: django-orm-sugar, django-model-values, and django-natural-query. None of them seems to be particularly popular (<100 github stars, minimal PyPI downloads), and only

Re: Redirect type selection in django.contrib.redirects

2021-10-06 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
This seems like a reasonable addition to me. On Fri, 24 Sept 2021 at 08:08, Niccolò Mineo wrote: > Hi. The marketing guys at my workplace asked for the ability to customise > the redirect type (301, 302) when creating redirects in the admin and I > shipped this change a while ago. I believe

Re: I want to contribute to django to make a version of admin that work with ajax

2021-10-03 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
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

Re: DEFAULT_AUTO_FIELD

2021-10-04 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
The startproject template already uses 64 bit integers, and the default will change in a future version. See the 3.2 release notes ( https://docs.djangoproject.com/en/3.2/releases/3.2/#customizing-type-of-auto-created-primary-keys ) : Starting with 3.2 new projects are generated with

Re: Optimization for get_search_results() in admin

2021-10-24 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I remain +1 to the change I can see how we could claim this is "an implementation detail". But I think we should also be sympathetic to the idea that this change may break many workflows If folks really want the old behavior they can customize and then impose > some limits to prevent excessive

Re: Managing files name

2021-12-06 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
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

Re: Regarding help for web development career

2021-12-27 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome! There are many different ways to contribute to Django - the forum, blogging, translating, documenting, writing code, and more. Our Contributing Guide can help you get started with many of these: https://docs.djangoproject.com/en/stable/internals/contributing/ If you’re looking to work

Re: Current Development of async ORM?

2021-12-31 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
The last movement I know of is that Andrew Godwin made a start on the QuerySet API in https://github.com/django/django/pull/14843 On Fri, 31 Dec 2021 at 06:29, Andrew Wang wrote: > Happy new year y'all! > > I'm wondering if anyone else has a fork that started to chip away at an > async ORM and

Re: Yaml serializer output

2021-12-28 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I've made a PR to update the docs: https://github.com/django/django/pull/15250 On Mon, 27 Dec 2021 at 08:13, Sergey Fursov wrote: > Please, disregard the part about failing tests, I had an old version > locally without this commit applied >

Re: First Contributio Django

2022-01-05 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi, if you have everything set up, try the first patch tutorial: https://docs.djangoproject.com/en/4.0/intro/contributing/ . This guides you through writing a code change and the respective unit tests. It should clarify the page you've been looking at, which is more of a reference. On Wed, 5 Jan

Re: django.db.migrations.exceptions.InconsistentMigrationHistory

2021-12-21 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
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

Re: getting started with contributions

2022-01-04 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome! There are many different ways to contribute to Django - the forum, blogging, translating, documenting, writing code, and more. Our Contributing Guide can help you get started with many of these: https://docs.djangoproject.com/en/stable/internals/contributing/ If you’re looking to work

Re: select_for_update and transactions (bad dev UX in a feature)

2021-11-17 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Klemen We recently changed atomic() to mark when it is created by the test runner for this ticket: https://code.djangoproject.com/ticket/33161 . This was for special case logic around the 'durable' flag to atomic(). Perhaps the newly added tracking can also be used for the check in

Re: Can I help?

2021-11-29 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome! There are many different ways to contribute to Django - the forum, blogging, translating, documenting, writing code, and more. Our Contributing Guide can help you get started with many of these: https://docs.djangoproject.com/en/stable/internals/contributing/ If you’re looking to work

Re: New proposal for `user_passes_test` decorator logic

2021-11-27 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Iago Thanks for writing to the list. The proposal feels like complicating the decorator too much to me. If you simplify the logic for the redirect for your particular use case, you can implement your own decorator in a handful of lines. I think that’s sufficient. Adam On Fri, 19 Nov 2021 at

Re: Question: Regarding Page class

2021-11-22 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi, could you give an example of what you're talking about? As far as I can see, Paginator *never* converts its arguments to a list: In [8]: paginator = Paginator(Game.objects.order_by('id'), 2) In [9]: paginator.get_page(1) Out[9]: In [10]: paginator.get_page(1).object_list Out[10]: , ]>

Re: How to get started with contribution.

2021-10-30 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Mayank The place to get started is the contributing guide: https://docs.djangoproject.com/en/dev/internals/contributing/ . Give this a read, happy to answer any questions. Thanks, Adam On Fri, 29 Oct 2021 at 22:25, Mayank Sharma wrote: > Respected Sir/madam, > I am Mayank Sharma, a

Re: Help

2021-10-30 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
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

Re: Not understanding code base of django

2021-11-02 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Piyush, For starters, I would check out the "first patch" tutorial: https://docs.djangoproject.com/en/dev/intro/contributing/ . This gives you an idea of what contributing to Django looks like, and will have you create and edit some files. Let us know how that goes, Adam On Tue, 2 Nov 2021

Re: Starting my Contributions.

2021-10-31 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Om, There’s a wealth of information on contributing in this guide: https://docs.djangoproject.com/en/dev/internals/contributing/ . Check it out, happy to answer any questions. Thanks, Adam On Sun, 31 Oct 2021 at 11:46, Om Salunke wrote: > Hey, I'm Om currently in my sophomore year at

Re: Starting with open source

2021-10-31 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Piyush, There’s a wealth of information on contributing in this guide: https://docs.djangoproject.com/en/dev/internals/contributing/ . Check it out, happy to answer any questions. Thanks, Adam On Sun, 31 Oct 2021 at 15:48, Piyush Dive wrote: > Hello everyone, My name is Piyush Dive & I'm

Re: How to get started with contribution.

2021-10-31 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Deeksha, There’s a wealth of information on contributing in this guide: https://docs.djangoproject.com/en/dev/internals/contributing/ . Check it out, happy to answer any questions. Thanks, Adam On Sun, 31 Oct 2021 at 06:53, Deeksha Jagtap wrote: > Hello, > I am Deeksha Jagtap, entered my

Re: A new feature idea

2021-10-25 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Ath In my experience the analytics that website operators are interested in varies vastly between projects. There are also many competing popular solutions. I don't think we'd include any analytics package inside Django at this point. But I don't mean to discourage you, it could be a good

Re: How to create a password reset for Custom User Model

2021-10-25 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
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

Re: reStructuredText

2021-12-01 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
It sounds like you aren't rebuilding the documentation after you edit the reStructuredText files. To do so, you need to run 'make html', as per the setup instructions: https://docs.djangoproject.com/en/3.2/internals/contributing/writing-documentation/#getting-started-with-sphinx Note that you

Re: Error AudioField

2021-12-13 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
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

Re: Documentation error

2021-12-16 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi, I don't think anyone doing the Chinese translations reads this mailing list. You could submit the change yourself on Transifex. The instructions for getting started are here: https://docs.djangoproject.com/en/dev/internals/contributing/localizing/ Maybe you'll also find some other ways to

Re: How to Get Started with Contribution

2021-12-14 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome! There are many different ways to contribute to Django - the forum, blogging, translating, documenting, writing code, and more. Our Contributing Guide can help you get started with many of these: https://docs.djangoproject.com/en/stable/internals/contributing/ If you’re looking to work

Re: [TB] Proposal to add Florian Apolloner to Releasers team.

2021-07-21 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
+1 I’m in favour of giving Florian the access and necessary training, should he want it. On Wed, 21 Jul 2021 at 10:18, Carlton Gibson wrote: > Hello Technical Board. > > Mariusz is working on updating the Organisation docs to reflect the DEP 10 > governance changes. > >

Re: developer meeting point for Django discussion forum

2021-07-22 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
It's not appropriate to promote unofficial channels on this mailing list. On Mon, 19 Jul 2021 at 11:19, SKYLINE TV wrote: > Welcome to Django developer meeting hub > > > developer meeting point is a discussion forum where we talk about our > various challenges in python programming and Django

Re: Feature Request: Allow passing no-op filters to QuerySet's bulk_update() when updating tables with partitions

2021-07-22 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
It should already work to do `Model.objects.filter(...).bulk_update(...)` , no? On Tue, 13 Jul 2021 at 00:50, opqpop wrote: > Hi, I'd like to pass additional partition columns into the filters for a > QuerySet's bulk_update(). These would be no-op filters solely for the DB to > understand from

Re: Pychram Problem

2021-07-24 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
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

Re: Django security releases issued: 4.0.1, 3.2.11, and 2.2.26

2022-01-04 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
> > I would argue that the Django team always said that the documentation is > the public API. Everything else works by luck. I agree with Florian, this is Django’s policy. To go against it and restore the undocumented behaviour requires a strong case, perahps that many users were affected or

Re: Contributions

2022-01-13 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome! There are many different ways to contribute to Django - the forum, blogging, translating, documenting, writing code, and more. Our Contributing Guide can help you get started with many of these: https://docs.djangoproject.com/en/stable/internals/contributing/ If you’re looking to work

Re: Contribution request

2022-01-11 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome Utkarsh! If there is an issue/ticket which I can start working on kindly let me know > alongside. > Finding a ticket to work on is both easy and hard. There are plenty open in the tracker, but they also tend to be the harder ones. It can take a lot of work to understand the context of a

Re: Open source contribution

2022-01-08 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome! It's certainly possible to contribute as a beginner. There are many different ways to contribute to Django - the forum, blogging, translating, documenting, writing code, and more. Our Contributing Guide can help you get started with many of these:

Re: mssql-django - Need help to contribute / run tests locally

2022-02-15 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi This is a bit off topic for this list - mssql-django is not an official Django project. I suggest you contact the maintainers of that project at Microsoft, perhaps through GitHub discussions/issues or email. Thanks, Adam On Tue, Feb 15, 2022 at 1:26 PM Jean Frenette wrote: > Hello, > I

Re: Newer constraint declarations and Foreign Keys

2022-03-07 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
No, there is not currently a way in Django to declare such constraints. You can always create them in a migration using the RawSQL operation, then rely on them in your code. This blog post relates to custom relationships which would allow you to model them, I think:

Re: GSOC 22

2022-03-07 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Yes - there's a wiki page here with lots of info: https://code.djangoproject.com/wiki/SummerOfCode2022 On Mon, Mar 7, 2022 at 12:31 PM Sarthak Kinge wrote: > Is django again participating in GSOC 22? > > -- > You received this message because you are subscribed to the Google Groups > "Django

Re: Feature Request: customize redirectable status codes in test client

2022-03-06 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Sorry - I understood your proposal. I meant - have you already tried the more circuitous route of creating your own subclass with the Django of today? Any change to Django can only go out in the next major release, then you have to upgrade, so it might practically be a year before you can use it.

Re: improvement for the front end

2022-03-16 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi I think you might enjoy reading up on htmx: https://htmx.org/ . This allows you to write html attributes that fetch extra HTML fragments from Django, no JavaScrip required. It's been quite popular at Django conferences recently. I maintain the small package django-htmx which has some tools and

Re: Are there not any issues which can be solved by django?

2022-03-15 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
To answer your question: most of the issues in Django's ticket tracker are in the Python code. I think you are probably missing some context that helps you understand them. If you aren't very experienced with Django I'd suggest building some more projects or working on the documentation so you can

Re: Is_ajax replacement??

2022-02-24 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
The feature was deprecated in Django 3.1 - the release note covers alternatives: https://docs.djangoproject.com/en/3.1/releases/3.1/#id2 If you didn't detect this until Django 4.0 I would recommend reading the documentation on deprecation warnings so you can discover deprecations when they

Re: Request for comments, Issue #29208: "Mistake in the documentation, request.POST['username'] is not working, but request.POST.get('username') is working!"

2022-02-24 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I agree with the status of the ticket. The login() example is only to show you how to use authenticate() and login(), it can ignore the details of request.POST validation, which you'd normally use a form for. On Thu, Feb 24, 2022 at 11:46 AM leonhar...@gmail.com < leonhard.kue...@gmail.com>

Re: New to the community want to ask few things.

2022-02-24 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome! 1.So I did clone on my pycharm but in Git-hub repo its not visible . Why it > is so, Is the repo private for django? > I think you may be confused as to how GitHub and Pycharm interact. I would only refer you to their documentation. Both have plenty of beginner tutorials. > 2.

Re: Feature Request: customize redirectable status codes in test client

2022-02-20 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
202 is not a redirect, and I can’t find any standard that says where the “next” URL can be found. So I don’t think there is a strong argument to make the test client “follow” it or allow _handle_redirects to support it. You’re free to subclass the test client in your own project to add support -

Re: mssql-django - Need help to contribute / run tests locally

2022-02-15 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I don't think Microsoft have the right to claim this as their discussion forum - they've been welcome to post about development in the past, but there are 11k people subscribed to this list interested in Django, very few in MS SQL. On Tue, Feb 15, 2022 at 7:26 PM Jean Frenette wrote: > I see

Re: How to start contributing?

2022-03-03 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome! There are many different ways to contribute to Django - the forum, blogging, translating, documenting, writing code, and more. Our Contributing Guide can help you get started with many of these: https://docs.djangoproject.com/en/stable/internals/contributing/ If you’re looking to work

Re: DATABASE_URL not documented?

2022-03-03 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
No it's not built in to Django, it's only supported via dj-database-url. The Heroku docs could be improved. They seem to make a passing mention here: https://devcenter.heroku.com/articles/python-concurrency-and-database-connections . On Thu, Mar 3, 2022 at 8:07 AM Sam wrote: > Hi! > While

Re: Making key_prefix callable for more flexible caching

2022-03-22 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
It doesn't look like Tobias has done anything. I would say open a new ticket referencing this discussion, and then open your PR against that. All the how-to's are in the docs: https://docs.djangoproject.com/en/dev/internals/contributing/ On Mon, Mar 21, 2022 at 6:07 PM Alexandru M. wrote: > Are

Re: About projects

2022-03-23 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome! There are many different ways to contribute to Django - the forum, blogging, translating, documenting, writing code, and more. Our Contributing Guide can help you get started with many of these: https://docs.djangoproject.com/en/stable/internals/contributing/ If you’re looking to work

Re: Revisiting MSSQL and Azure SQL Support in Django

2022-03-31 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi again Warren, Good work on maintaining the backend. Merging the backend could be a good end goal, but I'd be concerned about merging it in the current state. The README lists many features that don't work: https://github.com/microsoft/mssql-django#limitations . This list includes some key

Re: Configuration of "level" in LOGGING

2022-04-05 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Django doesn't require a string for log level. The contents of the LOGGING setting are passed directly to the callable in LOGGING_CONFIG, which defaults to logging.config.dictConfig, which takes numbers. Demo: In [1]: import logging In [2]: from django.conf import settings In [3]: import

Re: Probable Bug, foreign key to a database view.

2022-04-05 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Sandeep - it's best to report bugs as tickets. Anyway, I checked this out for you and I don't see the problem. I started a project, and added the code you suggested as models, ran makemigrations, and saw this error: $ ./manage.py makemigrations core SystemCheckError: System check identified some

Re: Missing feature in actions.js (Django 3.2 and later)

2022-02-03 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Akihito Looking at the PR ( https://github.com/django/django/pull/12820 ) and ticket for that commit, it looks like purely an oversight that this feature was removed. Since you've done much of the research already, would you be able to make a PR? It should be possible to rewrite those lines of

Re: Django Channels redis backend more explicit errors

2022-02-04 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
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

Re: Propagating X-Frame-Options header to debug view responses on errors

2022-01-28 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Thinking again: since it’s a debug view, Django could set the most permissive X-Frame-Options header on debug 500 responses. This would help every kind of framed view. If anyone agrees, we could make a ticket. On Fri, 28 Jan 2022 at 08:13, 'Ben Dickinson' via Django developers (Contributions to

Re: DATABASES setting for async usage

2022-01-31 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Andrew, I'm afraid I don't know much about async, but I can point you at some recent changes. Andrew Godwin created a PR with the draft of the async ORM API. Carlton recently asked for tests: https://twitter.com/carltongibson/status/1486281689265545221 . Perhaps check out those PR's and see if

Re: AWS RDS Proxy and session pinning

2022-01-31 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi! Good to hear about the use of RDS Proxy. I have considered looking at it to help scaling. You should be able to bypass the timezone check yourself with a little subclassing. You can implement this yourself with a subclassed database backend like so:

Re: Proposal on how add configuration options to Email Backends

2022-01-30 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Another situation you might want multiple backends is when switching providers. Rather than big-bang swap *all* email sends to a new provider, you might want to move only low-value emails first, or a percentage of your user base, and iterate. On Sun, 30 Jan 2022 at 20:59, Steven Mapes wrote: >

Re: TypeError: __init__() got an unexpected keyword argument 'name'

2022-02-09 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
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

Re: adding permission_required decorator for class based view

2022-02-09 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Additionally, it's always possible to apply decorators to CBV's like this: class MyView(...): ... my_view = some_decorator(MyView.as_view()) Then use my_view in your urls.py. This works because as_view() returns the "real view" function. ...and you can use method_decorator like this:

Re: adding permission_required decorator for class based view

2022-02-10 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
> > If the mixins are the way to go, it should be reflected in the doc more > (especially in the introduction doc). If you want to make a PR with concrete edits, sure. Yes the example walks you through applying login_required as a decorator, but it does also say: These examples use

Re: Contributions

2022-01-18 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I don't think there's much info about GSoC at this stage. Normally Carlton (one of the fellows) creates a wiki page gathering the info we have, closer to the time. The 2022 one isn't up yet, but here's the 2021 one: https://code.djangoproject.com/wiki/SummerOfCode2021 . I imagine things will be

Re: Django Framework Feedback

2022-01-20 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome! Thank you for trying to improve Django. I can see you are frustrated with a few things. Django is made by a community of volunteers. So your suggestions - there isn't anyone responsible for making them, per se. But the good news is, you have the power to contribute too! For your

Re: Making key_prefix callable for more flexible caching

2022-01-23 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Tobias I think it's also worth mentioning your blog post, in which you explain (to yourself) how to currently achieve dynamic keys: https://rixx.de/blog/how-django-s-page-cache-works/ . It's a lot of work. The closure of #11269 does seem like an oversight, since the

Re: Deprecate CICharField, CIEmailField, CITextField

2022-01-25 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
My initial concern was around the minimum PostgreSQL version that Django 5.0 will support. According to https://en.wikipedia.org/wiki/PostgreSQL#Release_history , PostgreSQL 10 is supported until 2022-11-10 , and version 11 until 2023-11-09. With Django 5.0 expected in 2024-01, it should be fine

Re: Propagating X-Frame-Options header to debug view responses on errors

2022-01-26 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
> > I was wondering if it would be possible to copy the value of the > X-Frame-Options from the view that threw an error The problem here is that, because the view threw an error, there is no response object to copy the X-Frame-Options header from. So there's no way for the middleware to know

Re: Django security releases issued: 4.0.4, 3.2.13, and 2.2.28

2022-04-11 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
> > As I understood it, Django 2.2 will be supported until the end of April, > meaning the 30th of April will be the last day of support. Because the > Django release cycle is once every eight months, and years are divided into > four parts, so the support windows runs up to 1 May. Am I correct in

Re: Django issus

2022-04-11 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
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

Re: Generated Field

2022-04-13 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I'd be interested in seeing this. Generated columns are a useful SQL feature that are missing from Django. Nice initial research on backend coverage - it looks like they're widely supported. Some ideas... Is it necessary to take a base field? Can we not determine the output field type for some

Re: Add YugabyteDB backend to the Django documentation

2022-04-08 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi I think the only process would be to open a pull request against that documentation page. As to your package, it could do with some more documentation. I'm sure there are some limitations. Have you tried running the Django test suite with it? I would also recommend renaming it to

Re: [Feature Request] extra_context -> dataclass

2022-04-06 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Template contexts are namespaces, for which a dictionary is an ideal type. If you want type safety with dicts, you can use TypedDict in type hints. You haven't presented any advantage to using dataclasses, plus it doesn't seem that inconvenient to add your own wrapper that calls asdict(). On Wed,

Re: Generated Field

2022-04-13 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
> > What about we make the expected signature `GeneratedField(expression, > base_field=None)` where a missing `base_field` defaults to > `expression.output_field`? That would allow the exact expected SQL to be > generated with `GeneratedField('title', base_field=SearchVectorField())` if > there's

Re: HELP needed in a Reactjs Django project

2023-10-13 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
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

Re: Question about support dates

2023-10-25 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
As the maintainer of several Django-related packages and a contributor to many more, I see the policy as fair. Most maintainers have little capacity, and anything to reduce that burden is welcome. Third-party packages typically test with a matrix of Python versions against Django versions.

Re: Looking for a code that separates fields while applying migrations

2023-10-02 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
See alte_field in the schema editor: https://github.com/django/django/blob/f4e72e6523e6968d9628dfbff914ab57dbf19e6b/django/db/backends/base/schema.py#L811 It steps through what has changed in the field and generates SQL for the database relevant changes, queueing up statements with

Re: Pertaining the 4.2.6 release's "recreate indexes" footnote

2023-10-12 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I’ve created a PR with a suggested improvement: https://github.com/django/django/pull/17359 . On Thu, Oct 12, 2023, at 5:09 AM, Mariusz Felisiak wrote: > > Thoughts on this? > > Documentation improvements are always welcome, you can send your proposition > via GitHub PR. > > Best, > Mariusz >

Re: Link to alternative Python resource

2023-10-09 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I think it would be better to remove the link from the contribution guide, since it’s quite advanced. The recommendation for the tutorial and “you should have a good understanding of Python itself” seem sufficient to me. I noticed we have other “Dive Into Python” links throughout the docs.

Re: Sync and Async versions of the same function: guidelines for contributors

2023-08-16 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
I think some duplication will always be required, unfortunately. Bridging the two paradigms is necessarily costly as it involve communicating between threads. IMO duplication is worth it to avoid performance regressions for sync code, and to make async code worth using. I am doubtful there is a

Re: How to get started with contributions

2023-08-15 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Welcome! There are many different ways to contribute to Django - the forum, blogging, translating, documenting, writing code, and more. Our Contributing Guide can help you get started with many of these: https://docs.djangoproject.com/en/stable/internals/contributing/ If you’re looking to work

Re: How to stop the increment of Primary Key field when an trasaction fails.

2022-04-24 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi! I'm going to answer your question, but please read the below as well about where to ask questions in future. You can't stop ID's being consumed during a transaction - databases do this by default to avoid any potential confusion between "versions" of objects with the same ID. But if you

Re: Splitting tests instead of testcases by processors when parallelizing tests

2022-03-18 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Alan I'd repeat what Simon says. To write fast tests, you'll want to adopt per-testcase setup, which is shared between tests within that test case. Django has two mechanisms for this in TestCase: fixtures and setUpTestData. (I gave a talk about setUpTestData last year:

Re: For discussion: JSON-aware views for error responses

2022-04-23 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
+1 from me - At least for 400, 500, and CSRF errors, send JSON (or empty response) > back instead of HTML if the request is xhr or has JSON headers > It's possible to detect requests for JSON with request.accepts() , which the previous PR from vanadium23 predates. There's no way to detect "if

Re: Experience with black formatting in django

2022-05-18 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi! Although the DEP for Black was written several years ago, we only actually adopted it in the code base in February this year. The DEP determined to use Black when it was no longer beta, and that took a while :) I think the reformatting was fairly popular, many people have given positive

Re: Postgresql Sequence update on data migration

2022-05-25 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
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

Re: get_random_secret_key not documented!?

2022-06-01 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Python's secrets module has token_hex and a short recipe for generating random strings: https://docs.python.org/3.10/library/secrets.html#recipes-and-best-practices . I don't think Django needs to provide a public function here. I would advise Digital Ocean to recommend the secrets module. On

<    1   2   3   4   >