Re: #django-dev IRC channel

2018-04-27 Thread Anthony King
It might be worth while setting up something that isn't just IRC. Yes, it's simple, and just works. However not everyone enjoys it. An option might be to use Matrix, which allows for connecting to multiple platforms, including the existing IRC channels. As an added bonus, Matrix supports

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

2018-02-22 Thread Anthony King
I entirely agree with renaming `mark_safe`. Though it's name is correct, it doesn't convey the gravity of what this actually does. However I'm unsure on the `dangerously_trust_html` name. It wouldn't be dangerous to trust the literal "Some Content", for example. Perhaps it could be something a

Re: models.CalculatedField feature

2017-11-15 Thread Anthony King
Hey, this is something I'd like to get involved in. Last year I began prototyping something (albeit with an awful name) that resembled sqlalchemy's hybrid properties. I'll spend a bit of time in a few hours sprucing it up to better match their naming, and link it here if anyone is interested.

Re: Automatic prefetching in querysets

2017-08-15 Thread Anthony King
Automatically prefetching is something I feel should be avoided. A common gripe I have with ORMs is they hide what's actually happening with the database, resulting in beginners-going-on-intermediates building libraries/systems that don't scale well. We have several views in a dashboard, where a

Re: To keep or not to keep: logging of undefined template variables

2017-06-20 Thread Anthony King
-1 for removing logs. Like Vlastimil, it's helped me spot a couple of stray bugs. What I'd actually like to see is this becoming stricter, with the end goal of errors raising when using undefined variables. For the verbosity, perhaps there's a middle ground? only log once per variable access per

standardised approach for packaged apps to define default settings

2017-02-01 Thread Anthony King
Yesterday, I posted a new ticket asking about the potential for adding a standardised approach for packages to define default settings. [0] I was writing an app, and when looking for a way to set settings, there was no clear solution. Looking at what other projects do, the goto was something

Re: Authenticating with Django without the password being sent to the server

2017-01-14 Thread Anthony King
Chris, then the password is the hash itself. It doesn't really have any security benefits. Disclaimer: I'm not a security expert On 14 Jan 2017 18:24, "Chris Priest" wrote: > The way django's authentication system works is that when you register, > you send the password to

Re: Removing aliased imports ("from") in generated migration files to prevent conflicts

2017-01-09 Thread Anthony King
There may be a 5th way, which would be to make an alias under the clash conditions. from django.db import models as django_models However this could also lead to mistakes in assume the django models would still be called models. On 9 Jan 2017 21:59, "Alexey Kotlyarov"

Re: Changing {% include %} to strip a trailing newline

2017-01-04 Thread Anthony King
Tim, yes I meant the keep_trailing_newline option. Digging through the code (as I mentioned on IRC), it's possible to have the form rendering to use different options. Here is a proof of concept [0], which forces removal of trailing whitespace in forms, and adds it as an option for settings. I'm

Re: Changing {% include %} to strip a trailing newline

2017-01-04 Thread Anthony King
I think adding the option would be the better approach, and add it in as default for new projects. Having used templates for text emails, I do find it unintuitive to write them because of the newline behaviour. On 4 Jan 2017 19:58, "Tim Graham" wrote: > Shortly after

Re: Feature idea

2016-11-16 Thread Anthony King
Sending a link to set a password isn't much better. Perhaps a way to force a password change on login would be better, which has more use elsewhere, such as being able to periodically force password changes On 16 Nov 2016 8:13 p.m., "Aymeric Augustin" < aymeric.augus...@polytechnique.org> wrote:

Re: Should the Django session-id be hashed?

2016-09-22 Thread Anthony King
I have noticed that session id's are included in Django debug emails, with no clear way to filter them out. I'm unsure of the behaviour with 1.9+, but this is what I've experienced with 1.8. The way around that issue though is to sign the cookie, so that people can't just drop the session-id in.

Re: Challenge teaching Django to beginners: urls.py

2016-09-15 Thread Anthony King
In my opinion, it should remain a string. That's the behaviour it is now, and it'll mean it can remain as a 3rd party package. Perhaps to show it isn't being cast, it could be renamed to "integer", which would avoid confusion On 15 Sep 2016 8:03 a.m., "Sjoerd Job Postmus"

Re: Challenge teaching Django to beginners: urls.py

2016-09-13 Thread Anthony King
This is actually an interesting concept, and wouldn't incur an overheard at runtime if simple_url translated in to full regex format at launch time (or on first request, which is when the urls get loaded if I recall correctly). I don't think this would get in the way of includes, and if it's

Re: Challenge teaching Django to beginners: urls.py

2016-09-13 Thread Anthony King
This is actually an interesting concept, and wouldn't incur an, overheard at runtime if simple_url translated in to full regex format at launch time (or on first request, which is when the urls get loaded if I recall correctly). I don't think this would get in the way of includes, and if it's a