Re: Master/slave trolling pull request accepted to django master branch

2014-08-14 Thread Cal Leeming [iops.io]
Ah yes, such a brilliant way to engage legitimate concerns from community. *slow caps* I'm out, it's been a fun 5 years guys, take care. Cal On Thu, Aug 14, 2014 at 7:18 PM, Tim Graham wrote: > This topic is closed and no replies will be tolerated. There are plenty of > Trac tickets that coul

Re: Ability to use method based routing

2014-07-18 Thread Cal Leeming [Simplicity Media Ltd]
ing such a feature. Cal On Fri, Jul 18, 2014 at 1:55 PM, Curtis Maloney wrote: > 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] > wrote: >> >>

Ability to use method based routing

2014-07-17 Thread Cal Leeming [Simplicity Media Ltd]
Hello, Currently implementing a method dispatcher (e.g. a single URL that goes to different views based on HTTP method) is not feasible because it will break decorators. For example: https://djangosnippets.org/snippets/2041/ In theory you could use middleware to store the request object inside t

Re: Terms for database replication

2014-06-05 Thread Cal Leeming [Simplicity Media Ltd]
Yup, the BDFL is still strong in this one ;) Cal On Thu, Jun 5, 2014 at 6:50 PM, Alex Gaynor wrote: > Hi everybody. > > The Django core developers have made our decision on the terminology we're > going to use; I'd ask that you stop using django-developers to debate this > further. > > Alex >

Re: Terms for database replication

2014-06-05 Thread Cal Leeming [Simplicity Media Ltd]
For once, I'm going to +1 you Tom. Cal On Thu, Jun 5, 2014 at 2:52 PM, Tom Evans wrote: > Please revert this change as soon as possible. > > If the project has become so PC sensitive that the word "slave" is no > longer permitted to be uttered, then "replica" is an alternate term, > but "prima

Re: That's enough.

2014-05-28 Thread Cal Leeming [Simplicity Media Ltd]
hat way, Cal; your contributions have been >> appreciated, and I've personally appreciated having you around. Thanks for >> all you've done. >> >> If you ever feel up to sharing with me more specifics, so perhaps we can >> try to change things to be more

That's enough.

2014-05-27 Thread Cal Leeming [Simplicity Media Ltd]
I remember the first day that I discovered Django after moving from CI (PHP) back in 2009, it opened me up to a whole new world of design principles and ideas that I hadn't even considered before. The community was absolutely fantastic, I took huge pleasure in helping other people with their probl

Re: Great Wall of DEP

2014-05-08 Thread Cal Leeming [Simplicity Media Ltd]
I have to agree that the decentralized nature of the mailing list would probably stand the test of time a bit better, plus the ability to in-line reply makes larger discussions easier on the eyes. In reference to OPs original comments; Enhancement proposals are a great idea, but ultimately they wi

Re: Docs relating to splitting test files

2014-05-03 Thread Cal Leeming [Simplicity Media Ltd]
Thanks for letting me know, my eyes probably glazed over that paragraph, which is my own fault for not reading the docs more carefully XD Sorry for wasting time Cal On Fri, May 2, 2014 at 9:52 PM, Chris Beaven wrote: > On Saturday, May 3, 2014 6:10:39 AM UTC+12, Cal Leeming [Simplicity Me

Docs relating to splitting test files

2014-05-02 Thread Cal Leeming [Simplicity Media Ltd]
Hello, Please see the following discussion; http://stackoverflow.com/questions/5160688/organizing-django-unit-tests/20932450#20932450 This approach seems to work fine, but doesn't appear to be mentioned anywhere in the Django docs (or at least, I couldn't see it). Would this be a valid candidate

Re: Add support for get_or_none?

2014-03-28 Thread Cal Leeming [Simplicity Media Ltd]
mars 2014, at 22:28, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote: > > > So is that a "no" to the docs patch proposal? > > It isn't. Like I said, I really don't care. If someone wants to commit > something, that's

Re: Add support for get_or_none?

2014-03-28 Thread Cal Leeming [Simplicity Media Ltd]
So is that a "no" to the docs patch proposal? Cal On Fri, Mar 28, 2014 at 8:52 PM, Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote: > Hello, > > I'm not sure this thread is going anywhere and I don't care either way. > If you've been reading up to this point... > > ... either you h

Re: Add support for get_or_none?

2014-03-27 Thread Cal Leeming [Simplicity Media Ltd]
On Thu, Mar 27, 2014 at 1:10 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > > On Wed, Mar 26, 2014 at 8:19 PM, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote: > >> >> >> >> On Tue, Mar 25, 2014 at

Re: Add support for get_or_none?

2014-03-26 Thread Cal Leeming [Simplicity Media Ltd]
On Tue, Mar 25, 2014 at 11:40 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > > On Thu, Mar 20, 2014 at 9:31 PM, Florian Apolloner > wrote: > >> On Thursday, March 20, 2014 2:01:25 PM UTC+1, Cal Leeming [Simplicity >> Media Ltd] wrote: >>> &g

Re: Add support for get_or_none?

2014-03-25 Thread Cal Leeming [Simplicity Media Ltd]
That's actually not a bad idea at all, much better than get_or_none(). Cal On Tue, Mar 25, 2014 at 7:20 AM, Cheng Chi wrote: > What about name it fetch()? > > > On Friday, March 14, 2014 3:45:31 AM UTC+11, Cal Leeming [Simplicity Media > Ltd] wrote: >> >>

Re: Add support for get_or_none?

2014-03-20 Thread Cal Leeming [Simplicity Media Ltd]
t; either if >> you want to use your model with the current get_or_create function, so >> naming a keyword argument like that is not that uncommon. >> >> >> On Sunday, March 16, 2014 6:39:47 PM UTC+1, Cal Leeming [Simplicity Media >> Ltd] wrote: >> >>>

Re: Add support for get_or_none?

2014-03-16 Thread Cal Leeming [Simplicity Media Ltd]
ichael Manfre wrote: > > Good point. I forgot that some people would do that. > > > > > > On Fri, Mar 14, 2014 at 11:52 AM, Florian Apolloner > > > > wrote: > > > On Friday, March 14, 2014 4:50:49 PM UTC+1, Michael Manfre wrote: > &g

Re: Add support for get_or_none?

2014-03-14 Thread Cal Leeming [Simplicity Media Ltd]
> > .get(or=None) (of some description) would be my preference, but even that > is ugly and confuses the existing API with "special" keywords that aren't > actually a filter. > I would be strong -1 on having a special keyword. > > So, I take back my +1. >

Re: Add support for get_or_none?

2014-03-14 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Mar 14, 2014 at 12:41 PM, Shai Berger wrote: > On Thursday 13 March 2014 14:34:18 Josh Smeaton wrote: > > +1 on get_or_none. It seems to be a pattern that comes up quite a lot in > > user code, and I know I've had use for it lots of times. > > Since 1.6, you should just be using first().

Re: Add support for get_or_none?

2014-03-14 Thread Cal Leeming [Simplicity Media Ltd]
ake sense to > implement on the manager, but the name doesn't "fit" with the other methods > available, so perhaps it'd be better to match it up with get_or_create as a > simple shortcut. > > Josh > > > On Friday, 14 March 2014 04:48:16 UTC+11, Cal Lee

Re: Add support for get_or_none?

2014-03-13 Thread Cal Leeming [Simplicity Media Ltd]
s > only natural to allow that for `.get_or_none()`. > > > On Thu, Mar 13, 2014 at 10:26 AM, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote: > >> Just read through all those threads/tickets, here's my conclusion. >> >> #2

Re: Add support for get_or_none?

2014-03-13 Thread Cal Leeming [Simplicity Media Ltd]
Mar 13, 2014 at 5:05 PM, Shai Berger wrote: > On Thursday 13 March 2014 18:45:31 Cal Leeming [Simplicity Media Ltd] > wrote: > > Seems this issue was brought up several years ago, though the thread was > > later hijacked for other functionality and get_or_none fizzled out. >

Re: Add support for get_or_none?

2014-03-13 Thread Cal Leeming [Simplicity Media Ltd]
I should just mention, the accepted answer in the SO thread is not the fix I'm proposing. I'm thinking something like; http://stackoverflow.com/a/2021833/1267398 Cal On Thu, Mar 13, 2014 at 4:45 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrot

Add support for get_or_none?

2014-03-13 Thread Cal Leeming [Simplicity Media Ltd]
Seems this issue was brought up several years ago, though the thread was later hijacked for other functionality and get_or_none fizzled out. https://groups.google.com/forum/#!topic/django-developers/Saa5nbzqQ2Q In Django 1.6 there were convenience methods added for .first(), for the same principle

Re: Backwards compatibility and field validation

2013-10-22 Thread Cal Leeming [Simplicity Media Ltd]
is throwing thoughts around, apologies if they're illogical… > > Marc > On 18 Oct 2013 15:18, "Cal Leeming [Simplicity Media Ltd]" < > cal.leem...@simplicitymedialtd.co.uk> wrote: > >> Sorry please ignore my last email, my email client went a bit weird and &g

Re: Backwards compatibility and field validation

2013-10-18 Thread Cal Leeming [Simplicity Media Ltd]
nged and/or all fields, making it easier to handle these different validation scenarios. (i.e. being able to easily detect if it is old data that has caused validation error, or new data). Cal On Fri, Oct 18, 2013 at 3:09 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymed

Re: Backwards compatibility and field validation

2013-10-18 Thread Cal Leeming [Simplicity Media Ltd]
This is yet another reason why I don't think it would be reasonable to expect field validation within the model. I also think that introducing such a check would not only lure the user into a false sense of security If the validations were done using DB constraints (as per Anssi's reply) then thi

Re: Backwards compatibility and field validation

2013-10-16 Thread Cal Leeming [Simplicity Media Ltd]
hy of a patch), or am I over-engineering this problem? Cal On Thu, Oct 17, 2013 at 12:08 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > > On Wed, Oct 16, 2013 at 12:15 AM, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote: > &

Re: Backwards compatibility and field validation

2013-10-16 Thread Cal Leeming [Simplicity Media Ltd]
t sure. I personally wouldn't be against having a setting to change in > the project-wide default behavior in a future Django version, but I think > the ability to override it is important. > > > > > On Wednesday, October 16, 2013 1:15:04 AM UTC+9, Cal Leeming [Simplicit

Re: Backwards compatibility and field validation

2013-10-15 Thread Cal Leeming [Simplicity Media Ltd]
e users phone number (which could have its min/max length changed at any point in the validators life time). Hope that makes more sense Cal On Tue, Oct 15, 2013 at 5:12 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > I've been thinking about th

Re: Backwards compatibility and field validation

2013-10-15 Thread Cal Leeming [Simplicity Media Ltd]
e the correct thing to do. Could someone please verify if I have come to the correct conclusion here? Cal On Tue, Oct 15, 2013 at 4:43 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Hello, > > I am trying to understand why field validators (mod

Backwards compatibility and field validation

2013-10-15 Thread Cal Leeming [Simplicity Media Ltd]
Hello, I am trying to understand why field validators (model.full_clean()) are not called for model.save() I've spent about an hour reviewing all the discussions/replies on this subject; http://www.xormedia.com/django-model-validation-on-save/ http://stackoverflow.com/questions/4441539/why-doesnt

Re: AbstractUser to get more abstract

2013-09-12 Thread Cal Leeming [Simplicity Media Ltd]
Although I cannot comment on the specific of how this could be done better, I do at least concur that implementing a custom AbstractUser could be done in a much better way!! Cal On Thu, Sep 12, 2013 at 9:44 PM, Abdulaziz Alfoudari < aziz.alfoud...@gmail.com> wrote: > This is a continuation of m

Re: Proposal: remove triage stage someday/maybe

2013-08-18 Thread Cal Leeming [Simplicity Media Ltd]
+1 On Sun, Aug 18, 2013 at 3:57 PM, Tim Graham wrote: > I think the state is useful because it provides a way to filter out > tickets that are not immediately actionable (for example, there are several > tickets that suggest schema migrations). When migrations land in core, we > can then "accept

Re: Specifying lists/tuples in models - wtf?

2013-06-05 Thread Cal Leeming [Simplicity Media Ltd]
Hi Noah, Sorry yes I remember discussing this last time now, it wasn't until I hit send that I remembered about 5 seconds after. I think I'm having a bit of a stupid day - my apologies. Cal On Wed, Jun 5, 2013 at 8:57 PM, Noah Kantrowitz wrote: > > On Jun 5, 2013, at 12:56

Re: Specifying lists/tuples in models - wtf?

2013-06-05 Thread Cal Leeming [Simplicity Media Ltd]
Okay, please ignore the below, it was because I used a tuple rather than a list in my test. >>> lol = ('hostname') >>> print lol[0] h Cal On Wed, Jun 5, 2013 at 8:56 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: >

Specifying lists/tuples in models - wtf?

2013-06-05 Thread Cal Leeming [Simplicity Media Ltd]
Hello, The following; class Meta: ordering = ('hostname') Results in; amber.reseller: "ordering" refers to "h", a field that doesn't exist. amber.reseller: "ordering" refers to "o", a field that doesn't exist. amber.reseller: "ordering" refers to "s", a field that doesn't exist. amber

Re: Perception of attitude in tickets

2013-05-16 Thread Cal Leeming [Simplicity Media Ltd]
I was going to mention this before, but wasn't sure how to word it. Russell has hit the spot though, giving the user a more personal experience, not just automated (or manual) copy-pasta. Cal On Thu, May 16, 2013 at 1:29 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > > On Thu, May

Re: Perception of attitude in tickets

2013-05-15 Thread Cal Leeming [Simplicity Media Ltd]
May 14, 2013 at 5:41 PM, Cal Leeming [Simplicity Media Ltd] > wrote: > > * Make the 5-for-1 (or 10-for-1) system official, not many people seem to > > realise this exists. This will give incentive to core devs to spend a bit > > longer on a ticket, maybe even throwing in a

Re: Perception of attitude in tickets

2013-05-14 Thread Cal Leeming [Simplicity Media Ltd]
Hello all, I just spent around 90 minutes reading through everyones comments (word for word), and writing up a reply offering my two cents. First off - a few years back someone introduced a 5-for-1 system where if you triaged five other tickets, you could request for a core dev to give detailed a

Re: Relative path support for TEMPLATE_DIRS and others in settings.py (django ticket 694)

2013-01-01 Thread Cal Leeming [Simplicity Media Ltd]
Also the stupid thing as well, we are already using 'templatetags' and 'filters'.. I just had no idea it supported 'appname/templates' as well. *doh* Cal On Tue, Jan 1, 2013 at 8:47 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk&

Re: Relative path support for TEMPLATE_DIRS and others in settings.py (django ticket 694)

2013-01-01 Thread Cal Leeming [Simplicity Media Ltd]
d not relative, this is a devops problem not a code problem. As such, I'm now -9000 on supporting relative paths. Thanks for explaining this Florian - makes a lot more sense now. Cal On Tue, Jan 1, 2013 at 7:36 PM, Florian Apolloner wrote: > Hi, > > > On Tuesday, January 1, 2013

Re: Relative path support for TEMPLATE_DIRS and others in settings.py (django ticket 694)

2013-01-01 Thread Cal Leeming [Simplicity Media Ltd]
Just re-read my post, and realised it may have come across a bit loaded (was replying very quickly) No insult was intended, and it's a genuine question Cal On Tue, Jan 1, 2013 at 6:48 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > For t

Re: Relative path support for TEMPLATE_DIRS and others in settings.py (django ticket 694)

2013-01-01 Thread Cal Leeming [Simplicity Media Ltd]
For the record, the only time I'd suggested using relative paths is for 'TEMPLATE_DIRS' only, I do not use the other two. Rather than saying "spend 30 seconds thinking about it", could you perhaps spend 30 seconds explaining why using relative paths for TEMPLATE_DIRS would be considered a bad thin

Re: Relative path support for TEMPLATE_DIRS and others in settings.py (django ticket 694)

2012-12-30 Thread Cal Leeming [Simplicity Media Ltd]
On Sun, Dec 30, 2012 at 11:01 PM, Luke Plant wrote: > On 29/12/12 04:08, Cal Leeming [Simplicity Media Ltd] wrote: > > > Could we not have something like this in the settings.py, which in turn > > enabled the code pasted above? > > TEMPLATE_PATH_RELATIVE=True > &

Re: Relative path support for TEMPLATE_DIRS and others in settings.py (django ticket 694)

2012-12-28 Thread Cal Leeming [Simplicity Media Ltd]
Since the day I started using Django, I have always used a relative path for TEMPLATES_DIR. import os CURRENT_DIR = os.path.realpath(os.path.dirname(__file__)) TEMPLATE_DIRS = "%s/templates/" % ( CURRENT_DIR, ) Imho, the idea of having to hard code your PROJECT_ROOT is ludicrous. I understand

Re: Automatic deployment tool

2012-12-09 Thread Cal Leeming [Simplicity Media Ltd]
. > > If only I were as good in selling a project as I can code. :) > I know that feeling > > Anyway, I hope this can also improve automatic deployment of Django > applications for other people. > > Cheers, > Jonathan > > > Le lundi 10 décembre 2012 00:

Re: Automatic deployment tool

2012-12-09 Thread Cal Leeming [Simplicity Media Ltd]
Hi Jonathan, Just from a very brief point of view.. my eyes started to glaze over whilst looking at the github README, and even more so when I looked at the code. Even if this was the best thing since sliced bread, the documentation in its current state leaves me with the feeling of "why do I wan

Re: #18557: get_or_create() causes a race condition with MySQL

2012-09-04 Thread Cal Leeming [Simplicity Media Ltd]
the SELECT query until all concurrent transactions will commit > requested rows. They are conventional conflict resolution mechanisms for > databases. > > > > On Sunday, August 12, 2012 9:41:15 PM UTC+6, Cal Leeming [Simplicity Media > Ltd] wrote: > >> Based on all the re

Re: #18557: get_or_create() causes a race condition with MySQL

2012-08-12 Thread Cal Leeming [Simplicity Media Ltd]
On Sun, Aug 12, 2012 at 4:41 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Based on all the responses given so far, here are the options available. > > Further feedback would be much appreciated. > > *A) Use READ COMMITTED as a glo

Re: #18557: get_or_create() causes a race condition with MySQL

2012-08-12 Thread Cal Leeming [Simplicity Media Ltd]
are enabled by default http://dev.mysql.com/doc/refman/5.0/en/commit.html I couldn't find any other mentioning of 'autocommit' in the MySQL docs - so I'm not sure this would have any impact? On Sat, Aug 11, 2012 at 11:29 PM, Karen Tracey wrote: > On Thu, Aug 9, 2012 at 5:58

Re: #18557: get_or_create() causes a race condition with MySQL

2012-08-09 Thread Cal Leeming [Simplicity Media Ltd]
TIONS': { 'autocommit': True, } Is that correct? Cal On Thu, Aug 9, 2012 at 10:56 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Thanks for the detailed explanation on this. > > Am I correct in assuming you are refe

Re: #18557: get_or_create() causes a race condition with MySQL

2012-08-09 Thread Cal Leeming [Simplicity Media Ltd]
AM, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote: > >> I'm not entirely sure that suggesting every query needs to be committed >> is the right way forward either, given that you only need to commit once >> before get_or_c

Re: #18557: get_or_create() causes a race condition with MySQL

2012-08-08 Thread Cal Leeming [Simplicity Media Ltd]
Aug 8, 2012 at 1:29 PM, Karen Tracey wrote: > On Wed, Aug 8, 2012 at 8:13 AM, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote: > >> Does anyone else have any input at this stage?? >> >> It seems to me that the most appropriate way forw

Re: #18557: get_or_create() causes a race condition with MySQL

2012-08-08 Thread Cal Leeming [Simplicity Media Ltd]
). On Mon, Jul 16, 2012 at 10:06 PM, Anssi Kääriäinen wrote: > On 16 heinä, 23:43, Ian Kelly wrote: > > On Mon, Jul 16, 2012 at 2:18 PM, Cal Leeming [Simplicity Media Ltd] > > > > wrote: > > > Okay - anyone else want to throw their thoughts at this? > > >

Re: #18557: get_or_create() causes a race condition with MySQL

2012-07-16 Thread Cal Leeming [Simplicity Media Ltd]
Okay - anyone else want to throw their thoughts at this? Also - messing with the isolation levels on MySQL is really not a great idea.. it can cause all sorts of unexpected behavior. Cal On Mon, Jul 16, 2012 at 7:28 PM, Anssi Kääriäinen wrote: > On 16 heinä, 14:00, "Cal Leeming [Si

[Django] #18557: get_or_create() causes a race condition with MySQL

2012-07-16 Thread Cal Leeming [Simplicity Media Ltd]
Hi guys, Okay so, this has been marked as wontfix in its current approach. The problem exists purely because of the way MySQL transactions and indexes work - if you create a row that matches a unique index, it won't show up as a row until you commit (which is correct), but if you try and insert a

Re: Django-nonrel patches

2012-06-24 Thread Cal Leeming [Simplicity Media Ltd]
Hi Daniel, Thanks for giving some feedback on this. I completely agree that one of its biggest downfalls is that it tries to treat MongoDB as a relational store, and I think this is what I meant by it just didn't "feel right". Also +1 on the comments made about it feeling hacky, and I suspect th

Re: Django-nonrel patches

2012-06-23 Thread Cal Leeming [Simplicity Media Ltd]
Hi Andres, Afaik, there's currently some compatibility issues with Django 1.4 - so it's not currently stable. Also, in my own personal opinion - after having a chance to use the mongo models with Django, in my personal opinion, it just didn't "feel right". Not entirely sure how to explain what th

Re: GitHub migration done!

2012-05-02 Thread Cal Leeming [Simplicity Media Ltd]
Apologies if this question has already been answered or seems silly but - is there a reason Mercurial is needed?? Can contributors not just switch to using git? i.e. if we have deprecated SVN, then why isn't Mercurial also being deprecated?? Cal On Wed, May 2, 2012 at 2:38 PM, Florian Apolloner

Re: GitHub migration done!

2012-04-28 Thread Cal Leeming [Simplicity Media Ltd]
Amazing news!! Great job, Adrian. Cal On Sat, Apr 28, 2012 at 4:08 AM, Adrian Holovaty wrote: > On Fri, Apr 27, 2012 at 11:50 AM, Adrian Holovaty > wrote: > > We're going to do the migration to GitHub today. This means we'll no > > longer be committing code to our Subversion repository. Committ

Re: Django is a serious framework, really

2012-04-11 Thread Cal Leeming [Simplicity Media Ltd]
Yo Jason, I'm really sorry for you, and imma let you finish, but Django is one of the best frameworks of all time. (I knew I'd get a chance to use that meme one day!) On Wed, Apr 11, 2012 at 7:37 PM, Erik Stein wrote: > > -- erik > > Am 11.04.2012 um 14:54 schrieb Russell Keith-Magee: > > > On

Re: MySQL connection pooling - preferred method??

2012-02-17 Thread Cal Leeming [Simplicity Media Ltd]
On Fri, Feb 17, 2012 at 9:58 PM, Florian Apolloner wrote: > > > On Friday, February 17, 2012 10:11:57 PM UTC+1, Cal Leeming [Simplicity > Media Ltd] wrote: >> >> # Apparently this will stop many connections to MySQL >> from django.core import signals >> fr

Re: MySQL connection pooling - preferred method??

2012-02-17 Thread Cal Leeming [Simplicity Media Ltd]
ing like 'persistent' : True.. maybe? Cal On Sat, Jan 28, 2012 at 5:52 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Hi Russ, > > Thanks very much for the reply. I guess ultimately my question was "do any > of the connectio

Re: MySQL connection pooling - preferred method??

2012-01-28 Thread Cal Leeming [Simplicity Media Ltd]
f you're looking for a recommendation for a connection pooler for > MySQL, that's another matter. Unfortunately, I can't be much help > here; I don't keep on top of developments in the MySQL world, so I > can't comment with any authority. > > Yours, > Russ Ma

Re: MySQL connection pooling - preferred method??

2012-01-27 Thread Cal Leeming [Simplicity Media Ltd]
Damn - no thoughts on this from anyone? On Wed, Jan 25, 2012 at 12:11 AM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Hi all, > > After spending about 30 minutes looking through old tickets, long > discussion threads and various blogs, I

MySQL connection pooling - preferred method??

2012-01-27 Thread Cal Leeming [Simplicity Media Ltd]
Hi all, After spending about 30 minutes looking through old tickets, long discussion threads and various blogs, I'm still not clear on the MySQL connection pooling topic. To quote Russ: "the capability already exists in third party tools, and they're in a position to do a much better job at it th

Re: DoS using POST via hash algorithm collision

2012-01-02 Thread Cal Leeming [Simplicity Media Ltd]
Hi Luciano, Curious, I was unaware of any such DoS vulnerability - makes for very interesting reading. Thanks for sharing this with the list - may be worth sending to django-users as well. Cal On Thu, Dec 29, 2011 at 2:26 AM, Luciano Pacheco wrote: > Hi all, > > Have you guys seen this? > htt

Re: Django error page - MemoryError

2011-12-21 Thread Cal Leeming [Simplicity Media Ltd]
Anyone else have any thoughts on if I should submit this for consideration into the core? Cal On Tue, Dec 20, 2011 at 8:16 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Comments below, apologies for the email signature on previous emails! &

Re: Django error page - MemoryError

2011-12-20 Thread Cal Leeming [Simplicity Media Ltd]
Comments below, apologies for the email signature on previous emails! On Tue, Dec 20, 2011 at 7:56 PM, Paul McMillan wrote: > > Place a try/catch for MemoryError on the exception handler to send back a > > simple exception traceback to the browser. > > Yes, this makes sense, as long as we are su

Re: Django error page - MemoryError

2011-12-20 Thread Cal Leeming [Simplicity Media Ltd]
eatrice Hall (summarizing Voltaire) > "The people's good is the highest law." -- Cicero > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to django-developers

Django error page - MemoryError

2011-12-20 Thread Cal Leeming [Simplicity Media Ltd]
Hey, So, we have a few clients who use Django for processing large amounts of data in a single query. If an exception is raised in development, the get_traceback_html() method fails with a MemoryError, and in the event that it doesn't, you end up with huge variable data print outs making the debu

Re: Small problem with HttpResponseRedirect

2011-12-07 Thread Cal Leeming [Simplicity Media Ltd]
After reading all the comments, I now completely agree that Django is doing the right thing and it falls onto the user to do sanity checking. Always helps to have another set of eyes, so thank you to everyone who took time to post their thoughts! Cal On Tue, Dec 6, 2011 at 7:54 AM, Paul McMillan

Small problem with HttpResponseRedirect

2011-12-05 Thread Cal Leeming [Simplicity Media Ltd]
Not sure if this should have a bug ticket raised or not.. wanted to get core devs thoughts. _redir = "//your/path/with/an/extra/slash/for/whatever/reason" HttpResponseRedirect(_redir) returns "Location: http://your/path/with/an/extra/slash/for/whatever/reason"; _redir = "/your/path/with/no/extra

Re: Django memcache key generation

2011-11-19 Thread Cal Leeming [Simplicity Media Ltd]
oid it being mangled (explanation goes here)". If you'd be happy for this to be included in the docs, I'll go ahead and submit a patch. Cal On Sat, Nov 19, 2011 at 10:44 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Sat, Nov 19, 2011 at 4:08 PM, Cal Lee

Re: get_traceback_html vulnerable to infinite loop if called twice

2011-11-19 Thread Cal Leeming [Simplicity Media Ltd]
Hi Dennis, I would hazard to say that ExceptionReporter/get_traceback_html() is not public API (it's not listed anywhere in documentation) - and as such it would be the user implementation of this which is the bug, not the get_traceback_html method itself (i.e. you'd need to prevent this condition

Django memcache key generation

2011-11-19 Thread Cal Leeming [Simplicity Media Ltd]
Hi, Since the release of 1.3, Django has changed the way it generates the memcache key name. If I was to do: cache.set('hello', 'world', 300) It would actually store the result as ":1:hello". Obviously, this is because the version number is stored, along with the key prefix. But, this inherentl

Re: Feature request prop for django db cache extention

2011-10-15 Thread Cal Leeming [Simplicity Media Ltd]
this looked at again, or would it be fighting a lost battle?? Cal On Sat, Oct 15, 2011 at 3:52 AM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > On Saturday, October 15, 2011, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote: > >

Feature request prop for django db cache extention

2011-10-14 Thread Cal Leeming [Simplicity Media Ltd]
Hey all, Today, we had a client getting around 600k webapp requests per hour (avg 6k/min), and had to do some emergency perf hotfixes (CodeIgniter+PHP) In the end, we monkey-patched the code so raw SQL statement was used to generate a cache key, and we performed a lookup on that. It was absolutel

Re: #10863 - Email full stack traces (feedback please!)

2011-10-05 Thread Cal Leeming [Simplicity Media Ltd]
That's pretty nice - something like this would be a nice additional feature. Any thoughts core devs?? On Wed, Oct 5, 2011 at 8:26 PM, Patryk Zawadzki wrote: > On Wed, Oct 5, 2011 at 12:40 PM, Cal Leeming [Simplicity Media Ltd] > wrote: > > Could I bring the latest comment

#10863 - Email full stack traces (feedback please!)

2011-10-05 Thread Cal Leeming [Simplicity Media Ltd]
Could I bring the latest comment on the following ticket to the attention of you guys: https://code.djangoproject.com/ticket/10863#comment:17 Any feedback would be much appreciated. Thanks Cal -- You received this message because you are subscribed to the Google Groups "Django developers" gr

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Cal Leeming [Simplicity Media Ltd]
for MySQL. > On Oct 3, 2011 1:01 PM, "Cal Leeming [Simplicity Media Ltd]" < > cal.leem...@simplicitymedialtd.co.uk> wrote: > > Ahh - max_allowed_packet pops up its ugly head again - it > > wouldn't surprise me if this was the case. > > > > Thank

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Cal Leeming
for MySQL. > On Oct 3, 2011 1:01 PM, "Cal Leeming [Simplicity Media Ltd]" < > cal.leem...@simplicitymedialtd.co.uk> wrote: > > Ahh - max_allowed_packet pops up its ugly head again - it > > wouldn't surprise me if this was the case. > > > > Thank

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Cal Leeming [Simplicity Media Ltd]
011 at 1:31 PM, Cal Leeming [Simplicity Media Ltd] > wrote: > > So, came up against a strange thing today. > > Database backend is MySQL 5.5 (Percona variant) > > > > If I attempt to do an __in query with a list containing 50 thousand > entries, > > the quer

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Cal Leeming [Simplicity Media Ltd]
w the results. Thx Cal On Mon, Oct 3, 2011 at 7:52 PM, Christophe Pettus wrote: > > On Oct 3, 2011, at 11:31 AM, Cal Leeming [Simplicity Media Ltd] wrote: > > > I can provide exact further info, but this was just a preliminary email > to see if this was expected behavior - or actuall

Curious (bug?) with db filter __in

2011-10-03 Thread Cal Leeming [Simplicity Media Ltd]
So, came up against a strange thing today. Database backend is MySQL 5.5 (Percona variant) If I attempt to do an __in query with a list containing 50 thousand entries, the query wouldn't fail, but would instead return no results. If I split it up into chunks (say 100) - it would work fine. For e

Re: Revisiting proxied SSL headers

2011-09-26 Thread Cal Leeming [Simplicity Media Ltd]
On Mon, Sep 26, 2011 at 5:39 PM, Carl Meyer wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On 09/26/2011 06:16 AM, Cal Leeming [Simplicity Media Ltd] wrote: > > Unless you can guarantee that all web application servers/load balancers > > are going to correct

Re: get_field_display: Django needs a template filter to allow get_field_display for a dynamic field name

2011-09-26 Thread Cal Leeming [Simplicity Media Ltd]
Ivan, I completely agree that it would be useful to have something like this, as I have some up against this *exact* same problem in the past. However, when I raised it as an issue on IRC - the only response I got was "stop putting your application logic into the templates" lol. So, although I'm

Re: Revisiting proxied SSL headers

2011-09-26 Thread Cal Leeming [Simplicity Media Ltd]
Just my two cents worth, but I think something like this is such a 'per case basis', that it probably shouldn't be included in the core. Unless you can guarantee that all web application servers/load balancers are going to correctly handle the header out of the box (i.e. inject/strip where necessa

Re: Python 3 and you

2011-09-14 Thread Cal Leeming [Simplicity Media Ltd]
Can I ask, have the django core team already accepted that Django will eventually be a 3.x framework, or will it be un-officially forked? Personally - I'd love to see people ride the 2.x train until its last dying breath, but that's just me ;) Cal 2011/9/14 Ákos Péter Horváth > Another vote to

Re: please reopen ticket 15567

2011-09-13 Thread Cal Leeming [Simplicity Media Ltd]
+1, if the user/pass is entered, that user is entitled so know what its own permissions are. The error should give "You have insufficient access to this page" or something like that. Cal On Tue, Sep 13, 2011 at 6:12 PM, Florian Apolloner wrote: > -1, This would leak information about the users

Re: Proposal for a new templatetag definition syntax

2011-09-12 Thread Cal Leeming [Simplicity Media Ltd]
I may have misunderstood this thread slightly but, should templatetags follow the same structure as *args, **kwargs?? i.e. *args {% create_title "hello world" 800 800 %} **kwargs {% create_title title="helloworld" width=800 height=800 %} mixture {% create_title "helloworld" width=800 height=800

Re: runfcgi umask unusable without daemonize=false.. why?

2011-09-09 Thread Cal Leeming [Simplicity Media Ltd]
. :/ Cal On Fri, Sep 9, 2011 at 3:24 PM, Roberto De Ioris wrote: > > Il giorno 09/set/2011, alle ore 16:05, Cal Leeming [Simplicity Media Ltd] > ha scritto: > > > Hi, > > > > Is there any reason why umask is unusable without daemonize=false? > > > >

runfcgi umask unusable without daemonize=false.. why?

2011-09-09 Thread Cal Leeming [Simplicity Media Ltd]
Hi, Is there any reason why umask is unusable without daemonize=false? This means I can't manage processes within supervisorctl (when having to use fastcgi due to client not being able to have uwsgi). For example: srwxr-xr-x 1 tt tt 0 Sep 9 15:00 fastcgi That means that nginx (www-da

Possible documentation (or code) bug related to DEBUG+INTERNAL_IPS

2011-09-07 Thread Cal Leeming [Simplicity Media Ltd]
Hi, Documentation states that IPs within 'INTERNAL_IPS' will: - See debug comments, when DEBUG is True. To my eyes, that means that unless the IP is in there, they won't see the debug comments/page. However, the debug page is still shown to the user when DEBUG is on, even if they are not in the

Re: PHP-inspired user-friendly in-browser DJango install

2011-09-07 Thread Cal Leeming [Simplicity Media Ltd]
On Tue, Sep 6, 2011 at 6:29 PM, Alec Taylor wrote: > Good morning, > > I have been using Drupal for a while now, but am slowly moving toward > DJango. > > I am currently working on quite an ambitious project, which I will be > releasing under a permissive license (New BSD or better). > > I would

Re: What is Django?

2011-08-24 Thread Cal Leeming [Simplicity Media Ltd]
On Wed, Aug 24, 2011 at 11:04 AM, Tom Evans wrote: > On Tue, Aug 23, 2011 at 6:34 PM, Cal Leeming [Simplicity Media Ltd] > wrote: > > > > +1 on this idea :) > > I don't think Russell is looking for votes on whether to do it, he's > looking for someone to act

Re: What is Django?

2011-08-23 Thread Cal Leeming [Simplicity Media Ltd]
On Tue, Aug 23, 2011 at 4:54 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > Hi Julian, > > If your intention here was to suggest something that you think > Django's website should cover, then this *is* the right forum. > However, my reponse would be to ask what is wrong with the overv

Re: django-irc-logs.com

2011-07-25 Thread Cal Leeming [Simplicity Media Ltd]
On Mon, Jul 25, 2011 at 1:31 PM, Jannis Leidel wrote: > On 25.07.2011, at 13:25, Bernhard Essl wrote: > > > Dear django devs, > > > > unfortunately the site where the #django IRC logs used to be archived > > has been down for quite a while. I've tried to find out what happened > > to that site bu

Re: django-irc-logs.com

2011-07-25 Thread Cal Leeming [Simplicity Media Ltd]
Also, on a side note, it may be that django-developers isn't the right place for this discussion. Might be a good idea to do a post on django-users also, as I'd imagine that list would benefit more from this information! Cal On Mon, Jul 25, 2011 at 1:21 PM, Cal Leeming [Simplicity

  1   2   >