Re: Adding a OneToMany Relationship to Django

2013-07-10 Thread Curtis Maloney
I've seen enough people in #django suffering because they need a FKey on a table they simply can't alter -- be it because it's in a 3rd party app, or simply a table their DBA won't permit them to alter, or what have you. In the end they wind up having to create the equivalent of a m2m through

Re: Proposal: make Model __unicode__() default to self.name

2013-07-10 Thread Curtis Maloney
Luke beat me to it... We have a couple of abstract models which will fall through a small list of field names, trying to guess a useful default for __str__ ... but it makes me feel dirty every time I see it. Beyond "blessing" a particular (set of?) field names as default str names... this also

Re: Deprecate FCGI support in Django 1.7

2013-07-14 Thread Curtis Maloney
SGI library built that supports Django, we're just closing the door on this avenue... [I say this despite my personal loathing of HostGator... :)] -- Curtis Maloney On 15 July 2013 11:35, gilberto dos santos alves <gsa...@gmail.com> wrote: > i start 2 months ago using fcgi inside an

Re: Hybrid Property request

2013-07-17 Thread Curtis Maloney
On 17 July 2013 21:18, Jonathan Slenders wrote: > This is really nice. Both have their use cases, but I'm prefering the > second when possible, because it's much more flexible and preserves > database consistency. > With the same efford you can make the following

Re: Deprecate FCGI support in Django 1.7

2013-07-18 Thread Curtis Maloney
ble. And by "help", it could just be as much as feature requests, documentation, or testing [always testing! :)] -- Curtis Maloney On 19 July 2013 08:53, Javier Guerra Giraldez <jav...@guerrag.com> wrote: > On Thu, Jul 18, 2013 at 5:30 PM, Juan Luis Boya <ntr...@gmail.com>

Re: Deprecate FCGI support in Django 1.7

2013-07-20 Thread Curtis Maloney
I'm more or less building atop flup as it is, however I plan to shed anything not related to FastCGI. For me it's a chance to get down and dirty with raw protocols again... I do agree there is a shorter path to just applying Django's "fixes" to a fork of flup. -- Curtis On 19 July 2013 22:14,

Re: Deprecate FCGI support in Django 1.7

2013-07-20 Thread Curtis Maloney
Juan, technically Django isn't a server at all... whether it's sync, async, multi-threaded, multi-process, or a mix of any of them is up to the wsgi publisher used. Take, for example, gunicorn, which can be any of the above, with options to plug in others when they're thought up. -- Curtis On

Re: Deprecate FCGI support in Django 1.7

2013-07-20 Thread Curtis Maloney
On 21 July 2013 02:30, Some Developer <someukdevelo...@gmail.com> wrote: > On 20/07/2013 14:02, Curtis Maloney wrote: > >> I'm more or less building atop flup as it is, however I plan to shed >> anything not related to FastCGI. >> >> For me it's a chance to g

Re: Deprecate FCGI support in Django 1.7

2013-07-21 Thread Curtis Maloney
My understanding was Django is a WSGI application, and as such its role is to process requests handed to it. It isn't the server as such. It's the role of a WSGI publisher to accept requests and pass them on to an appropriate handler. So, uWSGI, gunicorn, flup and mod_wsgi as the Publishers we

Re: Deprecate FCGI support in Django 1.7

2013-07-22 Thread Curtis Maloney
Well, having started looking over the flup source, I can see a lot of useful code to crib, as well as a few critical path bits that can be optimised [without even reducing readability!] So, if you feel like helping out with django-fastcgi ... I'm happy for the help :) -- Curtis On 23 July

Re: Deprecate FCGI support in Django 1.7

2013-07-23 Thread Curtis Maloney
ot;django-fastcgi"? I think it > should most likely be a generic wsgi to fastcgi binding, right? Or is this > project mainly the django management commands? > On Jul 22, 2013 8:07 PM, "Curtis Maloney" <cur...@acommoncreative.com> > wrote: > >> Well, h

Re: Streaming sitemaps

2013-07-25 Thread Curtis Maloney
layer would also mitigate the problem. -- Curtis Maloney On 25 July 2013 23:51, Benjamin Wohlwend <piquad...@gmail.com> wrote: > Hi Julian, > > after having a site almost taken down by an over-eager spider downloading > the sitemaps dozens of times in parallel, I learned the

Re: Streaming sitemaps

2013-07-25 Thread Curtis Maloney
ect.com/ticket/13910 > > On Friday, 26 July 2013 10:20:06 UTC+10, Curtis Maloney wrote: > >> We ended up splitting out sitemaps up... and caching them heavily. >> Pre-generating periodically would be equally effective. >> >> I can, however, see the merit in a

Re: Security Advisory: BREACH and Django

2013-08-07 Thread Curtis Maloney
be retrieved by simply xoring it with the salt. The salt is changed every request. -- Curtis Maloney On 7 August 2013 16:56, simonb <bno...@gmail.com> wrote: > How about requiring that if csrfmiddlewaretoken is set, no matter what > http method (GET, POST...), it is correct otherwise

Re: django.utils.functional.cached_property

2013-08-07 Thread Curtis Maloney
On 8 August 2013 09:31, Russell Keith-Magee wrote: > On Wed, Aug 7, 2013 at 8:10 PM, Daniele Procida wrote: > >> On Wed, Aug 7, 2013, Aymeric Augustin >> wrote: >> >> >The main drawback of the current implementation

Re: Usage and documentation of F()

2013-08-17 Thread Curtis Maloney
If, at the same time, perhaps ExpressionNode got a mention too, that could really open up some opportunities :) On 17 August 2013 21:17, Some Developer wrote: > On 14/08/13 10:05, Marc Tamlyn wrote: > >> (Disclaimer: I didn't write any of this code, I'm just working

Re: Usage and documentation of F()

2013-08-19 Thread Curtis Maloney
ther handy "SQL Standard" functions/expressions are there that people would love to use? -- Curtis On 20 August 2013 02:40, Andre Terra <andrete...@gmail.com> wrote: > > On Sat, Aug 17, 2013 at 10:22 PM, Curtis Maloney < > cur...@acommoncreative.com> wrote: > >

More input on #20945

2013-08-21 Thread Curtis Maloney
Was just after some more eyes and opinions on https://code.djangoproject.com/ticket/20945 Current PR is at: https://github.com/django/django/pull/1490 This patch does two things: 1) it allows specifying on a {% cache %} tag which cache to use {% cache . using="cachename" %} 2) it makes

Re: get_cache and multiple caches

2013-08-30 Thread Curtis Maloney
As a simple short-term solution, why not cache calls to get_cache that don't pass additional arguments? That is, ones that only get pre-configured caches. -- Curtis On 25 August 2013 23:26, Florian Apolloner wrote: > Hi, > > so when reviewing

Re: get_cache and multiple caches

2013-08-31 Thread Curtis Maloney
I've a possible solution - https://github.com/funkybob/django/compare/simple_caches Basically, the existing API and behaviours are still available through get_cache, but you can avoid duplicate instances of caches using django.core.cache.caches[name] -- Curtis On 31 August 2013 15:44, Curtis

Re: Circular dependency in forms+views+models

2013-09-01 Thread Curtis Maloney
Given both the docs for get_absolute_url and reverse demonstrate using string references only, I think adding in clarification of why it's preferred is worthwhile. I still find it surprising how often I need to tell people on #django to not import models just to reference them in relation

Re: get_cache and multiple caches

2013-09-01 Thread Curtis Maloney
> > > On Sunday, September 1, 2013 4:34:54 AM UTC+2, Curtis Maloney wrote: >> >> I've a possible solution - https://github.com/funkybob/** >> django/compare/simple_caches<https://github.com/funkybob/django/compare/simple_caches> >> >> Basically, the existin

Re: Support POST of application/json content type

2013-09-03 Thread Curtis Maloney
What do people think of an extensible registration approach to handling request content types? Something along the lines of ('POST', [list of content types], class to handle it) This would mean adding a request.JSON would be simple for the projects that want it, and even overriding how the

Re: Support POST of application/json content type

2013-09-03 Thread Curtis Maloney
Someone remind me never to post to list before I've had my second coffee? :) Of course the above would trivially be handled using middleware. -- C On 4 September 2013 10:05, Curtis Maloney <cur...@acommoncreative.com>wrote: > What do people think of an extensible registration

Re: Support POST of application/json content type

2013-09-04 Thread Curtis Maloney
To weight in from an author of a different API tool In django-nap there's a simple "get_request_data" method which, essentially, determines how to parse the request according to the content type. However, currently each API only supports a single serialiser format [and HTTP Form encoding] so

Re: Thinking about NoSQL support

2013-09-05 Thread Curtis Maloney
Well, there was the django-nonrel project, for trying to wrap non-relational stores [such as Mongo] in a faux relational layer, so they could then be wrapped in the ORM. Always felt like a tremendous waste of resources to me -- why use a non-relational store just to pretend it _is_ one? My view

Re: Thinking about NoSQL support

2013-09-05 Thread Curtis Maloney
> > > > I wish people would stop abusing the term "NoSQL". Your target concept > is > > Non-Relational data stores, not SQL itself. There's a whole bunch of > > relational stores that don't use SQL, one of them is even called NoSQL!) > > > > to me, "Non-Relational data stores" still sounds as

Re: Support POST of application/json content type

2013-09-09 Thread Curtis Maloney
On 9 September 2013 19:50, S Berder wrote: > Gents, > to sum it up, arguments made and details of how I see the > implementation of a response/request encode/decode framework: > > * need a pluggable interface so current content-types are supported >

Re: Benchmarking 1.5 vs 1.6

2013-09-14 Thread Curtis Maloney
Hey, thanks for that! It would be nice to have something that would chart this over time... something like some people have set up for GCC. I've never been able to get djangobench to give meaningful results, otherwise I'd do it. Mmm... perhaps I've just found a use for my odroid :) -- Curtis

Re: Idea about authentication

2013-09-15 Thread Curtis Maloney
Actually, you'd just speed up their attack, since most failed attempts would be quicker than others. If you look in the crypto utils, you'll see a "constant time compare" ... this is a common thing in crypto circles to avoid leaking "how close" the guess was by how quickly the mismatch was found.

Re: Benchmarking 1.5 vs 1.6

2013-09-15 Thread Curtis Maloney
nssi.kaariai...@thl.fi>wrote: > On Sunday, September 15, 2013 3:13:09 AM UTC+3, Curtis Maloney wrote: >> >> Hey, thanks for that! >> >> It would be nice to have something that would chart this over time... >> something like some people have set up for GCC. >&

Re: get_cache and multiple caches

2013-09-18 Thread Curtis Maloney
red caches, and retain get_cache for the old, ad-hoc, non-shared caches. -- Curtis On 7 September 2013 22:32, Florian Apolloner <f.apollo...@gmail.com> wrote: > Hi, > > > On Monday, September 2, 2013 6:39:09 AM UTC+2, Curtis Maloney wrote: >> >> Whilst it's conceivable

Re: Is "transaction.atomic" in 1.6 supposed to work this way?

2013-09-19 Thread Curtis Maloney
I feel compelled to comment here... On 20 September 2013 09:32, Richard Ward wrote: > > I don't think that what I was trying to do (continue using a transaction > after an insert failed) was too outlandish. I'm not demanding that Django > should allow me to do it (tho

Re: get_cache and multiple caches

2013-09-20 Thread Curtis Maloney
September 2013 01:33, Florian Apolloner <f.apollo...@gmail.com> wrote: > Hi, > > > On Wednesday, September 18, 2013 1:29:25 PM UTC+2, Curtis Maloney wrote: >> >> 1) Can we share "ad-hoc" caches -- that is, ones created by passing more >> than just the

Re: get_cache and multiple caches

2013-09-20 Thread Curtis Maloney
Yeah... simpler solution is simpler :) -- C On 20 September 2013 17:04, Florian Apolloner <f.apollo...@gmail.com> wrote: > > > On Friday, September 20, 2013 8:58:25 AM UTC+2, Curtis Maloney wrote: >> >> I guess the remaining question to address is : close()

Re: Default session data serializer doesn't support extended data types

2013-09-20 Thread Curtis Maloney
I talked with the OP [or someone who talks a _lot_ like the OP:)] on IRC about this issue before recommending they open a ticket... and aside from anything else discussed, since someone already saw fit to include an extended JSONEncoder class in core/serializers, why doesn't the session machinery

Re: get_cache and multiple caches

2013-09-20 Thread Curtis Maloney
OK. So the goals of this effort are: 1) to avoid resource over commitment [e.g. too many connections] 2) to help relieve the burden of concurrency from the cache backends. Issues to avoid are: a) TLS is "slow" (citation, please?) b) New API better damn well be worth it! Is there anything else?

Re: IRC users invited to support PyCon UK Django sprinters

2013-09-23 Thread Curtis Maloney
Congratulations on such a successful sprint! I'm about to run our next HackFest, and know something of how difficult it can be to organise something like this. I can only hope ours is anywhere near as productive and (I assume) satisfying as yours has been! -- Curtis On 24 September 2013

Re: Bacwards incompatibility of #20346 cache middleware should vary on full URL

2013-10-22 Thread Curtis Maloney
If all it meant was that currently cached content would effectively be expired, I wouldn't see this as being anything more than an strong note. But as I'm sure people have created their own tools for building the page cache keys to forcibly expire them [and not yet taken advantage of that

Re: How do features get decided for a release?

2013-10-23 Thread Curtis Maloney
Hi Cody, I suspect many of your questions may be answered in the documentation here: https://docs.djangoproject.com/en/1.5/internals/release-process/ Here's some comments from my experience with using django since its initial release, and recently making a concerted effort to submit code. On

Re: Add a generic "getter" filter to the built-in library

2013-11-03 Thread Curtis Maloney
Since we're on the topic after some goading from loic I did figure out a backward-compatible way to add call arguments to the filter expression syntax. Essentially, you distinguish between foo|filter:arg and foo|filter(arg...) by looking for : or ( The same parsing could let you have dict

Re: ManyToMany relationship can't be saved

2013-11-21 Thread Curtis Maloney
At first glance, I'd guess it's because the PK for ringo and beatles haven't been updated in the instances you have. On 22 November 2013 16:31, Adam Smith wrote: > As I was learning the Django Docs ( >

Re: Query against MySQL database much slower than Postgres using ORM

2013-11-22 Thread Curtis Maloney
glaring for such a simple query. It usually takes a join or three before the query planner shows its limits. -- Curtis Maloney On 23 November 2013 07:50, Jeff Tchang <jeff.tch...@dishcrawl.com> wrote: > Hi, > Can anyone help with figuring out why basic select queries using the > Dja

Re: Self-referenced template recursion handling

2013-12-08 Thread Curtis Maloney
unai wrote: >Hello, > >> given this approach, what if the third party app wants to self-extend >> a django admin template for example? > >I'm working on an other solution that instead of relying on loader >skipping >relies on template skipping. > >Imagine you extend to a

Periodic Updates

2013-12-09 Thread Curtis Maloney
as posts on the mailing list, but of course it would also help if I could contact people directly... so if you want to be included, drop me a line :) -- Curtis Maloney -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from

Re: Problem with number format when not using L10N

2013-12-19 Thread Curtis Maloney
I recall helping someone on #django with something similar to this, where the documentation, logical expectations and actual code went in rather different directions. There was a condition where despite the setting being observed at one layer, a lower layer then went and ignored it anyway... will

Registering signal handlers

2013-12-22 Thread Curtis Maloney
Reading the posts on App reconfigure reminded me I wanted to raise this for discussion. Recently we've been suffering circular imports, and the majority are, IMHO, caused by people importing "receivers" in the apss __init__.py. By convention [in our app, at least] "receivers.py" registers all

Re: Registering signal handlers

2013-12-22 Thread Curtis Maloney
mport issues. > > It seems providing a reliable initialization signal is one of Aymeric's > main goal. > > Simon > > Le dimanche 22 décembre 2013 03:22:29 UTC-5, Curtis Maloney a écrit : > >> Reading the posts on App reconfigure reminded me I wanted to raise this &g

Re: Forbidding double imports

2014-01-04 Thread Curtis Maloney
I submitted a patch some time ago to do a small part of this, on models, but it was rejected... As a long time loather of overlapping import paths, I'm with Florian on this one :) [Oh, and the layout change was 1.4, not 1.3 :) ] -- Curtis On 5 January 2014 09:24, Florian Apolloner

Re: Renaming apps.has_app

2014-01-05 Thread Curtis Maloney
On 6 January 2014 10:11, Shai Berger wrote: > On Sunday 05 January 2014 23:26:12 Aymeric Augustin wrote: > > If I were to add magic methods on the app registry I’d probably make it a > > dict of app_label => app_config. This is the most common use case. > > > > Then it would

Re: CAS in cache framework

2014-01-17 Thread Curtis Maloney
Is it CAS specifically that you want? Or a Locking primitive? Or some other operation? -- Curtis On 18 January 2014 12:45, Russell Keith-Magee wrote: > > I can't see any reason that we *shouldn't* support it - it seems like a > reasonable primitive to support. > >

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

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: [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: [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-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 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-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] 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-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: #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: 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: 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: 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: 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

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: 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

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: 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-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: 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: 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-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-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: 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: 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: 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: [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: 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: 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: [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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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? --

  1   2   3   >