group-by promotion

2016-01-08 Thread Curtis Maloney
Hey all, I'm trying to write a PR for adding Postgres9.4's "FILTER" syntax for aggregates, but I've hit a bug I can't figure how to fix [and nobody's awake on IRC :)] https://github.com/django/django/pull/5956 Basically, for the query: qset = FilterAggParentModel.objects.annotate(

Re: re-thinking middleware

2016-01-08 Thread Curtis Maloney
In general, I love it. It's MUCH simpler for people to write and comprehend... requires no classes [but IMHO the callable class is "cleaner"] and allows for configurable middlewares easily... I do wonder, though... how the anti-import-strings factions will react... I'm sure it can, at

Re: delegating our static file serving

2016-01-01 Thread Curtis Maloney
On 01/01/16 15:49, Fabio Caritas Barrionuevo da Luz wrote: A question: are there any plans to also improve MEDIA files (user uploaded files) in any foreseeable future? Perhaps this is outside the scope of Django, but I believe Django could provide by default, any option to get a little more

Re: A community Poll

2015-12-23 Thread Curtis Maloney
To clarify a few points: In general, I'm in favour of removing string references for things... however, when it comes to relation fields, I'm on the side of "alway lazy". Also, I don't want this discussion to be about my specific issue with contenttypes... more a general "community opinion of

Re: Decoupling the ORM

2015-12-17 Thread Curtis Maloney
I've identified one new "issue". There is an implicit assumption that primary keys are useful for ordering by the current QuerySet API methods `.first()` and `.last()`. I believe the case here is that first and last are meaningless without an ordering, so in lieu of any programmer supplied

Re: MOSS Award to Django

2015-12-15 Thread Curtis Maloney
On 16/12/15 12:05, Ben Liyanage wrote: And, beyond that, there are plenty of non-critical tasks that applications could easily offload until after a response has been sent - like saving things into a cache or thumbnailing newly-uploaded images.

Re: CSRF middleware conflicts with request.upload_handlers

2015-11-19 Thread Curtis Maloney
:51:18 AM UTC-5, Curtis Maloney wrote: >> >> >> So I recently ran into the csrf/upload_handlers conflict as mentioned in >> the not >> https://docs.djangoproject.com/en/1.8/topics/http/file-uploads/#id1 >> >> I'd like to propose an additional option to s

CSRF middleware conflicts with request.upload_handlers

2015-11-15 Thread Curtis Maloney
So I recently ran into the csrf/upload_handlers conflict as mentioned in the not https://docs.djangoproject.com/en/1.8/topics/http/file-uploads/#id1 I'd like to propose an additional option to solve this -- a decorator to mark a view as "ajax-only" ... so the CSRF middleware will _only_

Re: Deprecating old keyword syntax in DTL

2015-08-08 Thread Curtis Maloney
For reference, the old PR is here : https://github.com/django/django/pull/1619/files Unfortunately, it doesn't rebase cleanly onto master... some very odd stuff shows up... but it wouldn't take much to regenerate this work. -- Curtis On Saturday, 8 August 2015 21:33:22 UTC+10, Curtis Maloney

Deprecating old keyword syntax in DTL

2015-08-08 Thread Curtis Maloney
Long ago, the keyword syntax in Django templates was: expr as name but was changed to look more like Python as: name=expr However, the facility to parse the old syntax is still there, but will silently fail unless you pass "support_legacy" to token_kwargs. In fact, it is enabled for

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

2015-08-06 Thread Curtis Maloney
I'd probably go with updating the documentation to say they're legacy tags, you're better off using {% if %} now, and warn they may be removed in a later release. This way (a) people are warned off it, and (b) we're confusing people who find it and want to check what it does [even though it's

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

2015-08-06 Thread Curtis Maloney
Given the [currently] low burden, I agree with a more gradual deprecation... document against their use to help encourage people to move away from them, then we're in a better position to more painlessly remove them in the future. -- Curtis On 7 August 2015 at 11:43, Karen Tracey

Re: #25227 Add utility method `get_updated_model()` to `ModelForm`

2015-08-06 Thread Curtis Maloney
Just my $0.02... I quite like the idea of adding update_instance and commit, with save calling both... To me, this provides a clean and obvious place to customise updating the instance before saving... as well as a clear place to get an updated instance without saving. -- Curtis On 7 August

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

2015-08-06 Thread Curtis Maloney
Let me open by saying I am in no way averse to the removal of these two tags... and this reminds me I need to also re-work my "remove the 'x as y' argument syntax" patch again... On 7 August 2015 at 07:08, Marc Tamlyn wrote: > However, as with all technical debt, it has a

Re: Speedy Mail 2.0 - a new webmail platform in Python and Django

2015-07-21 Thread Curtis Maloney
Guess I should sign up on django-users so I can throw my hat in for this... I've yearned for a Python-based webmail that has a featureful UI :) So far there's only Modoboa, excellent as it is. Competition is healthy, so... -- Curtis On 22 July 2015 at 05:20, Shai Berger

Re: Support for UNLOGGED tables in PostgreSQL

2015-07-19 Thread Curtis Maloney
I second what Aymeric say rather than take on the burden of maintaining correct warnings, let's point at the people whose responsibility it really is :) -- Curtis On 20 July 2015 at 06:44, Aymeric Augustin wrote: > I agree with pointing to the relevant

Re: Support for UNLOGGED tables in PostgreSQL

2015-07-15 Thread Curtis Maloney
On 16 July 2015 at 05:01, Shai Berger wrote: > This is a shot in the dark: Could it be that rolling back transactions > involving unlogged tables is harder? The idea does make sense, and running the > test suite does an extremely untypical amount of rollbacks. I thought at

Re: Proposal: deprecate and remove egg template loader

2015-07-13 Thread Curtis Maloney
so _that's_ why I've been adding zip_safe=False to all my setups for years :P +1 to encouraging the world to move forward :) -- Curtis On 14 July 2015 at 10:40, Russell Keith-Magee wrote: > > On Mon, Jul 13, 2015 at 11:00 PM, Donald Stufft wrote:

Re: Allauth user fields and userProfile fields save in one registrationform

2015-07-08 Thread Curtis Maloney
This is a list for discussion of the development _of_ Django, not development _with_ Django. This question is better suited to the django-users list. In general, if you need to edit two models in one form submission, you use two ModelForms... I have a blog post on this topic:

Re: Django urls and Angular ui-router

2015-07-01 Thread Curtis Maloney
This question really belongs on django-users ... this list is for discussion about the development _of_ Django, not _with_ django. That said, it's quite specific in Django that URLs do not map to Templates - they map to View functions. So, depending on your case you should easily be able to have

Re: Feature: Template Components

2015-06-09 Thread Curtis Maloney
This sounds a bit like combining django-sniplates with django-amn, and going a bit further... Fragments of templates, list of JS/CSS dependencies, and a way to collect it all together and ensure your page has everything you need... Sounds interesting to me... I'd be happy to collaborate on it

Re: Using `SECRET_KEY` in password hashers

2015-06-09 Thread Curtis Maloney
e current > implementation. So isn't this an improvement? > > On Tue, Jun 9, 2015 at 8:55 AM, Shai Berger <s...@platonix.com> wrote: > >> On Tuesday 09 June 2015 08:23:03 Ram Rachum wrote: >> > On Tue, Jun 9, 2015 at 8:22 AM, Curtis Maloney < >> cur...@acommoncreative.com

Re: Using `SECRET_KEY` in password hashers

2015-06-08 Thread Curtis Maloney
I think it'd royally screw you over if you ever had to change your secret key [due to suspected leak, for example] as now all your passwords are invalid. -- Curtis On 9 June 2015 at 15:16, Ram Rachum wrote: > Hi, > > What do you think about using the project's

Re: Feature: Support Server-Sent Events

2015-05-31 Thread Curtis Maloney
I think the real questions are: 1. What is stopping a 3rd party product from providing the features you want? If there is something Django can do to make it easier, point it out, and I'll gladly champion a good feature. 2. Why should your solution be the "blessed" solution? The discussion

Re: Why can't templates access properties

2015-05-26 Thread Curtis Maloney
Feel free to open a ticket, as it will give a place to retain the discussion. Perhaps start with the use case for having additional properties on a QuerySet :) -- Curtis On 27 May 2015 at 07:14, Ram Rachum wrote: > I found the cause of my problem:

Re: templates: override inner nested block

2015-05-24 Thread Curtis Maloney
Could you provide a solid, minimal example of how you get this case? I have seen duplicate rendering of nested blocks happen in the past, and it was because in the resulting template, two blocks wind up with the child defined in them [this actually lead to me writing a {% reuse %} tag to take

Re: Improving Test Speed for Projects that use django.contrib.postgres

2015-05-05 Thread Curtis Maloney
I looked into using UNLOGGED some time ago, but the create table method was misnamed, and the actual create table function was inflexible. Now the code is much cleaner, and each DB can specify how to enact create table and friends. Which leaves us with the question -- is it possible to alter the

Re: Unneeded index created with unique=True and db_index=False in TextField

2015-04-14 Thread Curtis Maloney
Was the OP referring to the unique index, or the index created for the LIKE lookups? I was involved in a discussion recently [was there something on list too?] wanting to be able to opt-out of the second index because they knew they didn't need it, and it was _huge_ on their database. -- C On

Re: Wsgi Traceback on Django 1.8

2015-04-08 Thread Curtis Maloney
At a guess, one of your views is returning a string instead of a HttpResponse object. This is the wrong forum for this question. This list is for discussing the development _of_ django, not _with_ django. Your question belongs in django-users. On 9 April 2015 at 14:56, wrote:

Re: Using AbstractBaseUser without django.contrib.auth

2015-04-01 Thread Curtis Maloney
Does your model inherit from PermissionsMixin? If you're using Admin, or any of Django's permissions machinery, you will need django.contrib.auth in there to use the Group and Permission models. -- Curtis On 2 April 2015 at 13:47, Dan Watson wrote: > While trying out

Re: GSOC: Turn contrib.admin into a customizable management interface

2015-03-24 Thread Curtis Maloney
Let's not get bogged down in minutiae just yet :) How to implement a grid and what level of browser support is something that can be threshed out in the process. I love the idea of a Dashboard with custom Widgets. Allowing the existing "App list" widgets, along with new custom non-model widgets

Re: URL matching problem

2015-03-23 Thread Curtis Maloney
Firstly, this is really a question for django-users ... this mailing list is for discussion of the development _of_ Django, not _with_ Django. On 24 March 2015 at 13:16, Ma Yuping wrote: > django V1.6.8 > > Let URL be: > > url(r'^blog/(?P\d+)/$', views.index,

Re: Composite fields

2015-03-18 Thread Curtis Maloney
Dev discussions typically happen on #django-dev on the Freenode IRC network. -- C On 18 March 2015 at 19:54, Thomas Stephenson wrote: > IRC discussion sounds fine with me, but I'd like to be involved. What's > the channel? > > Thomas > > On 18 March 2015 at 15:47, Asif

Re: About Class Based views

2015-03-17 Thread Curtis Maloney
people more readily grasp how all the pieces fit together, and where to hook in to get the results they want. -- C On 18 March 2015 at 10:19, Russell Keith-Magee <russ...@keith-magee.com> wrote: > > On Wed, Mar 18, 2015 at 5:38 AM, Curtis Maloney < > cur...@acommoncreative.com>

Re: About Class Based views

2015-03-17 Thread Curtis Maloney
I found when taking the CBGV session in MelbDjango School, it was best to approach teaching CBV as an exercise in Interfaces. Once the students were familiar with writing basic views, and the patterns therein, much of CBGV became "obvious", and the lesson focused more on the power of interfaces.

Re: GSoC 2015: Template engine optimisation

2015-03-12 Thread Curtis Maloney
I have convinced my self [with absolutely no hard evidence, just familiarity with the code] that the template engine is overly cautious when it comes to ensuring values are strings and are escaped properly. After a while I believe layers and layers of caution have accrued, and nobody is sure any

Re: Composite fields

2015-03-04 Thread Curtis Maloney
Have you reviewed all the existing works on trying to add composite fields? I know several managed to reach a level of maturity that was almost merge quality, and am sure I heard some of the recent ORM changes would ease support. On 5 March 2015 at 11:42, Thomas Stephenson

Re: Django Admin new look

2015-03-04 Thread Curtis Maloney
Looks pretty slick, but brings with it all the hassles of the past attempts to re-skin admin: it breaks legacy custom pages. I wish we could standardise a theming layer for admin... allow legacy templates, or switching to new, clean, themable templates... Perhaps this could be integrated with

Re: Extending the URL Dispatcher (GSoC 2015 proposal)

2015-03-02 Thread Curtis Maloney
On 3 March 2015 at 03:57, Marten Kenbeek wrote: > Hey all, > > I'm working on a proposal to extend the URL dispatcher. Here, I'd like to > provide a quick overview of the features I propose. > > I'd like to: > - Allow matching based on request attributes such as the

Re: Adding context to docs

2015-02-19 Thread Curtis Maloney
On 20 February 2015 at 11:49, Diana Probst wrote: > Never done either of those things, and I'm completely not set up to do > them. I will if creating this subject has made me the owner of it, but > it's a lot more work for me than it would be for someone else. I'd

Re: Adding context to docs

2015-02-19 Thread Curtis Maloney
In all cases in Django, if your code imports the class, you can put it wherever you like - so long as Python can find it. It's only things that are "discovered" by Django [admin, models, etc] that must be in a specific module. By convention, forms are put into forms.py ... but that's so _humans_

Re: Drop the TEMPLATE_DEBUG setting

2015-02-18 Thread Curtis Maloney
Just to chip in here... when TEMPLATE_DEBUG=True the template engine uses a substantially different Lexer, based on re.finditer() instead of re.split(). There are about 10 hooks in the Parser class, too, that exist almost exclusively to allow the DebugParser to change behavior. If we always

Re: JsonResponse and list values

2015-02-16 Thread Curtis Maloney
Cheers for the quick reply... well, you learn more about how shit JS is every day :P -- C On 17 February 2015 at 10:41, Florian Apolloner <f.apollo...@gmail.com> wrote: > > > On Tuesday, February 17, 2015 at 12:30:25 AM UTC+1, Curtis Maloney wrote: >> >> Ran into this

JsonResponse and list values

2015-02-16 Thread Curtis Maloney
Ran into this bug this morning... what's the rationale behind JsonResponse only accepting dict types unless you set safe=False to allow _any_ type? Surely list/tuple should also be permitted? There's a test explicitly ensuring lists fail. I'm not comfortable turning off ALL type safe-guards

Re: discontinue shipping tests with contrib apps?

2015-02-09 Thread Curtis Maloney
ate > "tests" directory. Or did I misunderstand what you meant? > > - Django REST framework > - django-nap > - the apps that split out from contrib (formtools, comments, localflavor) > > On Monday, February 9, 2015 at 5:28:22 PM UTC-5, Curtis Maloney wrote: >> &

Re: discontinue shipping tests with contrib apps?

2015-02-09 Thread Curtis Maloney
Just to shine a light on another perspective- I frequently tell people to look at contrib for "best practices", and including tests within a 3rd party app would fall under that. -- Curtis On 10 Feb 2015 03:34, "Marc Tamlyn" wrote: > +1 to removing tests from contrib

Re: new to django... looking to contribute to learn more

2015-02-08 Thread Curtis Maloney
t 13:21, Bob Remeika <bob.reme...@gmail.com> wrote: > Yeah I think so although I don't know enough about it to know for sure. > I'm hoping to come up with something rough and then get a little help from > people that know better. > > On Sunday, February 8, 2015 at 5:24:28 PM UTC

Re: new to django... looking to contribute to learn more

2015-02-08 Thread Curtis Maloney
Certainly sounds useful, and the research seems to suggest all (most?) of the major backends support it. -- C On 9 February 2015 at 11:26, Bob Remeika wrote: > Hi, > > I'm new to django and python in general but I've been a programmer for a > while now. > > I was

Re: Possible bug: makemigrations caching prior migrations after deletion

2015-02-08 Thread Curtis Maloney
Could you provide details about what sort of field you added, please? I have seen cases where migrations will create two separate migrations for an initial. -- Curtis On 9 February 2015 at 10:11, Yo-Yo Ma wrote: > Using Python 3.4.2 and Django @stable/1.8.x

Re: resurrecting an old friend, whitespace in forms, #6362

2015-02-04 Thread Curtis Maloney
I'm certainly leaning on the side of "strip by default" because, like many others, I feel it's the expected default -- users just don't get it -- and have been bitten by it before. I think I'll have a PR for this later tonight... -- Curtis On 5 February 2015 at 14:23, charettes

Re: intended security model for templates

2014-12-28 Thread Curtis Maloney
I certainly like the idea of making public the API to load your tag lib by default for your project. It's there, it's clean, and it's been stable for a looong time. Of course, the multi-template-engine work may change this. Also, I agree that "explicit is better than implicit", and thus

Re: intended security model for templates

2014-12-24 Thread Curtis Maloney
Personally I feel it's exposing too much implementation to the template authors. Whilst I can understand the appeal of allowing namespacing of template libs, I think exposing full python paths is the wrong approach. Perhaps allowing a "app_label:libname" approach to being more specific? --

Re: Overriding Class-based View Form Validation

2014-12-11 Thread Curtis Maloney
Firstly, I think this query really belongs in django-users ... this list is about development _of_ django, not _with_ django. Secondly, why not override get_form_kwargs [1] to add the user into creating the form class? But yes, validation all belongs inside the form class, ideally. [1]

Re: Status of #15619: logout via POST, but not GET

2014-12-03 Thread Curtis Maloney
Wasn't there a PR to turn all the auth views to CBV? That would implicitly enforce the behaviour to POST-only, I would hope. -- Curtis On 4 December 2014 at 09:52, Tim Graham wrote: > Hi Tim, > > There's an open pull request ,

Re: Template render performance

2014-11-18 Thread Curtis Maloney
It's been on my TODO list for some time to deep dive into DTL and find where I can to remove excess work. There's a LOT of defensive coding in there to ensure things are what we expect, and to handle cases "just in case", and I've a gut feeling [nothing more] that we can remove some of these

Re: Please add exists subquery to queryset api

2014-11-10 Thread Curtis Maloney
t; wrote: > Yes, the actual sql is very close to this one. But I just feel this > approach is like a hack. Because I always have to reverse the logic first > and then reverse again. Not as natural as exists subquery. > > On Monday, November 10, 2014 5:53:47 PM UTC-7, Curtis Maloney w

Re: South's --update equivalent for Django 1.7 migrations

2014-10-08 Thread Curtis Maloney
Since I didn't know about the update feature in South... can you explain how it would be different from migration squashing in 1.7? -- C On 8 October 2014 17:33, Petri Lehtinen wrote: > Hi! > > The database migration system in Django 1.7 is really great and > seems to work

Re: Storage engine aliases?

2014-10-02 Thread Curtis Maloney
On 2 October 2014 16:46, Jannis Leidel wrote: > > On 01 Oct 2014, at 14:33, Collin Anderson wrote: > > > In hindsight I regret not having pushed harder for integration of > staticfiles into core instead, lots of confusion could have been prevented, > IMO.

Re: Transaction management and atomic

2014-09-30 Thread Curtis Maloney
This is primarily a function of the DBMS. When your operations cause a DB-level error, the DB needs to roll back the transaction to clean up. If you don't, you're operating on an unknown state. Django can not control this beyond wrapping the "risky" operation in a transaction. Consider --

Re: Proposal: The 'use' template tag, a cross between 'include' and 'extends'.

2014-09-03 Thread Curtis Maloney
Interesting idea... so much so I'd like to steal it :) However, since it can be implemented as a 3rd party app, I suspect you'll get some push-back from trying to get it into core. I've recently started work to reimagine my "sniplates" project [ https://bitbucket.org/funkybob/django-sniplates],

Re: Please don't kill the ecosystem

2014-09-01 Thread Curtis Maloney
Mostly for clarity and historical purpose, I'd like to expand on the points you listed. Do not take this in any way as a dismissal of the issues you've raised. On 2 September 2014 06:45, Pkl wrote: > > Hello, > > I once was once lured to an ideal of long-term

Re: integrating django-secure

2014-08-27 Thread Curtis Maloney
For what it's worth, I agree with Russ. Having security as an optional extra [which is how it will look to outsiders] is a bad look for Django, and certainly doesn't fit with the "Secure by default" philosophy. -- Curtis On 28 August 2014 10:34, Russell Keith-Magee

Re: getting django 1.7 out the door

2014-08-15 Thread Curtis Maloney
On 15 August 2014 13:13, Collin Anderson wrote: > You rock, Andrew. > +1 > > On Thu, Aug 14, 2014 at 10:48 PM, Andrew Godwin > wrote: > > Solved it now! For those interested, deconstruct() was not including > > related_name, with the result that

Re: Requiring GitHub login for actions on Trac

2014-08-10 Thread Curtis Maloney
I ran into that exact problem when djangopackages changed... case mis-match meant it took months before I had access again. On 10 August 2014 09:35, Luke Granger-Brown wrote: > My only concern with this is the thing with the usernames, whereby some > people don't use the

Re: Requiring GitHub login for actions on Trac

2014-08-08 Thread Curtis Maloney
For what it's worth, I can understand the opposition to requiring a GH login [ostensibly a "coders" account] in order to make comments on tickets. However, if you're opinionated on a ticket you're either a coder, or feel strongly enough to overcome such a [low] hurdle. Still, options of more

Re: ORM Optimization for filtering by related existence

2014-08-08 Thread Curtis Maloney
Can you create a PR, with docs and tests? If not, we'll need to find someone brave enough to delve into the ORM and add this [quite valid, IMHO] optimisation. -- C On 8 August 2014 11:16, David Butler wrote: > > > On Thursday, August 7, 2014 6:48:22 PM UTC-5, Tim Graham

Re: Django and BREACH (remember that?)

2014-08-04 Thread Curtis Maloney
Stupid phone The reason for that cipher over xor was to avoid non printable characters. Any other solution is fine. Xoring the lower 4 bits reduced the entropy too much in my view. On Aug 5, 2014 6:11 AM, "Donald Stufft" wrote: > On August 3, 2014 at 9:48:53 PM, Adam Brenecki

Re: Django and BREACH (remember that?)

2014-08-04 Thread Curtis Maloney
As mentioned the cipher choice was mine. It was, also as mentioned On Aug 5, 2014 6:11 AM, "Donald Stufft" wrote: > On August 3, 2014 at 9:48:53 PM, Adam Brenecki (adambrene...@gmail.com) > wrote: > > The patch I've written implements this mitigation, with one difference: > >

Re: 1.7 release status (RC2 coming soon)

2014-07-24 Thread Curtis Maloney
And for those who want to test, remember to use: pip install git+https://github.com/django/django.git@stable/1.7.x to ensure you're testing against 1.7 and not dev :) -- Curtis On 25 July 2014 09:42, Tim Graham wrote: > 2 weeks later and we still have a fairly

Re: Ability to use method based routing

2014-07-18 Thread Curtis Maloney
Sounds like you're heading for a cleaner version of the Publisher pattern in django-nap...? On 18 July 2014 07:34, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Hello, > > Currently implementing a method dispatcher (e.g. a single URL that > goes to

Re: [GSOC] Weekly update

2014-07-05 Thread Curtis Maloney
Can I ask as a favour to future works that you record all the performance tuning approaches you use? Many of these will be obvious to seasoned Python programmers, but some of them won't be, and it would be nice to have a catalogue of "things to look out for" to apply to critical paths in Django.

Re: collectstatic - override default ignore list

2014-07-02 Thread Curtis Maloney
OT...just writing down this which came to me on the train this morning as I read this thread Does anyone else foresee the practice of having an "appconfig.py" full of subclasses of AppConfigs becoming common? Seems like a nice parallel to settings, allowing a project to specify per-app config

Re: Regression in ValidationError in 1.7

2014-06-27 Thread Curtis Maloney
Am I reading this right as "people used to commonly solve this problem by using an internal API, but now we have a public one... AND the old internal API is now changed"? If so, the solution seems obvious -- document that it's time to move the the official solution :) -- Curtis On 27 June

Re: [GSOC] Weekly update

2014-06-21 Thread Curtis Maloney
Is there somewhere I can look at your work in progress code? On 21 June 2014 19:57, Daniel Pyrathon wrote: > Hi All, > > This week I have done the following > > *- Openend PR and merged Options (_meta) unittests* > https://github.com/django/django/pull/2823 > This is a

Re: Building a library of SQL functions into Django

2014-06-18 Thread Curtis Maloney
Would it be possible to have some sort of registration pattern, allowing people to import per-backend and per-project libs to override and extend the various available functions? I realise this is nothing more than a sanctioned form of monkey patching, but it would at least provide a common

Re: Integrating polymorphic queries in the framework

2014-06-06 Thread Curtis Maloney
Hosted version of the talk: http://www.roadside-developer.com/talks/2013-12-12_MelbDjango_MTI.Performance/#/ [Thanks, Brenton!] -- Curtis On 7 June 2014 11:52, Curtis Maloney <cur...@acommoncreative.com> wrote: > Can I draw your attention to Sebastian Vetter's investigation of the &

Re: Integrating polymorphic queries in the framework

2014-06-06 Thread Curtis Maloney
Can I draw your attention to Sebastian Vetter's investigation of the relative scalability of different model polymorphism approaches : https://github.com/elbaschid/talks/tree/master/2013-12-12_MelbDjango_MTI.Performance Basically, the "select_related then resolve" approach [used in

Re: Revisiting multiline tags

2014-04-15 Thread Curtis Maloney
to collect and organize thoughts >> in one place, not to be a "we will definitely do this" feature plan. >> > > > Understood, a DEP can be accepted or rejected. > > On Wednesday, April 16, 2014 10:48:22 AM UTC+7, Curtis Maloney wrote: > >> I'm happy to co

Re: Revisiting multiline tags

2014-04-15 Thread Curtis Maloney
I'm happy to coalesce this into a DEP... is there a format template I can follow? On 16 April 2014 13:46, Russell Keith-Magee wrote: > On Wed, Apr 16, 2014 at 11:36 AM, Adrian Holovaty > wrote: > > Hey, may I suggest writing this up using our new

Re: Revisiting multiline tags

2014-04-11 Thread Curtis Maloney
Would it help if I said please? On 4 April 2014 11:29, Curtis Maloney <cur...@acommoncreative.com> wrote: > Have any of you tested my code which gives you multi-line tags? > > I'd be interested in hearing how it fares "in the real world" > > -- > C >

Re: Revisiting multiline tags

2014-04-03 Thread Curtis Maloney
Have any of you tested my code which gives you multi-line tags? I'd be interested in hearing how it fares "in the real world" -- C On 4 April 2014 01:52, dude wrote: > More useful example is not ‘very long with’, just a situation with html > code block, which have in left

Re: Proposal for prepared statements API

2014-03-27 Thread Curtis Maloney
On 27 March 2014 19:11, VernonCole wrote: > There was a recent query about prepared statements on the db-sig mailing > list, too. Apparently thought is being given to adding such functionality > to Psycopg. If such functionality is added, it could be useful to support, > I

Re: Add support for get_or_none?

2014-03-26 Thread Curtis Maloney
You could (ab)use MethodType to add a new method to the class, but you'd want to make sure the Manager was using a custom QuerySet first [or force it to if it weren't] so as not to alter it for all default Managers. Just my 0.02 units of currency. -- C On 26 March 2014 19:26, Anssi Kääriäinen

Re: Proposal for prepared statements API

2014-03-25 Thread Curtis Maloney
On 26 March 2014 10:10, Florian Apolloner <f.apollo...@gmail.com> wrote: > On Tuesday, March 25, 2014 11:57:51 PM UTC+1, Curtis Maloney wrote: >> >> Firstly -- can we assume anyone using this feature is not a complete >> novice, and so will take the caveats m

Re: Proposal for prepared statements API

2014-03-25 Thread Curtis Maloney
Firstly, I mostly proposed this API in response to others calls for it. Yes, I'd love to have it, but I'm content to leave it in the "too hard" basket. That said, it doesn't mean I'm not going to try to solve these issue :) So: Firstly -- can we assume anyone using this feature is not a

Proposal for prepared statements API

2014-03-25 Thread Curtis Maloney
I've been discussing this idea for some time now, and was reminded of it recently... and akaariai has pushed me to put forward this proposal. Prepared Statements. The benefit of prepared statements, for those who don't know, is it avoids repeating the time the Query Planner in the DBMS takes to

Re: django.utils.functional.cached_property

2014-03-19 Thread Curtis Maloney
On 20 March 2014 08:58, Florian Demmer wrote: > > > On Thursday, August 8, 2013 6:59:14 PM UTC+2, Łukasz Rekucki wrote: >> >> Hi, >> >> I have some minor nitpicks: >> >> 1. Unlike the standard @property, the current implementation of >> @cached_property doesn't allow for a

Re: Revisiting multiline tags

2014-03-09 Thread Curtis Maloney
I've broken, and how much I've altered template parsing performance :) -- Curtis On 9 March 2014 20:47, Curtis Maloney <cur...@acommoncreative.com> wrote: > To try to help the wider community know to contribute comments, I've > included this thread in the latest Django Update. >

Re: Revisiting multiline tags

2014-03-09 Thread Curtis Maloney
To try to help the wider community know to contribute comments, I've included this thread in the latest Django Update. My personal stance is -- I know I can add this to the template code trivially (See my django-contemplation sandpit). However, I'm not certain: a) What performance impact it may

Re: my admin theme

2014-03-03 Thread Curtis Maloney
Was just looking at your site... and it looks slick (love admin-tools Menus), but some of the deps worry me. BeautifulSoup? ADMINTOOLS_BOOTSTRAP_SITE_LINK = '/' Why is this special? Why doesn't it use staticfiles like everything else? IMHO the problems with admin go much deeper than the

Re: #20824 - Email-based auth contrib module; some help required

2014-02-26 Thread Curtis Maloney
Doesn't the UserManager already have a "normalize_email" method which lower-cases the domain and leaves the mailbox name alone? IMHO It's "proper" to leave it this way by default, and probably mention in the docs it's used so if you want to change it, that's the hook. [We went through this

Re: [GSoC] Switching to Jinja2 proposal

2014-02-25 Thread Curtis Maloney
gt; > > On Tuesday, February 25, 2014 8:34:14 AM UTC+1, Curtis Maloney wrote: >> >> Did I miss the link to your benchmark code? >> Does it time just rendering, or parsing also? >> -- >> Sent from my Android device with K-9 Mail. Please excuse my brevity. >>

Re: [GSoC] Switching to Jinja2 proposal

2014-02-24 Thread Curtis Maloney
On February 25, 2014 9:43:49 AM AEDT, Christopher Medrela wrote: >I've made some benchmarks. The results are: > >jinja2 empty for 0.028 s >jinja2 include1.094 s >django empty for 0.435 s >django include2.134 s > >Where "empty for" is an empty loop repeated 50

Re: [GSoC] Switching to Jinja2 proposal

2014-02-24 Thread Curtis Maloney
I must admit to being conflicted on this project. I'd love to see the measurements and profiling involved in establishing how much "faster" Jinja2 is, mostly to see where DTL could do with some love... However, I don't believe for most people their templates represent enough of a time cost to

Re: GSoC 2014 idea proposal

2014-02-23 Thread Curtis Maloney
I think the most commonly requested feature is how to serilise non-Field properties of models. It's easy, but tedious, to do. Perhaps you could write a mixin to help with this, and improve the documentation? However, I don't see this being a task taking more than a few days... -- Curtis On

Re: [GSoC] Switching to Jinja2 proposal

2014-02-12 Thread Curtis Maloney
At this point someone should start asking for real-world examples with measurements. I'm personally of the "let's see if we can improve DTL first, then revisit the question" stance. But in order to show any improvements, we must have timings for the current tool. Can people who've suffered

Re: [GSoC] Switching to Jinja2 proposal

2014-02-10 Thread Curtis Maloney
On 11 February 2014 12:31, Luke Sneeringer wrote: > On Feb 10, 2014, at 12:16 PM, Carl Meyer wrote: > > It's a problem that we are unable to do things > that would otherwise be no-brainers (e.g. rendering form widgets using > templates rather than by

Re: [GSoC] Switching to Jinja2 proposal

2014-02-08 Thread Curtis Maloney
Can I suggest a 3) to this? After getting involved with the internals of the template engine recently, I came to the suspicion that a lot of the speed issues come from highly defensive coding. Now, this is generally to be expected when safety is more important than speed, but I am moderately

Re: Check Framework Feedback

2014-02-05 Thread Curtis Maloney
I disagree. If a hint really ought be provided, but can be omitted in the right circumstances, it should be a required value. This will encourage people to provide a hint, or deliberately omit one. Seems more Explicit and Implicit to me... explicit intention to omit a hint? -- Curtis On 6

Re: [ANNOUNCE] Django 1.7 alpha 1 released

2014-01-22 Thread Curtis Maloney
This is a huge release, folks! Lots of big ticket items. Lots of lovely toys for everyone to play with:) And still very backward compatible? I reckon you'll have the beta out before I've even finished playing with everything... Power on, people! Keep up the massive works! -- Curtis On 23

<    1   2   3   >