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

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

Re: MySQL connection pooling - preferred method??

2012-01-28 Thread Cal Leeming [Simplicity Media Ltd]
commendation 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 Magee %-) > > On Thu, Jan 26, 2012 at 5:

Re: MySQL connection pooling - preferred method??

2012-02-17 Thread Cal Leeming [Simplicity Media Ltd]
' : 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 connection pooling solutions have an im

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 <f.apollo...@gmail.com>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.c

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

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

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

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

[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

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

2012-07-16 Thread Cal Leeming [Simplicity Media Ltd]
nä, 14:00, "Cal Leeming [Simplicity Media Ltd]" > <cal.leem...@simplicitymedialtd.co.uk> wrote: > > Hi guys, > > > > Okay so, this has been marked as wontfix in its current approach. > > > > The problem exists purely because of the way MySQL transactions

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 <anssi.kaariai...@thl.fi>wrote: > On 16 heinä, 23:43, Ian Kelly <ian.g.ke...@gmail.com> wrote: > > On Mon, Jul 16, 2012 at 2:18 PM, Cal Leeming [Simplicity Media Ltd] > > > > <cal.leem...@simplicitymedial

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

2012-08-08 Thread Cal Leeming [Simplicity Media Ltd]
, 2012 at 1:29 PM, Karen Tracey <kmtra...@gmail.com> 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 m

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

2012-08-09 Thread Cal Leeming [Simplicity Media Ltd]
ed, Aug 8, 2012 at 9:25 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 &g

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

2012-08-09 Thread Cal Leeming [Simplicity Media Ltd]
': { '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 referring to the foll

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

2012-08-12 Thread Cal Leeming [Simplicity Media Ltd]
.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 <kmtra...@gmail.com> wrote: > On Thu, Aug 9, 2012 at 5:58 PM, Cal Leemin

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-09-04 Thread Cal Leeming [Simplicity Media Ltd]
t; > It locks 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: > >>

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

Re: Automatic deployment tool

2012-12-09 Thread Cal Leeming [Simplicity Media Ltd]
y 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:15:58 UTC+1, Cal Lee

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: 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 <l.plant...@cantab.net> 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? > &g

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

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]
3 7:48:59 PM UTC+1, Cal Leeming [Simplicity > Media Ltd] wrote: >> >> 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 thing to do?

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> wrote: > Just rea

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

Re: Perception of attitude in tickets

2013-05-15 Thread Cal Leeming [Simplicity Media Ltd]
ian.org>wrote: > On Tue, May 14, 2013 at 5:41 PM, Cal Leeming [Simplicity Media Ltd] > <cal.leem...@simplicitymedialtd.co.uk> 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 s

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

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.

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

Re: Specifying lists/tuples in models - wtf?

2013-06-05 Thread Cal Leeming [Simplicity Media Ltd]
2013, at 12:56 PM, Cal Leeming [Simplicity Media Ltd] wrote: > > > Hello, > > > > The following; > > class Meta: > > ordering = ('hostname') > > > > Results in; > > amber.reseller: "ordering" refers to "h"

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

Re: settings.py should have way to hide key/values even when debug set True

2011-01-31 Thread Cal Leeming [Simplicity Media Ltd]
Second. On Tue, Feb 1, 2011 at 1:00 AM, Russell Keith-Magee wrote: > On Tue, Feb 1, 2011 at 12:12 AM, Horst Gutmann > wrote: > > On Mon, Jan 31, 2011 at 5:02 PM, Matteius wrote: > >> I think it would be really useful to have a

Sprints DjangoCon Europe

2011-04-05 Thread Cal Leeming [Simplicity Media Ltd]
Nice!!! But, at over 500 euros, and the hotel costing 140 euros per night, I probably won't be able to attend.. (just simply can't justify spending 1000 euros on a conference, no matter how awesome it is lol). I'll look forward to seeing the slides / pictures though! Cal On Tue, Apr 5, 2011 at

Validate that IntegerField is a valid Signed value

2011-04-30 Thread Cal Leeming [Simplicity Media Ltd]
http://code.djangoproject.com/ticket/15923#comment:13 Currently, Django doesn't validate if a value on an IntegerField is indeed a valid signed value. Could someone please confirm (in others such as CharField) if value validation is left for the database to decide (for example, string length,

Re: Re : Validate that IntegerField is a valid Signed value

2011-04-30 Thread Cal Leeming [Simplicity Media Ltd]
Hey Mathieu, Thanks for taking the time to reply. I'm starting to see now why the core devs are reluctant to modify IntegerField. I'm wondering if maybe Django should have a SignedIntegerField and UnsignedIntegerField as part of the core (for those that wish to have enforced 32-bit integers),

Re : Validate that IntegerField is a valid Signed value

2011-05-01 Thread Cal Leeming [Simplicity Media Ltd]
er can be stored in a > 32 bits using either a simple comparison, like the following: >-int('1' * 31, 2) < int(field_value) < int('1' * 31, 2) > > Mathieu > > On Apr 30, 8:31 pm, "Cal Leeming [Simplicity Media Ltd]" > <cal.leem...@simplicitymedial

Fwd: Re : Validate that IntegerField is a valid Signed value

2011-05-01 Thread Cal Leeming [Simplicity Media Ltd]
core, either wait for feedback here, and/or give it a try with a > ticket (and i'm pretty sure it'll land in "Design Decision Needed"). > > On May 1, 2:42 pm, "Cal Leeming [Simplicity Media Ltd]" > <cal.leem...@simplicitymedialtd.co.uk> wrote: &

Re: Re: get_or_create can still cause IntegrityError

2011-05-09 Thread Cal Leeming [Simplicity Media Ltd]
Hi guys, I spent literally *months* trying to find the best way to resolve this situation. On our high performance sites + backends (around 120qps, 50/50 split between read and write) we were getting IntegrityError raised by get_or_create (which we now refer to as Object Collisions). We are able

Backscatter from django-users (att of moderator please)

2011-06-09 Thread Cal Leeming [Simplicity Media Ltd]
34f...@u26g2000vby.googlegroups.com> <8e880184-f1b4-4eb7-b1d8-0ae7cbf51...@r2g2000vbj.googlegroups.com> Date: Thu, 9 Jun 2011 15:48:11 +0100 Message-ID: <banlktiknoo2iivnah9cmobdm5bs9-z+...@mail.gmail.com> Subject: Re: VERY cheap django hosting? From: "Cal Leeming [

Re: Backscatter from django-users (att of moderator please)

2011-06-09 Thread Cal Leeming [Simplicity Media Ltd]
roup by appending +owner to the mailing list alias. For example, the > django-users moderators can be reached at > django-users+ow...@googlegroups.com. > > Yours, > Russ Magee %-) > > On Thu, Jun 9, 2011 at 10:51 PM, Cal Leeming [Simplicity Media Ltd] > <cal.leem...@simplicityme

Re: Removal of DictCursor from raw query.. why??

2011-06-16 Thread Cal Leeming [Simplicity Media Ltd]
' : Decimal('4159'), 'f4' : 9998L }] Maybe something like cursor.fetchall(field_names=True), or cursor.dictfetchall() - which is what the removed function did. Cal On Thu, Jun 16, 2011 at 2:54 PM, Luke Plant <l.plant...@cantab.net> wrote: > On 16/06/11 14:10, Cal Leeming [Simplicity

Re: Removal of DictCursor from raw query.. why??

2011-06-16 Thread Cal Leeming [Simplicity Media Ltd]
PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > @Andy / @ Alex: > > Yup, I know how to get this, but the point is, it took me 30 minutes of > searching to find this information out. > > What I'm asking, is for consideration

Re: Removal of DictCursor from raw query.. why??

2011-06-16 Thread Cal Leeming [Simplicity Media Ltd]
tter than zip. Your call.) > > Or for the whole result set: > > result = [ dict( (d[0],c) for d, c in zip(cursor.description, row) ) > for row in cursor ] > > On Thu, Jun 16, 2011 at 10:03 AM, Cal Leeming [Simplicity Media Ltd] > <cal.leem...@simplicitymedialtd.co.uk> wrote: > > Okay

Re: Removal of DictCursor from raw query.. why??

2011-06-16 Thread Cal Leeming [Simplicity Media Ltd]
16, 2011 at 6:14 PM, Alex Gaynor <alex.gay...@gmail.com> wrote: > > > On Thu, Jun 16, 2011 at 10:10 AM, Cal Leeming [Simplicity Media Ltd] < > cal.leem...@simplicitymedialtd.co.uk> wrote: > >> In fact let me extend off this a little further. >> >> If I

Re: Removal of DictCursor from raw query.. why??

2011-06-17 Thread Cal Leeming [Simplicity Media Ltd]
know, if not ill put in a ticket for consideration. On 17 Jun 2011 04:55, "burc...@gmail.com" <burc...@gmail.com> wrote: > Hi Cal, > > Why not just put your helper to django snippets? > > On Fri, Jun 17, 2011 at 12:25 AM, Cal Leeming [Simplicity Media Ltd] > <cal.le

Re: Thoughts on solution to forward references in MySQL (#3615)

2011-06-28 Thread Cal Leeming [Simplicity Media Ltd]
Sorry for the noobish question but, could someone explain the definition of "forward references"?? Is this a MySQL or a django term?? Google wasn't very forthcoming :X Thanks Cal On Mon, Jun 27, 2011 at 10:24 PM, Jim D. wrote: > Hi all, > > I spent some time last week

Re: Thoughts on solution to forward references in MySQL (#3615)

2011-06-28 Thread Cal Leeming [Simplicity Media Ltd]
l Leeming [Simplicity Media Ltd] wrote: > > > Sorry for the noobish question but, could someone explain the definition > of "forward references"?? Is this a MySQL or a django term?? Google wasn't > very forthcoming :X > > Jacob actually requested that I add a note in the

Re: Conditional aggregations.

2011-06-29 Thread Cal Leeming [Simplicity Media Ltd]
Excellent work on this akaariai! I think the best way I could help with this ticket, would be to use it in development in our future branch over the next few months with some of our complex reporting systems. Absolutely packed with work at the moment, so this would be in the next 2 - 3 months.

Re: Decision for ticket #6362 - Remove blank spaces with strip when validating the data

2011-07-04 Thread Cal Leeming [Simplicity Media Ltd]
+1 On Mon, Jul 4, 2011 at 6:13 AM, Ryan wrote: > Umm... How about now?  I've been bitten by trailing/leading blank spaces in > form inputs several times now, and I'm tired of monkey patching django to > fix this.  Thanks. > > Ryan > > -- > You received this message because you

Re: Django ORM enchantments

2011-07-04 Thread Cal Leeming [Simplicity Media Ltd]
Very nice work Akaariai. I'll check this out over the next couple of days :) Cal On Mon, Jul 4, 2011 at 10:10 PM, akaariai wrote: > I have implemented proof of concept versions of conditional > aggregation, F-lookups in aggregates and annotating fields to a model >

Blank page returned on POST if csrf middleware is not configured... bug?

2011-07-06 Thread Cal Leeming [Simplicity Media Ltd]
Today I came across a very strange problem. When attempting to post a form (without the CSRF middleware being present in MIDDLEWARE_CLASSES), django would *always* return a blank page. If the post contained no data, it would come back fine, but if it did contain data, it would come back blank.

Re: Blank page returned on POST if csrf middleware is not configured... bug?

2011-07-06 Thread Cal Leeming [Simplicity Media Ltd]
Hi Luke, Thanks for the reply. I'll set up a test case in a fresh 1.2 django instance, and will let you know the results (and the code used). Cal On Wed, Jul 6, 2011 at 5:41 PM, Luke Plant <l.plant...@cantab.net> wrote: > On 06/07/11 15:43, Cal Leeming [Simplicity Media Ltd] wrote: &

Re: Blank page returned on POST if csrf middleware is not configured... bug?

2011-07-06 Thread Cal Leeming [Simplicity Media Ltd]
Ah, okay I'll do it on both 1.2 and 1.3 to determine if it is/was a bug. Cal On Wed, Jul 6, 2011 at 7:18 PM, Luke Plant <l.plant...@cantab.net> wrote: > On 06/07/11 18:12, Cal Leeming [Simplicity Media Ltd] wrote: >> Hi Luke, >> >> Thanks for the reply. >> >

Re: Blank page returned on POST if csrf middleware is not configured... bug?

2011-07-06 Thread Cal Leeming [Simplicity Media Ltd]
. Cal On Wed, Jul 6, 2011 at 7:22 PM, Cal Leeming [Simplicity Media Ltd] <cal.leem...@simplicitymedialtd.co.uk> wrote: > Ah, okay I'll do it on both 1.2 and 1.3 to determine if it is/was a bug. > > Cal > > On Wed, Jul 6, 2011 at 7:18 PM, Luke Plant <l.plant...@cantab.ne

Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Cal Leeming [Simplicity Media Ltd]
Hi, I have created a ModelField called RealIPAddressField. It stores the IP address in integer form, meaning the lookups on large tables are much faster: http://djangosnippets.org/snippets/2493/ @django-developers - Do you think there is any possibility of this getting included into the core?

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Cal Leeming [Simplicity Media Ltd]
Sorry, I should have been a little more specific. I meant faster lookups in terms of database index, such as MySQL with InnoDB. Cal On Mon, Jul 18, 2011 at 4:13 PM, Javier Guerra Giraldez <jav...@guerrag.com>wrote: > On Mon, Jul 18, 2011 at 9:56 AM, Cal Leeming [Simplicity

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Cal Leeming [Simplicity Media Ltd]
at 4:15 PM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Sorry, I should have been a little more specific. > > I meant faster lookups in terms of database index, such as MySQL with > InnoDB. > > Cal > > > On Mon, Jul 18, 2011 a

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Cal Leeming [Simplicity Media Ltd]
On Mon, Jul 18, 2011 at 4:36 PM, Tom Evans <tevans...@googlemail.com> wrote: > On Mon, Jul 18, 2011 at 3:56 PM, Cal Leeming [Simplicity Media Ltd] > <cal.leem...@simplicitymedialtd.co.uk> wrote: > > Hi, > > I have created a ModelField called RealIPAddressField

Re: Storing IP address as integer within database to remove need for full text search

2011-07-19 Thread Cal Leeming [Simplicity Media Ltd]
On Tue, Jul 19, 2011 at 1:02 PM, Daniel Swarbrick < daniel.swarbr...@gmail.com> wrote: > The snippet seems to have been removed (returns "page not found"). Wtf? :X http://djangosnippets.org/snippets/ Looks like they have suffered some sort of data loss.. I'm seeing only snippets from 2 weeks

Re: django-irc-logs.com

2011-07-25 Thread Cal Leeming [Simplicity Media Ltd]
Cute :) A few questions: - What back end do you use for the search engine? - Have you tested this system once it contains 5+ million rows? (you might be interested to register for the webcast on handling large amounts of data in Django -

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 Media Ltd

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

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

Re: What is Django?

2011-08-24 Thread Cal Leeming [Simplicity Media Ltd]
On Wed, Aug 24, 2011 at 11:04 AM, Tom Evans <tevans...@googlemail.com>wrote: > On Tue, Aug 23, 2011 at 6:34 PM, Cal Leeming [Simplicity Media Ltd] > <cal.leem...@simplicitymedialtd.co.uk> wrote: > > > > +1 on this idea :) > > I don't think Russell is looking

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

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

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

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 <robe...@unbit.it> 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=fals

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

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

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

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

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

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 <c...@oddbird.net> 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 &g

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Cal Leeming [Simplicity Media Ltd]
the results. Thx Cal On Mon, Oct 3, 2011 at 7:52 PM, Christophe Pettus <x...@thebuild.com> 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 expecte

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Cal Leeming [Simplicity Media Ltd]
;wrote: > On Mon, Oct 3, 2011 at 1:31 PM, Cal Leeming [Simplicity Media Ltd] > <cal.leem...@simplicitymedialtd.co.uk> 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 wi

Re: Curious (bug?) with db filter __in

2011-10-03 Thread Cal Leeming [Simplicity Media Ltd]
be a simple constant 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. > >

#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"

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 <pat...@pld-linux.org>wrote: > On Wed, Oct 5, 2011 at 12:40 PM, Cal Leeming [Simplicity Media Ltd] > <cal.leem...@simplicitymedial

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

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

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

Re: Django memcache key generation

2011-11-19 Thread Cal Leeming [Simplicity Media Ltd]
ngled (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 Leeming [Simplicity Med

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 =

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

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

Re: Django error page - MemoryError

2011-12-20 Thread Cal Leeming [Simplicity Media Ltd]
Hi Alex, Please note, I am already using a try/catch block on MemoryError, and this does indeed resolve the problem. I think at the very least, we should attempt to generate the text exception, and if it fails due to a particular circumstance, then it will just fall back to doing whatever it

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,

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

Re: Backwards compatibility and field validation

2013-10-15 Thread Cal Leeming [Simplicity Media Ltd]
be 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 (m

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 this a

Re: Backwards compatibility and field validation

2013-10-16 Thread Cal Leeming [Simplicity Media Ltd]
re. 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 [Simplicity > Media

Re: Backwards compatibility and field validation

2013-10-16 Thread Cal Leeming [Simplicity Media Ltd]
m 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: > >> Sorry I shou

Re: Backwards compatibility and field validation

2013-10-18 Thread Cal Leeming [Simplicity Media Ltd]
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...@simplicitymedialtd.co.uk>

Re: Backwards compatibility and field validation

2013-10-22 Thread Cal Leeming [Simplicity Media Ltd]
of this 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

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

  1   2   >