Re: Call for comments: CommonMiddleware (and others) break streaming HttpResponse objects.

2008-07-01 Thread Malcolm Tredinnick
On Tue, 2008-07-01 at 14:02 +0400, Ivan Sagalaev wrote: > Malcolm Tredinnick wrote: > > I thought we'd fixed it, but apparently we haven't: if any iterator is > > passed into an HttpResponse, it should be converted to a string > > immediately so that things

Re: Call for comments: CommonMiddleware (and others) break streaming HttpResponse objects.

2008-07-01 Thread Malcolm Tredinnick
On Tue, 2008-07-01 at 14:42 +0400, Ivan Sagalaev wrote: > Malcolm Tredinnick wrote: > > Any middleware that examines the content has to pull the content into > > memory in case it's an iterator. If they don't they're buggy because > > they're cons

Re: type.__new__ vs. super(..., cls).__new__ in metaclasses

2008-07-03 Thread Malcolm Tredinnick
On Thu, 2008-07-03 at 02:06 -0700, Christian wrote: [...] > Should I send in patches for django.db.models.ModelBase, > django.newforms.DeclarativeFieldsMetaclass, and > django.newforms.MediaDefiningClass? Sounds like a reasonable idea. Make patches against the right branches, though, please. Dec

Re: type.__new__ vs. super(..., cls).__new__ in metaclasses

2008-07-03 Thread Malcolm Tredinnick
On Thu, 2008-07-03 at 14:56 +0200, Christian Tanzer wrote: [...] > I'd propose to write that check as > > parents = [b for b in bases if isinstance(b, ModelBase)] > if parents: > return super(ModelBase, cls).__new__ (cls, name, bases, attrs) > ... > > Simpler

Re: #7560: Delegate (most) type conversion to backends

2008-07-03 Thread Malcolm Tredinnick
On Thu, 2008-07-03 at 16:57 -0400, Leo Soto M. wrote: > Hi all!, > > I've posted a patch[1] with a small refactor to some Field's > get_db_prep_* methods. Basically, for non-basic field types, the > database-prepared values is not computed by the Fields anymore, but > delegated to DatabaseOperat

Re: QueryDict.iteritems behaves differently than QueryDict.items

2008-07-03 Thread Malcolm Tredinnick
On Fri, 2008-07-04 at 01:54 +0200, Ludvig Ericson wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Jul 4, 2008, at 00:45, Jure Vrscaj wrote: > > > Could this be fixed in 1.0? It breaks compatibility, I know. > > > Although I'm not in any kind of position of making such a decisi

Re: dict variable in template

2008-07-04 Thread Malcolm Tredinnick
On Fri, 2008-07-04 at 19:20 -0700, Jason wrote: > Hello, > > I'm a newbie and using Django in the context of Google App Engine. In > my Python code I have: > url = users.create_login_url(self.request.uri) > data['attribute1'] = 10 > data['attribute2'] = 20 > formdata = { > 'data': data, >

Re: dict variable in template

2008-07-04 Thread Malcolm Tredinnick
And I only just noticed you posted to django-dev instead of django-users. This isn't the right list for that. Apologies for answering your question. Malcolm --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django d

Re: Status of #6621

2008-07-05 Thread Malcolm Tredinnick
On Sat, 2008-07-05 at 15:58 -0600, Jeff Anderson wrote: > Hello I've run into a bug[0] with that affects a new app that is 'out > there' and is experimental. I have to apply this patch to get the app to > work. There doesn't seem to be anything controversial about the patch. > I've updated the

Re: Status of #6621

2008-07-05 Thread Malcolm Tredinnick
On Sun, 2008-07-06 at 10:40 +1000, Malcolm Tredinnick wrote: > > On Sat, 2008-07-05 at 15:58 -0600, Jeff Anderson wrote: > > Hello I've run into a bug[0] with that affects a new app that is 'out > > there' and is experimental. I have to apply this patch t

Correct URL paths and compromises (ticket #285)

2008-07-05 Thread Malcolm Tredinnick
I thought I'd sit down yesterday, do a final review of #285 and commit it. I was naïve. It turned out to be all I did for the day. There are some compromises needed somewhere, so it's time for audience participation. When responding to this email, please try to keep in mind that there are many, m

Re: Correct URL paths and compromises (ticket #285)

2008-07-05 Thread Malcolm Tredinnick
No matter how careful I am with the "set everything out", something always gets forgotten ... On Sun, 2008-07-06 at 11:51 +1000, Malcolm Tredinnick wrote: [...] > Solution #3 > === > > We shove the current SCRIPT_NAME prefix into the currently active > contex

Re: Correct URL paths and compromises (ticket #285)

2008-07-05 Thread Malcolm Tredinnick
On Sat, 2008-07-05 at 19:53 -0700, Ken Arnold wrote: > On Jul 5, 9:51 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > Solution #1 > > === > > SITE_PREFIX="/site_prefix/" > > > > urlpatterns = patt

Re: type.__new__ vs. super(..., cls).__new__ in metaclasses

2008-07-06 Thread Malcolm Tredinnick
On Thu, 2008-07-03 at 15:38 +0200, Christian Tanzer wrote: > > Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > On Thu, 2008-07-03 at 14:56 +0200, Christian Tanzer wrote: > > [...] > > > I'd propose to write that check as > > > > &g

Re: Correct URL paths and compromises (ticket #285)

2008-07-06 Thread Malcolm Tredinnick
On Sun, 2008-07-06 at 16:21 +0400, Ivan Sagalaev wrote: > Malcolm Tredinnick wrote: > > > >PythonHandler django.core.handlers.modpython > >SetEnv DJANGO_SETTINGS_M

Re: Proposal for dynamic form choices

2008-07-06 Thread Malcolm Tredinnick
On Sun, 2008-07-06 at 10:39 -0500, Joseph Kocherhans wrote: > Dynamic choices become an argument to the form constructor. The > argument is a dictionary of fieldname, choices pairs where choices is > either the choices structure we currently use, or a queryset. This doesn't feel a lot less compl

Re: Correct URL paths and compromises (ticket #285)

2008-07-06 Thread Malcolm Tredinnick
On Sun, 2008-07-06 at 18:59 -0700, Graham Dumpleton wrote: [...] > If using mod_python 3.3, then from memory, in simple case one can > access: > > req.hlist.location > > and it should give you the Location directive mount point, which > should logically be the same as SCRIPT_NAME. > > This m

Re: django.contrib.sessions problems

2008-07-07 Thread Malcolm Tredinnick
On Mon, 2008-07-07 at 06:48 -0700, mrts wrote: > I'd like to get some feedback for the following major tickets > regarding sessions, all of which are in scope for 1.0. > > 1) Session key collisions: http://code.djangoproject.com/ticket/1180 > > Due to the birthday paradox, sqrt(n) is roughly th

Re: Testing django-admin and manage.py

2008-07-07 Thread Malcolm Tredinnick
On Mon, 2008-07-07 at 22:00 +0800, Russell Keith-Magee wrote: [...] > I would also appreciate it if anyone could confirm that the same test > approach will work for Windows. I have almost no access to Windows > boxes for development purposes, so I'm completely in the dark here. > However, as far

Re: django.contrib.sessions problems

2008-07-07 Thread Malcolm Tredinnick
On Mon, 2008-07-07 at 08:28 -0700, mrts wrote: > > > Due to the birthday paradox, sqrt(n) is roughly the number you need to > > > have a 50% collision chance when picking items at random from an > > > inexhaustible set of n items. (0, sys.maxint - 1) is currently the > > > random range. On 32-bit

Re: django.contrib.sessions problems

2008-07-07 Thread Malcolm Tredinnick
On Mon, 2008-07-07 at 10:09 -0700, digitalxero wrote: [...] > The issue may actually be with the get_or_create() method of blocking > collisions since if it generates a duplicate id it just grabs that > data from the table and runs with it (I think), but whatever the > actual cause of the issue t

Re: Reminder: "Must-have" feature freeze in two weeks

2008-07-07 Thread Malcolm Tredinnick
On Mon, 2008-07-07 at 13:58 -0500, Jacob Kaplan-Moss wrote: > Hi folks -- > > This is your friendly reminder the three "must-have" features on the > roadmap are due on two weeks -- Django 1.0 alpha is due for release on > July 20th. > > We've got two sprints between then and now (see > http://c

Re: django.contrib.sessions problems

2008-07-08 Thread Malcolm Tredinnick
On Tue, 2008-07-08 at 10:30 +0400, Ivan Sagalaev wrote: > Malcolm Tredinnick wrote: > > The rest of the conversation should > > proceed on the assumption that the bug about creating unique database > > entries will be fixed first. > > Now I think that the problem

Re: Clarification on what is getting into v1 & Ticket 3148

2008-07-08 Thread Malcolm Tredinnick
On Tue, 2008-07-08 at 01:24 -0700, [EMAIL PROTECTED] wrote: > So our team is very fond of Ticket 3148 "Add getters and setters to > model fields" which is in the "ready for checkin" stage. Does that > mean it will be merged to the trunk soon (and thus become part of v1 > release)? > > If not, wh

Re: django.contrib.sessions problems

2008-07-08 Thread Malcolm Tredinnick
On Tue, 2008-07-08 at 19:27 +1000, Malcolm Tredinnick wrote: [...] > It's almost like we need some kind of ticket tracking system so that > these things don't get lost and people won't start threads saying "look > at mine! look at mine!" Oh, wait ... we do have

Re: django serializers are not thread safe?

2008-07-08 Thread Malcolm Tredinnick
On Tue, 2008-07-08 at 05:49 -0700, sector119 wrote: > HI All! > > I have to deserialize, serialize objects in multiple threads with > django serializers. > > But when I run Deserializer = > serializers.get_deserializer(SERIALIZATION_FORMAT) in my threads (more > then one, with _one_ thread all

Re: MS SQL pyodbc backend update to trunk

2008-07-08 Thread Malcolm Tredinnick
On Tue, 2008-07-08 at 21:26 +0800, vcc wrote: > Thanks for Russ Magee, I see. > > I just updated this backend, it's look like everything work fine for me. I > have some projects working with this backend, I'll keep improve it. Please > check the patch in the attachments. So the best thing to

Re: Future-proofing against circular imports -- sane for post-1.0?

2008-07-08 Thread Malcolm Tredinnick
On Tue, 2008-07-08 at 09:55 -0500, Tom Tobin wrote: [...] > I'm curious as to > whether others think we can still manage this cleanly post-1.0. If we > can, great! — I'll just wait until then. If not, is there any chance > we can squeeze this in somewhere? It depends on what will change. "fro

Re: Future-proofing against circular imports -- sane for post-1.0?

2008-07-08 Thread Malcolm Tredinnick
On Tue, 2008-07-08 at 19:26 -0500, Tom Tobin wrote: [...] > I don't want to change the public APIs. If "from django import > templates" works now, it should work after I'm done. The chief BICs > would be for importing non-public pieces, and even in those cases I > think a period with a Deprecia

Re: Add a helper function in UploadedFile's API for writing files on disk?

2008-07-11 Thread Malcolm Tredinnick
On Thu, 2008-07-10 at 22:31 -0700, Julien Phalip wrote: > Hi, > > I see what may be a gap in the new upload system's API. Please correct > me or point me to the right place if I'm wrong. > > Once the file is uploaded and my view receives the UploadedFile > instance, I'd like to write the file o

Re: about templatetag namespaces

2008-07-11 Thread Malcolm Tredinnick
On Thu, 2008-07-10 at 20:38 +0530, Amit Upadhyay wrote: > Hi, > > I have identified a few issues over the time that makes working with > custom django template tags/filters a little less than ideal for me. > > My chief problem is: if I see an unknown/unfamiliar tag/filter and > want to locate t

Re: Make clickable area of object links larger

2008-07-12 Thread Malcolm Tredinnick
On Sat, 2008-07-12 at 05:26 -0700, Tai Lee wrote: > Even better, make the entire row the link (like trac). I don't see why > only the value of the first field should be the link. That's a usability disaster. You accidentally click anywhere to give focus to the window and it runs off to some rand

Re: Make clickable area of object links larger

2008-07-12 Thread Malcolm Tredinnick
On Sat, 2008-07-12 at 19:51 +0700, Mikhail Gusarov wrote: > Twas brillig at 22:43:11 12.07.2008 UTC+10 when [EMAIL PROTECTED] did gyre > and gimble: > > >> Even better, make the entire row the link (like trac). I don't see > >> why only the value of the first field should be the link. > > M

Choice of solutions for #7411

2008-07-14 Thread Malcolm Tredinnick
In essence, ticket #7411 says that for SQLite (only, amongst our core back-ends), having a cursor that contains partially read results will cause write-commit problems when saving something to the database. In code, which might be easier to understand, something like this will be problematic somet

Re: Getting rid of get_db_prep_lookup on Field subclasses?

2008-07-15 Thread Malcolm Tredinnick
On Tue, 2008-07-15 at 11:49 -0400, Leo Soto M. wrote: > After fixing some corner cases of #7560[1], and realizing that it is > too easy to write a wrong get_db_prep_lookup method (example: > #7448[2]), I have reached the conclusion that there is no reason to > have *two* methods for doing the pyt

Re: API change in set_cookie for 1.0?

2008-07-15 Thread Malcolm Tredinnick
On Tue, 2008-07-15 at 18:49 -0500, Jeremy Dunck wrote: > I was using HttpResponse.set_cookie for the first time and annoyed > that expires has to be a properly-formatted string. > > Why not take a datetime and do the formatting in the function? > > Obviously this is a breaking change, unless we

Re: API change in set_cookie for 1.0?

2008-07-15 Thread Malcolm Tredinnick
On Tue, 2008-07-15 at 19:15 -0500, Jeremy Dunck wrote: > On Tue, Jul 15, 2008 at 7:14 PM, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On Tue, Jul 15, 2008 at 6:56 PM, Malcolm Tredinnick > > <[EMAIL PROTECTED]> wrote: > >> > > >> Yeah, we s

Re: Generic relations and non-integer primary keys

2008-07-16 Thread Malcolm Tredinnick
On Wed, 2008-07-16 at 01:13 -0700, Rudolph wrote: > The documentation for Generic Relations uses a PositiveIntegerField > for the "object-id". However some models might have a non-integer > field as a primary key, so it might be good to add a note to the > documentation that a different field typ

Re: ~Q broken?

2008-07-16 Thread Malcolm Tredinnick
On Wed, 2008-07-16 at 10:12 -0700, serbaut wrote: > Consider the following equivalent queries based on the weblog model > from the documentation: > > Blog.objects.filter(name="myblog").exclude(entry__body_text__contains="blah > blah") > Blog.objects.filter(Q(name="myblog") & > QNot(Q(entry__body

Re: ~Q broken?

2008-07-16 Thread Malcolm Tredinnick
On Wed, 2008-07-16 at 10:46 -0700, serbaut wrote: > There is no m2m relation involved in the example. Yes, you're right. It's not many-to-many, but it is multi-valued. It's a reverse many-to-one, which means one blog maps to many entries. The logic for the query construction still stands. [...]

Re: ~Q broken?

2008-07-16 Thread Malcolm Tredinnick
On Wed, 2008-07-16 at 13:15 -0700, serbaut wrote: > Thank you for your replies. > > > The problem is that the filter you specified was not returning the > > correct answer in 0.96. You're asking that Django returns an incorrect > > result to make your code faster. It's possible to give incorrect

Re: How to add a new DB backend?

2008-07-16 Thread Malcolm Tredinnick
On Wed, 2008-07-16 at 17:29 -0400, Michael Miller wrote: > Hi, > > I'm interested in building a couchDB backend for django. Is there > any documentation on how to start adding a new backend? The code is the documentation here (it's Python, so it's just executable pseudo-code, after all). :-)

Re: ~Q broken?

2008-07-16 Thread Malcolm Tredinnick
On Wed, 2008-07-16 at 20:44 -0400, Steve Holden wrote: > Malcolm Tredinnick wrote: > > > > On Wed, 2008-07-16 at 10:12 -0700, serbaut wrote: > >> Consider the following equivalent queries based on the weblog model > >> from the documentation: > >> >

Re: ~Q broken?

2008-07-17 Thread Malcolm Tredinnick
On Thu, 2008-07-17 at 02:39 -0700, Göran Åström wrote: > In my view the 'not' can be interpreted differently. > Look at the following requests: > > 1. Give me blogs with entries matching a criteria. > 2. Give me blogs with entries not matching a criteria. > 3. Give me blogs without entries match

Re: ~Q broken?

2008-07-18 Thread Malcolm Tredinnick
7;s stick with what we've got now and move on. Hopefully you can appreciate that what Django is doing is still logical, even if you don't agree with the choice we've made, and you can see that there are multiple possibilities, so we had to choose one. Regards, Malcolm > > Re

Re: url template tag, unhelpful when failing

2008-07-18 Thread Malcolm Tredinnick
On Fri, 2008-07-18 at 19:30 +0200, Mikael Moutakis wrote: > Hi > I've running from trunk and recently switched to the NFA-branch. I > found that the URL templatetag is unhelpful when failing to match a > url. I patched my own copy of the function URLNode in > django.template.defaulttags to return

Re: Closing nfa-fixed tickets?

2008-07-19 Thread Malcolm Tredinnick
On Sat, 2008-07-19 at 17:09 -0400, Karen Tracey wrote: > Now that newforms-admin is merged, tickets tagged with nfa-fixed ought > to be closed as fixed, right? Does that need to be done manually or > will something automagic be run that does it? (It doesn't appear that > there are all that many

Re: Is URL template tag's syntax going to change?

2008-07-20 Thread Malcolm Tredinnick
On Sun, 2008-07-20 at 17:16 +0400, Ivan Sagalaev wrote: > Julien Phalip wrote: > > Hi, > > > > For months, there has been a mention in the url tag's documentation: > > > > "Note that the syntax for this tag may change in the future, as we > > make it more robust." [1] > > > > Is that mention s

Re: Is URL template tag's syntax going to change?

2008-07-20 Thread Malcolm Tredinnick
On Sun, 2008-07-20 at 21:37 +0200, Johannes Dollinger wrote: > I'd prefer treating unquoted parameters as variables. We've already had this thread in the past. It's really up to Adrian and Jacob now, although technically, the decision's been made: there just isn't the interest to change and it w

SCRIPT_NAME/PATH_INFO, etc, changes

2008-07-21 Thread Malcolm Tredinnick
In [8015] I finally landed the patch to fix a number of issue with URL parsing that we've been talking about. It explicitly fixes #285, #1516 and #3414, but possibly others as well, and is based on a patch that John Melesky wrote at a sprint last year (although I forgot to thank him in the commit

Re: Table Row count: Limiting factor

2008-07-21 Thread Malcolm Tredinnick
On Mon, 2008-07-21 at 08:13 -0700, madhav wrote: > Hello guys, I am just confused with a fundamental db problem. I have > table which has got 48 lakh rows(each row has got 8 fields, all > INDEXED) and I just need to fetch 500 rows from it. Would that take > more time than extracting the same numb

Re: django sites subframework confusing

2008-07-21 Thread Malcolm Tredinnick
On Mon, 2008-07-21 at 20:27 -0700, Trent wrote: > Hi all- > > I am having a very hard time tracking down some detailed documentation > on the sites subframework. I have read the django book and gone > through the tutorial. I've also read the Sites documentation page. I > find the documentatio

Re: MySQL BINARY WHERE Clauses

2008-07-21 Thread Malcolm Tredinnick
On Tue, 2008-07-22 at 01:29 -0500, David Cramer wrote: [...] > In summary, this is, in fact, a problem in the Django codebase, and > need's addressed, as it's causing issues for myself, and probably a > number of other people, even if they haven't realized it yet. So let's start off by assuming

Re: MySQL BINARY WHERE Clauses

2008-07-22 Thread Malcolm Tredinnick
David, On Tue, 2008-07-22 at 01:51 -0500, David Cramer wrote: > Sorry, to be more clear, that is an *exact* match on what is in the > database, but using the BINARY form does not return the result. Please open a ticket for this so it doesn't get forgotten. You'll somehow have to manage the mail

Re: List of Backwards-compatible changes...

2008-07-22 Thread Malcolm Tredinnick
On Tue, 2008-07-22 at 11:37 -0700, jedie wrote: > There exist the gread wiki page: > http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges > I think it would be nice if there is the same list for Backwards- > compatible changes, too. > > Sometimes i find some parte in the documentatio

Re: How shall we use milestone "post 1.0"?

2008-07-22 Thread Malcolm Tredinnick
On Tue, 2008-07-22 at 17:05 +0200, Michael Radziej wrote: > Hi, > > before I create chaos - is it right to use this milestone for everything > that can not go into 1.0 (like any feature requests that are not on the > list)? There are about a 1000 tickets in Trac. It would be a shame if every si

Re: Backwards incompatible change by #4412 / r7977 (flatchoices)

2008-07-24 Thread Malcolm Tredinnick
On Tue, 2008-07-22 at 04:21 -0700, Michael Elsdörfer wrote: > Previously, get_FIELD_display(), for a blank or unknown value of > FIELD, return the value unchanged, e.g. say None or an empty string. > > After the change, it returns the automatically inserted blank choice > (---). This is due

Re: Localizing digits

2008-08-18 Thread Malcolm Tredinnick
Hi Joost, On Mon, 2008-08-18 at 06:48 -0700, Joost Cassee wrote: [...] > As a starting point I created a template filter that does the > replacing [1] (only for Arabic and Farsi at the moment), and now I'm > looking for the correct place to integrate localized digits into the > Django translation

Re: You've broken Oracle

2008-08-18 Thread Malcolm Tredinnick
On Mon, 2008-08-18 at 12:04 -0700, Matt Boersma wrote: > This is just a heads up since clearly some committers must be unaware: > checkins of the last two days have created 27 (yes, twenty-seven) new > test case failures for Oracle. I had been working on cleaning up the > existing few failures f

Re: You've broken Oracle

2008-08-18 Thread Malcolm Tredinnick
On Mon, 2008-08-18 at 17:20 -0300, Ramiro Morales wrote: > Matt, > > On Mon, Aug 18, 2008 at 4:04 PM, Matt Boersma <[EMAIL PROTECTED]> wrote: > > > > > Here is Leo Soto's buildbot, so you can see what I'm talking about: > > http://certenium.ingenium.cl:8080/hudson/job/django-trunk/ > > > > I'll

Re: Renaming of mailing lists to avoid user confusion

2008-08-19 Thread Malcolm Tredinnick
*sigh* Please take this thread to django-users. This list is for the internal development of django and this thread doesn't contribute to that. After all, the last half a dozen times such a thread was started (and I'm sure you carefully did your research before proposing it yet again), it wasn't

Re: recent MultiValueDict.iteritems change (changeset 8399)

2008-08-20 Thread Malcolm Tredinnick
On Tue, 2008-08-19 at 22:09 -0700, James Turk wrote: [...] > It seems that changing my code to use lists will give almost the same > result, but would it be possible to get an "iterlists" method to > replace the iteritems which was changed? This is probably worth leaving until after 1.0 for now.

Re: HTTP PUT request

2008-08-20 Thread Malcolm Tredinnick
On Wed, 2008-08-20 at 02:29 -0700, zvoase wrote: [...] > What I'm doing now is changing the method to POST, accessing the > request.raw_post_data attribute, and then changing the method back to > PUT. This seems a little unnecessary, and I'd like to suggest the > addition of a content attribute w

Re: You've broken Oracle

2008-08-20 Thread Malcolm Tredinnick
On Wed, 2008-08-20 at 09:47 -0700, Matt Boersma wrote: > Hi Justin, > > Sorry, I should have run the gis tests as well. (Is that Malcom > snickering I hear? I'm chastened.) I'm not snickering. We're chasing a lot of things here and cascading changes are kind of to be expected. Just like they

Re: You've broken Oracle

2008-08-20 Thread Malcolm Tredinnick
On Wed, 2008-08-20 at 10:03 -0700, Matt Boersma wrote: > On Aug 20, 10:50 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > There's one SQL syntax error that I can't fix, however (in > > regressiontests/queries/models.py). I'll look at the pickling

Re: uploaded file permissions

2008-08-20 Thread Malcolm Tredinnick
On Wed, 2008-08-20 at 12:13 -0700, Dan Watson wrote: > On Aug 14, 5:29 pm, Dan Watson <[EMAIL PROTECTED]> wrote: > > As mentioned a few times in #2070, uploaded files large enough to be > > streamed to a temporary file get created with a mode of 0600, as per > > python's tempfile.mkstemp. This ca

Re: You've broken Oracle

2008-08-20 Thread Malcolm Tredinnick
On Wed, 2008-08-20 at 12:10 -0700, Matt Boersma wrote: [...] > I now think reintroducing the extra_select approach might work better, > and perhaps could fix the GeoDjango issues as well. There's still the offer to add an extra paramater axis to the tuple inside extra_select if that helps at all

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's correct. The admin expects the URLs t

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: ldap authentication hangs under fcgi

2008-08-22 Thread Malcolm Tredinnick
On Fri, 2008-08-22 at 15:53 -0700, mattxbart wrote: > Has anyone used python-ldap under fastcgi? Through the python > interpreter I get expected results (con.simple_bind returns > authenticated status code or throws exception) but when executed > through the admin web form I get gateway timeouts

Re: validator_list still in docs

2008-08-23 Thread Malcolm Tredinnick
On Sat, 2008-08-23 at 16:02 +0200, Alex Rades wrote: > Hi, > validator_list in model fields (and maybe in form fields too) isn't > working at the moment. > > Could we remove it from the docs? It will be removed eventually, when all the remaining oldforms stuff is removed (before 1.0). Also, the

Re: Be explicit about which reverse lookup failed after r8211

2008-08-23 Thread Malcolm Tredinnick
On Sat, 2008-08-23 at 10:46 -0700, mrts wrote: [...] > I personally think both should make it into 1.0, but James seems to > oppose, so can we discuss this a bit further? The ticket is open. It will either be committed, postponed or closed as a dupe of something else. Let's leave it at that and

Re: #7443, #8453 and the timesince filter

2008-08-24 Thread Malcolm Tredinnick
Hey Russ, On Sat, 2008-08-23 at 23:25 +0800, Russell Keith-Magee wrote: > Hi all, > > In [8481], I committed a fix for #7443, dealing with a problem with > the timesince filter. About 20 minutes after I committed it, I became > aware of #8453, which is the same problem - except that #8453 sugges

Re: validator_list still in docs

2008-08-25 Thread Malcolm Tredinnick
On Mon, 2008-08-25 at 05:08 -0700, Dennis Schmidt wrote: > Hi there, > > if this will be deactivated in 1.0, how do I have to replace this? I > couldn't find an easy way like this in the docs yet. Validators are really only used by the admin in 0.96 (there was no model-aware validation there).

Re: Oracle IntregrityError and get_or_create test case

2008-08-25 Thread Malcolm Tredinnick
Hey Matt, On Mon, 2008-08-25 at 08:47 -0700, Matt Boersma wrote: > Hi Malcolm, > > I can wrap the execute() and executemany() calls in oracle\base.py in > a try/except that re-raises this specific error as an IntegrityError: > > try: > return Database.Cursor.execute(self, qu

Re: Oracle IntregrityError and get_or_create test case

2008-08-25 Thread Malcolm Tredinnick
On Sat, 2008-08-23 at 08:07 -0700, Matt Boersma wrote: [...] > However, I grep'ed the Django source and found two cases where we > catch IntegrityError specifically. cx_Oracle probably misbehaves > there currently, but I'm not sure how common these code paths are and > what errors could result.

Re: mark_safe, escape and conditional_escape

2008-08-25 Thread Malcolm Tredinnick
On Mon, 2008-08-25 at 10:29 -0700, Alex G wrote: > I don't know if this belongs on the dev board, but since it relates to > how the framework acts, I thought I'd give it a shot. Basically, I am > curious as to the function of escape vs. conditional_escape, and the > decision to use the former in

Re: HttpResponse as a file-like object

2008-08-25 Thread Malcolm Tredinnick
On Mon, 2008-08-25 at 12:26 -0700, zvoase wrote: > Devels, > I've noticed in the docs that HttpResponse objects, if initialised > with an iterator, cannot be used as file-like objects. This could be > fixed quite easily. There are lots of problems -- some subtle and some obvious -- when initia

Re: validator_list still in docs

2008-08-25 Thread Malcolm Tredinnick
On Mon, 2008-08-25 at 19:57 -0400, Michael Hrivnak wrote: > That is neither a direct nor indirect replacement for model-level validation. > > Many applications receive input from sources other than forms. Validation at > the form and model level are both valuable, but for different reasons.

Re: Status Post of Django-newcomments

2008-08-25 Thread Malcolm Tredinnick
On Mon, 2008-08-25 at 17:41 -0700, Jonathan Nelson wrote: > Any thoughts on when a beta is going to be released? Thejaswi's code was reviewed and given a final polish by Jacob over the last couple of weeks and it was committed to trunk a few hours ago. It will be in the next release or you can u

Re: contrib.auth tests

2008-08-26 Thread Malcolm Tredinnick
On Tue, 2008-08-26 at 18:09 -0700, Cam MacRae wrote: > contrib.auth view tests fail if required templates aren't found. This > seems a sensible default in line with Russell's post [1] The problem with that original position is that it overloads testing to include both testing the auth app's impl

Re: MySQL and Autocommit

2008-08-27 Thread Malcolm Tredinnick
On Sat, 2008-08-23 at 11:00 -0700, David Cramer wrote: > Recently I noticed a bunch of queries I was executing by hand (one's > which the ORM didn't support) were not being committed. > > I dug into the docs, and it clearly states that the default > transaction mode is autocommit, and mysql's de

Re: Django 1.0 and multithreading issues.

2008-08-28 Thread Malcolm Tredinnick
On Thu, 2008-08-28 at 16:42 -0700, Graham Dumpleton wrote: > Can someone give an update as to where Django 1.0 may stand in respect > of multithreading issues. > > I note that all the links to tickets referenced in: > > http://code.djangoproject.com/wiki/DjangoSpecifications/Core/Threading >

Re: queryset set difference

2008-08-29 Thread Malcolm Tredinnick
On Fri, 2008-08-29 at 10:51 -0700, ryan wrote: > I have 2 querysets q1 and q2. > > I want q3 = q2-q1, where q3 is a queryset object and contains only the > objects in q2 that are not in q1. > > Is there built in support for this operation? > > The only thing I can think to do is: > list( set(q

Re: queryset set difference

2008-08-29 Thread Malcolm Tredinnick
And because I wasn't concentrating about which list I was reading, here comes the obligatory statement: Please take any follow-ups to django-users. This mailing list is for the internal development of Django itself. "How to use" questions should go to the django-users mail

Re: Composite Primary Keys

2008-09-03 Thread Malcolm Tredinnick
On Tue, 2008-09-02 at 22:02 -0700, David Cramer wrote: > For anyone who's interested, it'd be great to meetup at DjangoCon to > go over a good design approach to composite fields. Take notes. There's going to be a lot going on at DjangoCon (including celebrating), so there will be a group who ar

Re: documentation: MySQL and Boolean Fields

2008-09-03 Thread Malcolm Tredinnick
On Wed, 2008-09-03 at 13:21 +0200, Michael Radziej wrote: > Hi, > > changeset 8802 introduced a small paragraph about Boolean database fields. > The problem is that the exact wording implies a guarantee to MySQL users > that they will always get 0 or 1. > > I think we should leave a door open t

Re: Composite Primary Keys

2008-09-03 Thread Malcolm Tredinnick
On Wed, 2008-09-03 at 23:22 -0700, David Cramer wrote: > This is one of those things that I really need to get hammered out > (for our platform). I'm willing to do all the work, but I need a > design around it to where the patch won't get rejected :) No question. And for that, we have this very

Re: TEMPLATE_STRING_IF_INVALID breaks admin ?

2008-09-09 Thread Malcolm Tredinnick
On Tue, 2008-09-09 at 09:15 -0700, ikshefem wrote: > Shouldn't the fact that TEMPLATE_STRING_IF_INVALID breaks admin be > marked as a bug ? > (see bug #2583) It's an undesirable feature that would be nice to remove. There's a ticket open for that somewhere. But TEMPLATE_STRING_IF_INVALID is stil

Re: multi-column field support (#5929)

2008-09-09 Thread Malcolm Tredinnick
On Tue, 2008-09-09 at 14:33 -0700, Justin Fagnani wrote: > I forgot to mention this as one of my ponies at djangocon, but I'd > really love to have multi-column fields. I particularly need this for > measurement and currency fields, which I think would be awesome to > have built-in. > > So is an

Re: ugettext_lazy changes (in case I get hit by a bus)

2008-09-10 Thread Malcolm Tredinnick
On Wed, 2008-09-10 at 10:17 +0200, Julien Demoor wrote: > I'm having a problem with the change in r8120, due to changing Django's > User model at runtime in an application's __init__ module. > > This worked well before r8120, but now it causes a lazy translation > string to be evaluated, followe

Re: Proposal: user-friendly API for multi-database support

2008-09-10 Thread Malcolm Tredinnick
Okay, there's lots to digest here, but a couple of things that need clarification / addition here that I spotted on the first reading. Also, as a general thing here, did you go back and read the various discussions we had about API when the multi-db Summer of Code project was running? If not, tha

Re: Proposal: user-friendly API for multi-database support

2008-09-10 Thread Malcolm Tredinnick
On Wed, 2008-09-10 at 20:40 +0100, Dan Fairs wrote: > > 2. Have a setting which lets you say "for model auth.User, use the > > get_connection method defined over here". This is made inelegant by > > the fact that settings shouldn't really contain references to actual > > function definitions, whi

Re: Solving registration once and for all?

2008-09-10 Thread Malcolm Tredinnick
On Wed, 2008-09-10 at 13:56 -0700, Simon Willison wrote: > On Sep 10, 9:18 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > Oh, please, no! Registration is a very fragile process. It simply > > doesn't work very well. It's a bit disappointing that it&

Re: Proposal: user-friendly API for multi-database support

2008-09-10 Thread Malcolm Tredinnick
On Wed, 2008-09-10 at 15:03 -0700, Mike Malone wrote: [...] > I think it just needs refining. My understanding is that related > fields was due for a refactor anyways, so this would probably be a > good time to do / think about it. I guess my point is that there needs > to be some non-internal A

Re: I want a pony: Distributed RCS

2008-09-10 Thread Malcolm Tredinnick
On Wed, 2008-09-10 at 16:15 -0600, Jeff Anderson wrote: > Jacob's git repo is great. Trac has at least a couple plugins that can > handle git repos. > > There are enough people who are willing to contribute to the development > of Django that it might not be a bad idea to consider moving to the

Re: I want a pony: Django Cheeseshop

2008-09-10 Thread Malcolm Tredinnick
On Wed, 2008-09-10 at 12:48 -0700, mrts wrote: > I think we largely have a consensus now (unless someone speaks up) -- Huh?! In my current timezone, the first mail in this thread arrived at 07:31 and you declared "consensus" at 12:48. A total of ten people participated in the thread in that fiv

Re: I want a pony: Distributed RCS

2008-09-10 Thread Malcolm Tredinnick
On Wed, 2008-09-10 at 18:58 -0600, Jeff Anderson wrote: > Malcolm Tredinnick wrote: [...] > > You don't even begin to approach why this might be a good idea for > > Django. So, what does it gain? > > > > Right now, you can already use your distributed VCS of choic

Re: A Real Abstract BaseDatabaseWrapper Class

2008-09-11 Thread Malcolm Tredinnick
On Thu, 2008-09-11 at 08:15 -0700, mtrier wrote: > I'd like to propose that we fix up the abstract BaseDatabaseWrapper > class so that it actually has all the hooks it needs. Right now the > two missing items I'm seeing are the absence of validation and > introspection. There is the expectation

Re: A Real Abstract BaseDatabaseWrapper Class

2008-09-11 Thread Malcolm Tredinnick
On Thu, 2008-09-11 at 13:17 -0700, mtrier wrote: > Malcolm, > > Thanks for the nice reply. > > On Sep 11, 2:08 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > Why? If your reason is self-documenting code for somebody implementing > > an external bac

<    1   2   3   4   5   6   7   8   9   10   >