Re: ease patching Django object behavior in another django packages

2018-01-10 Thread Tom Forbes
t 1:12:55 PM UTC-5, Sergey Glazyrin wrote: >> >> Btw, I see no way how do I use this auth_user.create_user_from_token to >> solve this problem. >> It uses django contrib auth get_user function, so the proper place is to >> to use django auth backend logic. >> >

Re: ease patching Django object behavior in another django packages

2018-01-10 Thread Tom Forbes
t to get_user, I don't like it because then all dependent of django projects will need to change backends, it would be worst for community середа, 10 січня 2018 р. 19:52:06 UTC+1 користувач Tom Forbes написав: > > I would be in favour of a mechanism to help with this use case, I ran into >

Adding a bulk_save method to models

2018-01-19 Thread Tom Forbes
Hello all, I’d love for some feedback on an idea I’ve been mulling around lately, namely adding a bulk_save method to Dango. A somewhat common pattern for some applications is to loop over a list of models, set an attribute and call save on them. This unfortunately can issue a lot of database que

Re: Adding a bulk_save method to models

2018-01-22 Thread Tom Forbes
o be convenient. Probably some useful things in there when considering the API and approach. Cheers, Neal On Friday, January 19, 2018 at 5:49:48 PM UTC, Tom Forbes wrote: > > Hello all, > > I’d love for some feedback on an idea I’ve been mulling around lately, > namely adding a

Re: Integrate dj-database-url into Django

2018-02-04 Thread Tom Forbes
I spent some time working on this today and fixed up my branch that implements this. I think I’ve got a nice API that passes all of the dj-database-url tests. As there is a bit of database-specific shenanigans we have to perform on URLs I added a config

Re: DEP Pre-posal: Re-Designing Django Forms

2018-02-05 Thread Tom Forbes
> Perhaps we should just be able to swap Forms with WTForms or another python library and bake in ElementUI, There are a plethora of UI frameworks with different tradeoffs, I really don't think Django sound pick one. However a stronger integration with the JS-build tools of the day like Yarn, web

Re: #28398: Allow management command invocation to suggest for incomplete commands?

2018-02-16 Thread Tom Forbes
to-correction > for common typos, e.g. ./manage.py mgriate could print out a message > 'Assuming you meant migrate' and then continue executing migrate, not > sure if this is the best for Django though where commands can be > arbitrarily added by third party apps. > >

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

2018-02-22 Thread Tom Forbes
What about just 'trust_html'? The dangerous part is quite context dependent (and a bit of mouth-full), but at the core you are trusting the HTML. Hopefully it follows that you should not trust html with user input that hasn't been escaped. On 22 Feb 2018 13:10, "Anthony King" wrote: I entirely a

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

2018-02-22 Thread Tom Forbes
st_html' - it's still similarly short but as Tom says it > implies more than 'mark_safe' does. > > On 22 February 2018 at 08:30, Tom Forbes wrote: > >> What about just 'trust_html'? The dangerous part is quite context >> dependent (and a bit of m

Re: “Abusing BinaryField” warning about binary files in DB

2018-02-25 Thread Tom Forbes
Hey Antonie, Personally I’m quite against changing that warning. I have only ever seen one application where the use of an in-database file is appropriate and they where using the FILESTREAM type in SQL Server w

Re: GSoC 2018

2018-03-16 Thread Tom Forbes
Hey Manasvi, I don't have any say in the choice of a GSOC student, but I'd like to add my two cents nonetheless. I can see the logic behind your proposal, but I'm skeptical about the usefulness of such a project. Libraries that implemented something similar to this have come and gone, and got good

Re: GSoC 2018

2018-03-16 Thread Tom Forbes
useful than yet another way of generating static server side HTML. Tom × 1. https://medium.com/@hpux/rails-5-1-loves-javascript-a1d84d5318b On 17 Mar 2018 03:14, "Manasvi Saxena" wrote: Hello Sir, On Saturday, March 17, 2018 at 5:39:34 AM UTC+5:30, Tom Forbes wrote: > Hey Manasvi, &

Re: SafeExceptionReporterFilter should obfuscate all variables in every stack frame below a function decorated with sensitive_variables

2018-04-06 Thread Tom Forbes
My only concern is that it would greatly reduce the usefulness of the exception reporter, and might lead to people removing the sensitive_variables decorator in order to see exception tracebacks. Perhaps rather than obscure all local variables below the decorated function, we could obscure any var

Re: Shouldn't manage.py call python3 instead of python?

2018-04-08 Thread Tom Forbes
This only seems to be an issue when you are using the base system interpreter to run manage.py. installing Django and other dependencies there is not recommended for a variety of reasons, and this isn't a problem when using a virtualenv, it doesn't seem like there is much to fix IMO. On Sun, 8 Ap

Re: Shouldn't manage.py call python3 instead of python?

2018-04-08 Thread Tom Forbes
tting VirtualEnvs for each shell. So, I personally don’t use them anymore, and just use the base system now. I wish there was a process of running Django out-of-the-box from a default Mac OS install. -bobby On Apr 8, 2018, at 8:27 AM, Tom Forbes wrote: This only seems to be an issue when you are

Re: please help me i am trying to solve it from 5 days but still did not get the solution so please help me here is problem

2018-04-15 Thread Tom Forbes
This mailing list is for the development of Django itself, not for support. Use the django-users mailing list for that, or IRC #django on freenode, or a site like Stack Overflow. On 15 April 2018 at 14:53:50, rahul verma (rahulverma6...@gmail.com) wrote: https://github.com/rahul6612/flying-stor

Re: Proposal: security enhancements

2018-05-04 Thread Tom Forbes
Hey James, I think these ideas are fantastic. I used EmberJS for a project and the development server contained a built in CSP report URL which just printed what the browser sent to the console. This was very useful during development as you could immediately see CSP errors that were triggered ra

Re: A Django Async Roadmap

2018-06-04 Thread Tom Forbes
Hey Andrew, thank you for the very exciting proposal and the ongoing work on Django channels! There is a lot to consider here and some very interesting problems to work through - I’d love to help out wherever I can. Do we think async is worth going after? I think this is very much worth doing. As

Re: A Django Async Roadmap

2018-06-05 Thread Tom Forbes
> Unfortunately even if you have context variables, you simply can't await inside of an attribute reference because there's a synchronous call in your stack. I even chatted to some Python core devs at PyCon US about this and we couldn't really think of a way out of this problem without some very se

Re: Optionally using a custom queryset for Paginator and MultipleObjectMixin (ListView)

2018-06-30 Thread Tom Forbes
Are you sure it is the prefetches that is causing this? As Adam pointed out these are correctly ignored. Annotations however are not, which can cause unnecessary work and longer execution times. i.e: Book.objects.annotate(something=Max('pages__word_count')).count() We have enough information to b

Re: MariaDB, official support

2018-07-05 Thread Tom Forbes
I think that given Adams plan it might be possible to get this done before 2.2 as there are not too many failures. I’m not entirely convinced that including MariaDB logic inside the MySQL backend is a permanent solution. It might be the path of least resistance right now, and a good idea to get th

Re: Optionally using a custom queryset for Paginator and MultipleObjectMixin (ListView)

2018-07-17 Thread Tom Forbes
Indeed, I had an attempt at doing this here ( https://github.com/django/django/pull/8928/), but it seems a hard problem. I think there is huge potential here but I have no time to work on this anymore. On Tue, 17 Jul 2018, 19:00 Ramiro Morales, wrote: > On Sat, Jun 30, 2018 at 12:40 PM

Re: Integrate dj-database-url into Django

2018-07-28 Thread Tom Forbes
So in the PR I proposed I only bits I took verbatim from dj-database-url are the tests. The rest is re-implemented. I think it's a pretty good POC but I haven't touched it in a while. In any case we have to implement our own parsing for backends that do not support passing in a URL to the connecti

Re: Django and Cython

2018-08-03 Thread Tom Forbes
The people showing you benchmarks comparing Django to ‘NodeJS’ are comparing apples to oranges. Django is not an asynchronous framework (yet!) so you cannot fairly compare the number of raw requests per second the two handle and present that as evidence one is better than the other. Each one has it

Re: Add autocomplete attribute to contrib.auth fields?

2018-08-25 Thread Tom Forbes
I don’t have much to add other than it’s pretty common for pentests to flag autocomplete being enabled on sensitive fields (email/password) and recommend disabling it (autocomplete=off). While I’m not sure if I agree with that recommendation in some situations you have little choice but to follow i

Re: Adding a bulk_save method to models

2018-09-15 Thread Tom Forbes
; certainly be nice. Just in case you haven't come across it though, > >> there is a package called django-bulk-update: > >> > >> https://github.com/aykut/django-bulk-update > >> > >> I've found it very useful on a number of occassions where updat

Re: Adding a bulk_save method to models

2018-09-16 Thread Tom Forbes
Thank you all for the feedback, I’ve changed the method to be bulk_update() as this seems to be the most liked option. Naming things is hard, and while bulk_update() isn’t perfect I think it’s a bit better than bulk_update_fields() or just update_fields(). On 16 September 2018 at 10:19:40, Tobi

Re: Adding a database-agnostic JSONField into Django

2018-10-04 Thread Tom Forbes
I would also be very interested in helping out. I don’t know if this is useful, but I’ve had a brief look at the feature support compared to our current baseline Postgres features: MySQL: https://dev.mysql.com/doc/refman/8.0/en/json-search-functions.html - JSON_CONTAINS_PATH() can implement most o

Remove pyinotify autoreloader support

2018-10-06 Thread Tom Forbes
What do we think about removing the pyinotify functionality in the autoreloader? For context, if pyinotify is installed (Linux only) the autoreloader will attempt to use it to detect file changes over the standard polling-based approach. It is generally much more efficient but is not cross platform

Re: Remove pyinotify autoreloader support

2018-10-08 Thread Tom Forbes
sulted a significant performance CPU and I/O improvement. Simon Le samedi 6 octobre 2018 15:32:33 UTC-4, Tom Forbes a écrit : > > What do we think about removing the pyinotify functionality in the > autoreloader? For context, if pyinotify is installed (Linux only) the > autoreloader wi

Re: Adding a database-agnostic JSONField into Django

2018-10-20 Thread Tom Forbes
Awesome work! Would you mind elaborating on the differences between mysql and mariadb? On Sat, 20 Oct 2018, 05:14 Raphael Michel, wrote: > Hi everyone, > > I used the sprints at DjangoCon US to work on this issue in form of a > third-party package. Mainly, I created a subclass of > django.contri

Re: Widening participation (Thoughts from DjangoCon)

2018-10-26 Thread Tom Forbes
How much of this would you attribute to the current ticketing system itself, rather than tickets being tagged appropriately? I know when I started contributing I found trac to be pretty intimidating in terms of complexity, especially the search. I still prefer to use the 'Search Trac' field in the

Re: Python string formatting

2018-10-31 Thread Tom Forbes
In my experience f strings are vastly more expressive than .format, but not much better than % based formatting. If we can make this change after we drop 3.5 I think it will be a lot easier. On Wed, 31 Oct 2018, 21:09 Adrian Turjak There was a push to deprecated % formatting but too many people

Explore integrating django-docker-box in some way?

2018-11-04 Thread Tom Forbes
Hello all, I’ve been working on a docker-compose based alternative to django-box (imaginatively named django-docker-box) over the last month and it finally appears to be mostly complete. For reference the tool is just a Dockerfile and a docker-compose definition that is able to run a complete tes

Re: Remove pyinotify autoreloader support

2018-11-04 Thread Tom Forbes
import Counter counter = Counter(m.split('.')[0] for m in sys.modules.keys()) total = sum(counter.values()) project_total = counter['PROJECT NAME HERE'] print('Project:', project_total) print('Total:', total) print(counter.most_common(20)) Thanks, Tom O

Re: Idea: Allow queryset.get() and queryset.filter() to accept a positional argument for implicit primary key filtering

2018-11-05 Thread Tom Forbes
I feel this would be a good addition to just .get(), I’ve wanted this while working with the shell. Model.objects.get(pk) feels very natural to me, and the common Model.objects.get(pk=pk) always felt overly verbose. On 5 November 2018 at 22:37:52, Josh Smeaton (josh.smea...@gmail.com) wrote: I

Re: backend specific tests

2018-11-07 Thread Tom Forbes
Hey Dan, I’ve been working on a project called django_docker_box ( https://github.com/orf/django-docker-box) that might help with this. Docker is pretty good at spinning up various databases without needing to clutter your local machine, spend time configuring authentication or dealing with issues

Re: Password reset token safety

2018-11-07 Thread Tom Forbes
Would you consider the *secret* key to not be unpredictable? On Wed, 7 Nov 2018, 21:22 Alex Toussaint > Hello, > > I'd like to discuss about Django's password reset token functionality. > > I've been able, with a simple Python script, from having read-only access > to my Django webserver to a ful

Re: Pluggable secret key backend

2018-11-11 Thread Tom Forbes
Is it going to be easy to adjust the semantics of SECRET_KEY to support sequences like that? I’d imagine a lot of third party packages that expect SECRET_KEY to be a string would break in weird ways (thanks to both strings and tuples of strings being iterables that yield strings). Here’s a quick s

Re: Add Python 3.7 support for Django 1.11?

2018-11-16 Thread Tom Forbes
Do we have an idea of how many fixes would need to be backported? If it's just this one (or a very select few) I would support that. You can work around most things in Python but a hard syntax error is a big pain, so I can understand people wanting this. On 16 November 2018 at 15:24:44, Tim Graham

Re: Removing Oracle from Django core in 3.0

2018-11-26 Thread Tom Forbes
s get a coffee! > https://calendly.com/codingjoe/coffee > > Lennéstr. 19 > 14469 Potsdam > > USt-IdNr.: DE284754038 > On 26. Nov 2018, 14:55 +0100, charettes , wrote: > > I haven't tried it out for Oracle yet but Tom Forbes' django-docker-box > seems to make it

Re: Moving database backends out of the core

2018-11-26 Thread Tom Forbes
I see where you are coming from, but I'm not sure it will have the intended effect. One of the great things about Django is that for the most part database features work everywhere. If we split them out there will be more innovation, sure, but we may loose the 'database transparency' we currently h

Re: Explore integrating django-docker-box in some way?

2018-12-04 Thread Tom Forbes
e issues, etc). On Monday, 5 November 2018 01:20:03 UTC+11, Tom Forbes wrote: > > Hello all, > > I’ve been working on a docker-compose based alternative to django-box > (imaginatively named django-docker-box) over the last month and it > finally appears to be mostly complete. >

Re: Explore integrating django-docker-box in some way?

2018-12-04 Thread Tom Forbes
ts on using docker over customised build environments would be. Florian, Tim, Markus .. any thoughts? (Apologies, I've missed some, this list of names is from memory). On Wednesday, 5 December 2018 10:39:16 UTC+11, Tom Forbes wrote: > > Thank you for the reply Josh. I didn’t anticipate any s

Re: Widening participation (Thoughts from DjangoCon)

2018-12-11 Thread Tom Forbes
> The only reason Github issues would be a consideration is if the group thought the onboarding experience (being where users already are with a tool they're already familiar with) would have more value than sticking with with the status quo which is strictly better from a feature perspective than

Re: Widening participation (Thoughts from DjangoCon)

2018-12-12 Thread Tom Forbes
ld not be better than GH Issues from an > onboarding perspective. > > [0]https://www.python.org/dev/peps/pep-0581/#why-not-gitlab > > On Tuesday, 11 December 2018 23:20:21 UTC+11, Tom Forbes wrote: >> >> > The only reason Github issues would be a consideration is if t

Re: A faster paginator for django

2018-12-23 Thread Tom Forbes
I would be strongly against misusing EXPLAIN like that inside Django, and I feel keyset/cursor pagination is best if your going down this road. I've got no concrete evidence for this opinion, but I feel like navigating to an exact page is very rarely used and only then as a proxy for range filteri

Re: Request to reconsider ticket #27910: using an Enum class in model Field choices

2018-12-31 Thread Tom Forbes
ating choices in Django model (and form) fields. This > ticket was closed Wontfix because the original suggestion did not offer > any way to handle translated labels. However, after the ticket was > closed, Tom Forbes brought up a suggestion for a suitable API; > regretfully, AFAICT this

Re: Request to reconsider ticket #27910: using an Enum class in model Field choices

2018-12-31 Thread Tom Forbes
oring, and honestly enums made this much more usable. We currently have a -1 and a +1, does anyone else have any input on this? Tom On Mon, 31 Dec 2018, 22:15 Shai Berger Hi Tom, > > On Mon, 31 Dec 2018 18:26:14 + > Tom Forbes wrote: > > > I was describing my django-ch

Re: Request to reconsider ticket #27910: using an Enum class in model Field choices

2019-01-12 Thread Tom Forbes
While I agree that Enum’s are a bit clunky (and IMO removing in is a poor choice), is this going to really take be that hard to work with or that difficult to validate? Enums are types that raise ValueError, like any other, so it’s not that confusing and fits in with Django’s existing validation c

Re: bulk_update: add **exclude** arg

2019-01-18 Thread Tom Forbes
Hey Mohammad, Thanks for your suggestion. I considered this while implementing bulk update but I decided against it. In my opinion you should be very explicit about the fields you wish to update, due to the way that bulk update works it can generate very large and expensive queries if a lot of col

Re: revisiting the Python version support policy

2019-01-25 Thread Tom Forbes
This message really resonated with me, especially after helping a few beginners get started with Python and watching them struggle with exactly this kind of thing. I'd be +1 on following Python. Looking through the diff there is not a huge amount of things to remove and IMO none of them are really

Re: django.utils.dateparse

2019-02-03 Thread Tom Forbes
I’m pretty sure 0.0241 usec per loop is either a typo or a mistake during benchmarking. I’ve got no comment what you’re proposing but correct and valid benchmarks are important, so I would double check that. On 3 February 2019 at 23:37:14, Giuseppe De Marco ( giuseppe.dema...@unical.it) wrote:

Re: django.utils.dateparse

2019-02-04 Thread Tom Forbes
ll I am grateful for your time and your attention. @Tom Forbes The first time I runned it I thought the same thing! Please use https://github.com/peppelinux/Django-snippets/blob/master/datetime_heuristic_parser.py and not the previous pasted one. I'm quite sure that all the tests passes well, be

Re: Use CDN for djangoproject.com

2019-02-13 Thread Tom Forbes
I would highly recommend cloudflare. It's free, can be set up in 15 minutes and works really, really well. On Thu, 14 Feb 2019, 00:36 Cristiano Coelho, wrote: > Consider AWS's cloudfront then :) > > El martes, 12 de febrero de 2019, 2:34:09 (UTC-5), Florian Apolloner > escribió: >> >> Especially

Re: Use CDN for djangoproject.com

2019-02-14 Thread Tom Forbes
That makes sense, but in this case we are only talking about potentially yielding control of the docs subdomain which is not used to serve sensitive build artefacts? Another option is fastly.com, who support other large open source projects for free. They essentially give you geographically distri

Re: Google Summer of Code 2019

2019-02-14 Thread Tom Forbes
Out of interest, do the projects for GSOC have to fall within the Django repository themselves? Could they be an associated project under the Django umbrella? I think something that helps with deployment in general could be interesting, but it definitely does not live inside Django core. Howeve

Re: BitBounce Spam Replies From the Mailing List

2019-02-17 Thread Tom Forbes
I figured I’d email their CEO (stewart.den...@bitbounce.com) and ask if he can look into this, because it’s kind of ridiculous. I think I should have known beforehand what kind of automated reply I got… I’ve also marked them as spam and so don’t receive them anymore but I can imagine it’s pretty a

Re: Django 2.2 and the watchman reloader

2019-02-21 Thread Tom Forbes
Hey Claude, Thanks for your feedback on the feature, I fully agree with you. I think we should remove that warning message about the missing package. I will make a PR to do that. Regarding creating another reloader: it should not be that difficult to do at all since we have all the other pieces in

Re: Use CDN for djangoproject.com

2019-02-23 Thread Tom Forbes
e with Fastly in the past and would >>>>> avoid them. They run an old fork of Varnish which is not fun to configure. >>>>> >>>>> On Thu, 14 Feb 2019 at 11:16, Josh Smeaton >>>>> wrote: >>>>> >>>>>> Cloudflare ha

Re: Use CDN for djangoproject.com

2019-02-23 Thread Tom Forbes
Sorry, I did not completely grok your message. I would be in favour of just invalidating the whole cache if needed, it seems the simplest solution. Invalidating most of the cache on every non-dev deploy would also be OK I think. On Sun, 24 Feb 2019, 00:10 Tom Forbes, wrote: > Which CDN are

Re: Use CDN for djangoproject.com

2019-02-24 Thread Tom Forbes
(without a DNS or server configuration change) since I don't think CloudFront supports passing a custom Host header to the origin like Fastly does (i.e., you'll probably need to edit /etc/hosts). Cheers, Tobias On Sat, Feb 23, 2019, 7:15 PM Tom Forbes wrote: > Sorry, I did not completely grok

Re: Django 2.2 and the watchman reloader

2019-02-25 Thread Tom Forbes
+1, Tom Forbes a écrit : > > Hey Claude, > Thanks for your feedback on the feature, I fully agree with you. I think > we should remove that warning message about the missing package. I will > make a PR to do that. > I'm not completely sure it's a good idea to entirely re

Re: Official Django Docker Container Deprecated

2019-02-26 Thread Tom Forbes
There never was an official Django image, it was an "official docker" Django image that they maintained. The page image page explains why it was deprecated: https://hub.docker.com/_/django For most usages of this image, it was already not bringing in django from > this image, but actually from

Re: Official Django Docker Container Deprecated

2019-02-28 Thread Tom Forbes
I think the point we are trying to make is that it’s fundamentally not a good thing to try and distribute a one-size fits all docker image for a specific framework. For reference here is one you can use yourself: FROM python:3 COPY requirements.txt . RUN pip install -r requirements.txt COPY . . C

Re: Request to reconsider ticket #27910: using an Enum class in model Field choices

2019-04-13 Thread Tom Forbes
I really like this implementation, it seems really clean and simple. I would suggest that it might be worth seeing it’s simple to make the display text optional, I think in the general case capitalising the key name would be acceptable. Users can always override it if required or if they need tran

Re: Add to QuerySet method `one` that acts as `first` but without ordering

2019-04-13 Thread Tom Forbes
I don’t think we should add a method like this for a few reasons. Firstly without an order by in SQL the order of rows is undefined, in practice myql orders rows but Postgres returns a different order per transaction. This will be confusing to users who don’t understand this and come to implicit

Re: Why does ModelForm do validation and not Model

2019-04-16 Thread Tom Forbes
The idea is that you generally always have to do extensive validation when accepting user input through a form. These validations could require additional database queries or other somewhat expensive lookups (especially with validate unique). However if you are loading data from a trusted source,

Re: Proposal to format Django using black

2019-04-17 Thread Tom Forbes
I would be +1 for Black. I think it makes a lot of sense for a project like Django, and it does seem that a non trivial amount of both contributor and reviewer time is spent on formatting fixes. The choice of double quotes by default used to annoy me, but after using black for a while I think t

Re: Proposal to format Django using black

2019-04-25 Thread Tom Forbes
> so there is no way to know who is nodding along with which arguments. That somewhat impedes the point of posting this to get consensus, and if you ascribe to that view then all mailing list discussions about project wide changes are somewhat useless, as there could be a silent majority complet

Re: A different approach for the auto-reloader

2019-05-01 Thread Tom Forbes
process which is in charge of > restarting the 'upstream' web server process (in our case a dumbed-down > runserver dev server) only when it detects there have been changes. > > Been meaning to try this for some time. It would have been much harder > before Tom Forbe

Re: About query strings in urls when using rest api

2019-05-03 Thread Tom Forbes
This mailing list is for the development of Django itself, not for support using Django. Please use the django-users mailing list for that, or IRC #django on freenode, or a site like Stack Overflow. Also, please never add private credentials in query strings like that. Use a POST request. > On

Re: injecting settings

2019-05-07 Thread Tom Forbes
I think what you are describing is a hard problem(tm) with no clear and generic way to solve it. Django doesn’t have the concept of a dependency tree in apps, and while this is annoying in some cases there isn’t much we can do to solve it. If I understand your proposition, it would inevitably in

Re: DEP 0008 (Formatting using Black) is accepted

2019-05-11 Thread Tom Forbes
There has been a particularly healthy debate on the mailing list, I think it was clear that a consensus was not going to be reached. Are there any points you wanted to bring up there that where not already made on the mailing list thread? Tom > On 11 May 2019, at 17:30, Michael Martinez > wr

Re: ERROR: The included URLConf 'website.urls' does not appear to have patterns in it. If u see valid patterns in the file then there is issue of Circular import.

2019-05-28 Thread Tom Forbes
As Adam states before, in the first reply to your original message, this mailing list is for the internal development of Django and not for getting help with your Django projects. There are numerous other places to ask, check his email for a few, and a lot of people (myself included) willing to

Re: Django 2.2 and the watchman reloader

2019-06-16 Thread Tom Forbes
nd we need to ensure only the main thread triggers the file changed notification), but otherwise it seems to be working OK locally. On Mon, Feb 25, 2019 at 10:22 PM Tom Forbes wrote: > I have a small PR here to remove the “watchman unavailable” message, > whilst keeping the one that specifie

Re: ipdb throws AttributeError in autoreload.py with 2.2.2

2019-06-23 Thread Tom Forbes
IPython seems to override `__main__`, which I certainly did not expect: https://github.com/ipython/ipython/blob/257e4c45563598810b0a771de286004617510fc1/IPython/core/debugger.py#L238

Re: Redis cache support in core

2019-09-05 Thread Tom Forbes
That's not necessarily a blocker, and Memcached is not simple to run on Windows either - there are no official prebuilt binaries, as far as I'm aware. > On 5 Sep 2019, at 14:29, Matthew Pava wrote: > > I’d just like to point out that Redis support on Windows is limited at best. > All other tec

Re: Feature idea: bulk_associate: Add ManyToMany relationships in bulk

2019-10-01 Thread Tom Forbes
Hey David, I like this idea, while I don’t think the use case is common there have been a few times where I’ve needed this and got around it by creating/modifying the through model in bulk. Having a method that does this would be good IMO. Unless anyone has strong opinions against this then can

Re: Explore integrating django-docker-box in some way?

2019-10-08 Thread Tom Forbes
ibutor to Django, this django-docker-box > is fantastic, it makes things much easier to setup. > > Thank you to everyone involved! > > On Wednesday, 5 December 2018 00:02:27 UTC, Tom Forbes wrote: >> >> To have this completely working at sprints without having every

Re: Explore integrating django-docker-box in some way?

2019-10-08 Thread Tom Forbes
;> wrote: > I was going to archive the repo, but it seems I don't have the necessary > permissions. Carlton, do you? > > On Tuesday, 8 October 2019 21:45:22 UTC+11, Adam Johnson wrote: > +1 to archiving django-box > > On Tue, 8 Oct 2019 at 11:01, Tom Forbes >

Re: Removing old branches from the Django Git repository.

2019-10-10 Thread Tom Forbes
I second this, there are a few other branches in that list (successful or not) that have historic value to Django. Is there a pressing need to delete them, other than spring cleaning? I guess maybe it’s sentimental value, and nobody would ever check them out, but still... Tom > On 10 Oct 2019

Re: GitHub Actions

2019-10-31 Thread Tom Forbes
concerned about the lack of delivery on some Google groups messages. I had not been sent the first message from Johannes (it’s not in spam or any other place), and would have missed it if Felix has not replied. Tom >> On 31 Oct 2019, at 09:49, Florian Apolloner wrote: >  > I thin

Re: GitHub Actions

2019-11-06 Thread Tom Forbes
Yes there will be. Now Github has added caching I think we are good to go. I will send a link here with the longer running on my fork and we can look at starting there. Once (if?) that’s merged then we can enable the “allow forks to run actions” option and we can iteratively add more tests as me

Re: GitHub Actions

2019-11-06 Thread Tom Forbes
we think? Tom > On 6 Nov 2019, at 13:58, Tom Forbes wrote: > > Yes there will be. Now Github has added caching I think we are good to go. > > I will send a link here with the longer running on my fork and we can look at > starting there. Once (if?) that’s merged then we can

Re: GitHub Actions

2019-11-06 Thread Tom Forbes
Maybe this discussion is slightly off topic, and at the risk of derailing things I’d like to put out my view on this. There is more to it than just “using Github’s computing power”, just as there is more to using AWS than “using Amazon’s computing power”. That’s only a small part of it: it’s al

Re: GitHub Actions

2019-11-07 Thread Tom Forbes
o/commit/eeefc83a85ba5e91b98c4e29fb9b20896612cc8c/checks?check_suite_id=299641652> > > -- > Johannes Hoppe > > www.johanneshoppe.com <http://www.johanneshoppe.com/> > > Want to chat? Let's get a coffee! > https://calendly.com/codingjoe/call <https://calend

[Feature Request] Shorthand syntax for filtering aggregations

2017-04-12 Thread Tom Forbes
Hello, At the Djangocon sprints I wanted to add support for a postgres specific syntax for filtering aggregations, which is quite simple: MAX(something) FILTER (WHERE x=1). During this the sprints I was told that it would be good to support this for all databases, and it can be done using the CASE

Re: [Feature Request] Shorthand syntax for filtering aggregations

2017-04-17 Thread Tom Forbes
t;recent_emails=Count('emails', filter=Q(received_date__lt=one_week_ago)), > ) > > > Cheers, > Simon > > [0] http://modern-sql.com/feature/filter > [1] https://pypi.python.org/pypi/django-aggregate-if > [2] https://code.djangoproject.com/ticket/11305 >

Re: A New Design for the "Congratulations!" Page

2017-04-18 Thread Tom Forbes
I'm not a core developer but I'd just like to say that your redesign looks amazing and is a big improvement. Even if this specific design is not acceptable I think it's a great idea to link to the tutorials/documentation from that page. I'm not a big fan of it loading the fonts from Google Fonts h

Transifex organisation

2017-05-16 Thread Tom Forbes
Hello, Is anyone responsible for managing the transifex organisation? A colleague of mine applied to join the Django organisation to contribute greek translations for the admin, but his application is currently pending and has been for a while. Are there any special requirements for joining the Tr

Cython usage within Django

2017-05-21 Thread Tom Forbes
Hello, There was a very interesting talk at Pycon about using Cython to speed up hotspots in Python programs: https://www.youtube.com/watch?v=_1MSX7V28Po It got me wondering about possibly using Cython in selected places within Django. I realize since Django was first released the distribution si

Re: Cython usage within Django

2017-05-21 Thread Tom Forbes
us to adopt the engineering overhead of integrating Cython into Django’s runtime environment. Yours Russ Magee %-) On 21 May 2017, 2:59 PM -0700, Tom Forbes , wrote: Hello, There was a very interesting talk at Pycon about using Cython to speed up hotspots in Python programs: https://www.yo

Re: Integrate dj-database-url into Django

2017-05-24 Thread Tom Forbes
My two cents: connection strings/database URI's are a feature I've sorely missed in Django. Built-in functionality to convert environment variables like DJANGO_DB_DEFAULT (or more generally DJANGO_DB_*key*) into the relevant DATABASE setting would make some deployment situations a lot simpler. Cur

Re: Connecting to postgresql database

2017-05-25 Thread Tom Forbes
Hi Anthony, this mailing list is for the development of Django only. Please post questions like this to django-users or ask in the #django freenode IRC channel, and not in this mailing list. As for your issue: the exception message explains exactly what the issue is. Try running 'pip install --upg

Re: Integrate dj-database-url into Django

2017-05-27 Thread Tom Forbes
word]@[host]:[port]/[name] > > where we create arbitrary [engine] values in an ad-hoc fashion? > > On 24 May 2017, at 21:21, Tom Forbes wrote: > > My two cents: connection strings/database URI's are a feature I've sorely > missed in Django. > > Built-in functionali

Re: Integrate dj-database-url into Django

2017-05-27 Thread Tom Forbes
Edit: DJANGO_SETTINGS_MODULE isn't relative, it will import any arbitrary module you give it. If we accept that then I think we are accepting the risk of imports via an attacker controlling environment variables whilst Django starts up? On Sat, May 27, 2017 at 8:49 PM, Tom Forbes wrote: &g

Re: LiveServerTestCase change in Django 1.11 means can't run functional tests against external server?

2017-06-01 Thread Tom Forbes
Shouldn't A.url be a relative URL in this case? I agree the ticket should be re-opened though, we had some pains working around this, but it was surmountable. On 1 Jun 2017 15:31, "Francis Mwangi" wrote: please reopen the ticket, we are having a pain testing code that generating code. For insta

Re: Default to BigAutoField

2017-06-09 Thread Tom Forbes
How would this work with generic foreign keys as well? Those migrations couldn't be automatic. On 9 Jun 2017 20:43, "Jacob Kaplan-Moss" wrote: > I think this would be a good improvement, and I'd like to see it. I've > been bitten by integers overflowing at least twice I can remember in my > care

Re: Default to BigAutoField

2017-06-10 Thread Tom Forbes
I really like the idea of a global configurable setting. One problem with a setting is that it's not always changeable, which settings kind of imply (IMO). Going from int->bigint is always possible, but going backwards may not be, nor might going from int->guid. I attempted an int->guid migration

<    1   2   3   >