Re: DjangoCon meetup Friday Sept 5

2008-08-21 Thread Jonathan Nelson
TWID guys? I'd be happy to combine groups. I just don't know who that is. Jonathan On Aug 20, 9:39 pm, "Eric Holscher" <[EMAIL PROTECTED]> wrote: > I think the TWID guys are doing something as well. Might want to combine > groups. > > Eric > > On Wed, Aug 20, 2008 at 11:21 PM, Jonathan Nelson

Re: Call for testing: new docs

2008-08-21 Thread Nicola Larosa (tekNico)
Jacob Kaplan-Moss wrote: > The best way to help out right now is to grab the "docs-refactor" > branch from my git repo Hereby convened, we mourn the untimely demise of the "toys" hg repo: by many will it be sorely missed, time and again, bringing tears to the cheeks of the afflicted. But no! Don

Re: recent MultiValueDict.iteritems change (changeset 8399)

2008-08-21 Thread zvoase
Wouldn't it make sense to add a keyword argument to both itervalues and iteritems, which lets you get lists instead? That would seem easier than writing new methods. Example: >>> dictionary.iteritems(as_list=True) ... --~--~-~--~~~---~--~~ You received this messa

Re: DjangoCon meetup Friday Sept 5

2008-08-21 Thread Mike Scott
On Thu, Aug 21, 2008 at 7:54 PM, Jonathan Nelson <[EMAIL PROTECTED]>wrote: > > TWID guys? I'd be happy to combine groups. I just don't know who > that is. > "This week in django" crew - http://www.thisweekindjango.com/ only the premier podcast resource for django-aholics. Get in touch with one

Re: DjangoCon meetup Friday Sept 5

2008-08-21 Thread Mike Scott
err, link doesn't seem to work with www for me, so try: http://thisweekindjango.com/ On Thu, Aug 21, 2008 at 9:01 PM, Mike Scott <[EMAIL PROTECTED]> wrote: > > > On Thu, Aug 21, 2008 at 7:54 PM, Jonathan Nelson <[EMAIL PROTECTED]>wrote: > >> >> TWID guys? I'd be happy to combine groups. I just

url pattern matching

2008-08-21 Thread Tim Keefer
It appears the trunk has a problem with the url pattern matching. Using the urlpatterns below, the url /admin/invoicing/invoice/1/20080821.pdf is parsed into '1/20080821.pdf' instead of '1'. urlpatterns = patterns('', (r'^/?$', 'Billing2.invoic

Re: url pattern matching

2008-08-21 Thread Malcolm Tredinnick
On Thu, 2008-08-21 at 00:05 -0700, Tim Keefer wrote: > It appears the trunk has a problem with the url pattern matching. > Using the urlpatterns below, the url > /admin/invoicing/invoice/1/20080821.pdf is parsed into > '1/20080821.pdf' instead of '1'. That'

innodb with mysql

2008-08-21 Thread Eric Montgomery
I'm not exactly sure what's going on here, and I managed to "fix" it by switching my storage engine to myisam, but I figured I'd post something here to see if any has had or is aware of this problem. I had a blogs.author model that had a foreign key relation to User. I created a User and then cr

Re: innodb with mysql

2008-08-21 Thread Malcolm Tredinnick
On Thu, 2008-08-21 at 07:23 -0700, Eric Montgomery wrote: > I'm not exactly sure what's going on here, and I managed to "fix" it > by switching my storage engine to myisam, but I figured I'd post > something here to see if any has had or is aware of this problem. Please post support questions li

Re: url pattern matching

2008-08-21 Thread Norman Harman
Tim Keefer wrote: > It appears the trunk has a problem with the url pattern matching. > Using the urlpatterns below, the url > /admin/invoicing/invoice/1/20080821.pdf is parsed into > '1/20080821.pdf' instead of '1'. > > urlpatterns = patterns('',

'"%s/" % var' preferred to 'var + "/"'?

2008-08-21 Thread Joost Cassee
Hi all, Just a quick question to set my head right for future Django contributions. Why is "%s/" % var better than var + '/'? I can think of some reasons: 1) consistency with other code, 2) certainty of string concatenation. But is the second expression not much faster? (This is an honest questio

Re: [OT] '"%s/" % var' preferred to 'var + "/"'?

2008-08-21 Thread Jeff Anderson
Joost Cassee wrote: Hi all, Just a quick question to set my head right for future Django contributions. Why is "%s/" % var better than var + '/'? I can think of some reasons: 1) consistency with other code, 2) certainty of string concatenation. But is the second expression not much faster? (This

Re: '"%s/" % var' preferred to 'var + "/"'?

2008-08-21 Thread Waylan Limberg
Well, according to the python beginners book; "Dive Into Python" [1], string formatting is less error prone as it also does type coercion whereas string concatenation only works when all objects are already strings. When it's possible that a user will be passing in parts of the concatenation, I'd

Re: '"%s/" % var' preferred to 'var + "/"'?

2008-08-21 Thread Vik Reykja
On Thu, Aug 21, 2008 at 18:00, Waylan Limberg <[EMAIL PROTECTED]> wrote: > I had thought that I read from that same source that formatting is > faster than concatenation (and that's why I checked there before > responding), but I don't see that mentioned. Not sure where I got that > idea or if its

Re: '"%s/" % var' preferred to 'var + "/"'?

2008-08-21 Thread Ian Kelly
On Thu, Aug 21, 2008 at 10:00 AM, Waylan Limberg <[EMAIL PROTECTED]> wrote: > I had thought that I read from that same source that formatting is > faster than concatenation (and that's why I checked there before > responding), but I don't see that mentioned. Not sure where I got that > idea or if

How do I alter the behavior of django.db.models.Options.contribute_to_class when testing

2008-08-21 Thread crippledcanary
I am working on http://code.djangoproject.com/ticket/6148. This includes a new option "db_schema" that's been added to a models meta class. It involves using a custom schema for any model that has this attribute set. The problem comes when testing. In postgres a test database is created and inside

Oracle IntregrityError and get_or_create test case

2008-08-21 Thread Matt Boersma
I noticed that in the get_or_create test case, Oracle fails because the cx_Oracle database driver raises a DatabaseError, not a more specific IntegrityError, when an INSERT lacks a required field. (Malcolm anticipated this in his commit message for r8450.) Looking at the C code for the driver, it

Re: [OT] '"%s/" % var' preferred to 'var + "/"'?

2008-08-21 Thread Yuri Baburov
Also you are able to use %s for numbers and any custom types: "str%s" % 12 but not "str" + 12. Less errors -- more fun. On Thu, Aug 21, 2008 at 11:00 PM, Jeff Anderson <[EMAIL PROTECTED]> wrote: > Joost Cassee wrote: >> >> Hi all, >> >> Just a quick question to set my head right for future Django

Re: returning large files from django

2008-08-21 Thread Patryk Zawadzki
On Fri, Aug 15, 2008 at 8:58 AM, Gábor Farkas <[EMAIL PROTECTED]> wrote: > if that's the case, isn't it possible to end the "processing" path > with a redirect? > > i mean, when you finish the "processing", is it really necessary to > serve the file? > couldn't you just send back a http-redirect? >

Re: '"%s/" % var' preferred to 'var + "/"'?

2008-08-21 Thread Waylan Limberg
On Thu, Aug 21, 2008 at 12:22 PM, Ian Kelly <[EMAIL PROTECTED]> wrote: > > On Thu, Aug 21, 2008 at 10:00 AM, Waylan Limberg <[EMAIL PROTECTED]> wrote: >> I had thought that I read from that same source that formatting is >> faster than concatenation (and that's why I checked there before >> respon

Aggregation Final Report

2008-08-21 Thread Nicolas Lara
Hello, I am writing to let you know that I have posted the latest patches on aggregation support. All the planned features are implemented in the patch for #3566. For those not keping trac these are: * Two queryset modifiers for doing aggregation: aggregate() and annotate(). * aggregate(

Re: innodb with mysql

2008-08-21 Thread Eric Montgomery
The reason I posted this here is that it seems like it might be a problem with the way django generates the mysql. >From what I understand, problems with foreign-key constraints with innodb can occur if multiple-table updates are run "out of order," so to speak. However, I'm definitely not an exp

Re: How do I alter the behavior of django.db.models.Options.contribute_to_class when testing

2008-08-21 Thread Russell Keith-Magee
On Fri, Aug 22, 2008 at 12:39 AM, crippledcanary <[EMAIL PROTECTED]> wrote: > > I am working on http://code.djangoproject.com/ticket/6148. > This includes a new option "db_schema" that's been added to a models > meta class. > It involves using a custom schema for any model that has this > attribut

Re: '"%s/" % var' preferred to 'var + "/"'?

2008-08-21 Thread Ronny Haryanto
On Thu, Aug 21, 2008 at 10:41 PM, Joost Cassee <[EMAIL PROTECTED]> wrote: > Just a quick question to set my head right for future Django > contributions. Why is "%s/" % var better than var + '/'? I can think > of some reasons: 1) consistency with other code, 2) certainty of > string concatenation.

Re: '"%s/" % var' preferred to 'var + "/"'?

2008-08-21 Thread lingrlongr
You can also map a dictionary of values to the format string: >>> num = 99 >>> obj = 'red balloons' >>> print '%(a)d %(b)s' % {'a': num, 'b': obj} 99 red baloons Keith On Aug 22, 12:28 am, "Ronny Haryanto" <[EMAIL PROTECTED]> wrote: > On Thu, Aug 21, 2008 at 10:41 PM, Joost Cassee <[EMAIL PROTE

Re: How do I alter the behavior of django.db.models.Options.contribute_to_class when testing

2008-08-21 Thread Peter Magnusson
Quite understandable. I'll drop it for the moment as I have what I need to get my project going but as Arnold said- I'll be back.. 2008/8/22, Russell Keith-Magee <[EMAIL PROTECTED]>: > > On Fri, Aug 22, 2008 at 12:39 AM, crippledcanary > <[EMAIL PROTECTED]> wrote: >> >> I am working on http://cod