Re: "@cache_page" bug...

2007-06-22 Thread Malcolm Tredinnick
On Fri, 2007-06-22 at 15:42 -0700, SmileyChris wrote: > I should really reply here rather than in the ticket: > > In that ticket I kinda agree with anonymous (who I'm guessing was > jedie). That ticket has a patch two months old, and since it's not > that critical it could sit there for much long

Re: "@cache_page" bug...

2007-06-23 Thread Malcolm Tredinnick
On Sat, 2007-06-23 at 10:35 +, SmileyChris wrote: > On Jun 23, 1:55 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > > Documentation should be kept up to date even if there is a bug - it's > > > easy to update it again when the main ticket is fixed

Re: boulder-oracle-sprint branch has been merged into trunk!

2007-06-23 Thread Malcolm Tredinnick
On Sun, 2007-06-24 at 00:23 +1000, Malcolm Tredinnick wrote: > In [5519] I have committed the Oracle branch changes into trunk. As usual, there's something I forgot... I flopped around quite a bit when setting up Oracle server and getting my settings right for being able to run the t

boulder-oracle-sprint branch has been merged into trunk!

2007-06-23 Thread Malcolm Tredinnick
In [5519] I have committed the Oracle branch changes into trunk. I've tested all five previously supported backends, plus the new Oracle code and all the tests pass for all of them (except for the expected MySQL backend failures when not using InnoDB). So, congratulations to the Boulder Sprinters

Re: boulder-oracle-sprint branch has been merged into trunk!

2007-06-23 Thread Malcolm Tredinnick
On Sat, 2007-06-23 at 13:38 -0600, Ian Kelly wrote: [...] > > Some information about permissions and settings already exists on the > OracleBranch wiki page, which could be dropped straight into the docs. I feel sheepish now. :-( Did not even occur to me to look at the wiki page. You're right;

Re: boulder-oracle-sprint branch has been merged into trunk!

2007-06-23 Thread Malcolm Tredinnick
Hi Carl, On Sat, 2007-06-23 at 13:14 -0500, Carl Karsten wrote: > Malcolm Tredinnick wrote: [...] > > No need to cover everything about setting up the database -- if somebody > > is choosing to use Oracle, we can assume they have the minimum necessary > > skills. > &g

Re: BooleanField and NullBooleanField (#2855 again)

2007-06-24 Thread Malcolm Tredinnick
On Sun, 2007-06-24 at 08:35 -0700, Mads Sulau Joergensen wrote: > Hi. > > Having looked at #2855 and wondered the resolution of that ticket, There's been no resolution on that ticket, from what I can see. Still open. > i > wanted to raise the discussion again. > > To me, and many others, it m

Re: boulder-oracle-sprint branch has been merged into trunk!

2007-06-24 Thread Malcolm Tredinnick
On Mon, 2007-06-25 at 00:53 +, [EMAIL PROTECTED] wrote: [...] > Hi Malcolm, > > While your tinkering with the backends can you fix #708 which relates > to the postgresql backend's unique use (as compared to all the other > backends) of the inet type of IPAddressFields? Dude, Jacob touched it

Re: Django Week in Review -- ATTN: Adrian Holovaty

2007-06-24 Thread Malcolm Tredinnick
On Sun, 2007-06-24 at 21:21 -0500, Clint Ecker wrote: [...] > Let me know what you guys think of the tone, my wordiness, how I split > up the post into "random weblinks," changeset roundup, and SoC stuff, > and anything else that comes to mind. Again, please keep in mind that > this sort of leng

Re: Bug: Underscores in primary keys and quote/unquote...

2007-06-26 Thread Malcolm Tredinnick
On Tue, 2007-06-26 at 01:30 -0700, jedie wrote: > > I have a model class like this: > > class PagesInternal(models.Model): > name = models.CharField(primary_key=True, maxlength=150) > ... > --

Re: 4102, updating only specific fields / dirty flag

2007-06-26 Thread Malcolm Tredinnick
On Tue, 2007-06-26 at 03:30 -0700, Collin Grady wrote: > I was trying to bump the previous thread: > > http://groups.google.com/group/django-developers/browse_thread/thread/b8e2eaa6b5190b19/7e608ee8822d3a60 > > But Google Groups won't let me reply to it (maybe it's too old?) ;) > > The reason

Re: Bug: Underscores in primary keys and quote/unquote...

2007-06-26 Thread Malcolm Tredinnick
On Tue, 2007-06-26 at 06:29 -0700, jedie wrote: > On 26 Jun., 13:53, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > Since the bug is crash inside change_stage() in the same file, try to > > work out what why the wrong string is being passed in there. This should >

Re: Request for Model History to be merged into trunk (updated code supplied)

2007-06-26 Thread Malcolm Tredinnick
On Tue, 2007-06-26 at 19:43 +, Thom Linton wrote: > The 'fullhistory' branch has been lying dormant for a few months it > seems (at least no commits to the django hosted branch) - so I've > recently updated and implemented leftover functionality in a modified > version of the branch. > > It i

Re: Tests 'datatypes' fail

2007-06-27 Thread Malcolm Tredinnick
On Wed, 2007-06-27 at 14:12 -0600, Ian Kelly wrote: > On 6/27/07, Michael Radziej <[EMAIL PROTECTED]> wrote: > > Hi, > > > > it seems I'm the only one to run the test suite with mysql ;-) > > > > Ticket #4711 - http://code.djangoproject.com/ticket/4711 > > > > Currently the tests break because mys

Re: How many errors is the test suite encountering?

2007-06-30 Thread Malcolm Tredinnick
Hey Adrian, On Sat, 2007-06-30 at 20:45 -0500, Adrian Holovaty wrote: > To those folks who run Django's unit-test suite on a regular basis -- > > How many errors -- and, more precisely, *which* errors -- does the > Django test suite currently raise? > > I've been out of the loop traveling and g

Oracle support on Unicode branch

2007-07-02 Thread Malcolm Tredinnick
I have committed some changes to fix the Oracle support on the Unicode branch (in [5584]). Would appreciate any review and feedback from the Oracle developers, since it seemed much more fiddly than I would have liked, although much of that was because it took me ages to work out how to manage clie

Re: regression test failures

2007-07-02 Thread Malcolm Tredinnick
On Mon, 2007-07-02 at 16:21 +0200, Lars Stavholm wrote: > Hi All, > > I'm trying to build an rpm package for django, both stable (0.96) > and svn trunk. In the process I want to verify/test the installation > using the runtests.py in the tests subdirectory. It all seems to work > OK, but I get re

Unicode branch - last call for comments(?)

2007-07-03 Thread Malcolm Tredinnick
Unless anybody has strong objections, I'd like to merge the Unicode branch into trunk very soon (within a few days, if nobody cares much). This should introduce no major backwards incompatibilities, as far as I'm aware. The branch is no less stable than trunk and fixes a number of popular bugs --

Re: Unicode branch - last call for comments(?)

2007-07-03 Thread Malcolm Tredinnick
On Tue, 2007-07-03 at 14:30 -0500, Jacob Kaplan-Moss wrote: > On 7/3/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > I've finished looking through the diffs and checked in my changes in > > http://code.djangoproject.com/changeset/5597 . Looks great, and I have > > a newfound respect for the amo

Re: Unicode branch - last call for comments(?)

2007-07-03 Thread Malcolm Tredinnick
On Wed, 2007-07-04 at 10:19 +0800, Russell Keith-Magee wrote: > On 7/3/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > > Russell, Adrian, Jacob: anybody want to read through a couple of > > thousand lines of diffs for review or do you feel like trusting

Re: "@cache_page" bug...

2007-07-04 Thread Malcolm Tredinnick
On Wed, 2007-07-04 at 00:30 -0700, jedie wrote: > On 23 Jun., 12:40, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > Fortunately,it'sallincrediblymoot, since the real fix (in #1015) is > > just about ready to go.Itwas being looked at again as a result of Gary

Re: Unicode branch - last call for comments(?)

2007-07-04 Thread Malcolm Tredinnick
On Tue, 2007-07-03 at 22:53 +1000, Malcolm Tredinnick wrote: > Unless anybody has strong objections, I'd like to merge the Unicode > branch into trunk very soon (within a few days, if nobody cares much). Merged in [5609]. Regards, Malcolm -- Quantum mechanics: the dreams stuff

Re: Unicode branch - last call for comments(?)

2007-07-04 Thread Malcolm Tredinnick
On Wed, 2007-07-04 at 22:35 +1000, Malcolm Tredinnick wrote: > On Tue, 2007-07-03 at 22:53 +1000, Malcolm Tredinnick wrote: > > Unless anybody has strong objections, I'd like to merge the Unicode > > branch into trunk very soon (within a few days, if nobody cares much). >

Re: Unicode branch - last call for comments(?)

2007-07-04 Thread Malcolm Tredinnick
Hi David, Thanks for the feedback. A few comments below... On Wed, 2007-07-04 at 15:12 +0200, David Danier wrote: > > Merged in [5609]. > > Great! > > There is only one thing I ran into so far. And I would not bring this up > now, if the commit didn't say "This should be fully backwards compa

Re: runtests.py MySql failures=2

2007-07-04 Thread Malcolm Tredinnick
On Wed, 2007-07-04 at 11:32 -0500, Carl Karsten wrote: > DATABASE_ENGINE = 'sqlite3' > ./runtests.py - no errors. > > change to: > DATABASE_ENGINE = 'mysql' > (first time running the tests on MySql, so chance something is hozed on my > end.) > > > [EMAIL PROTECTED]:~/django/django-src/tests$

Re: newforms documentation

2007-07-04 Thread Malcolm Tredinnick
On Wed, 2007-07-04 at 14:19 -0400, Victor Ng wrote: > Hi, > > My earlier confusion with the newforms 'id' attributes was caused by > some poor wording in the documentation. > > Just above this link is some unnecessarily wordy text: > > http://www.djangoproject.com/documentation/newforms/#as-p >

Re: Documentation should never show non-working examples. - was: "@cache_page" bug...

2007-07-05 Thread Malcolm Tredinnick
On Thu, 2007-07-05 at 00:39 -0700, jedie wrote: > On 4 Jul., 09:51, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Wed, 2007-07-04 at 00:30 -0700, jedie wrote: > > > "shortly"... But my "change docu" ticket is opened 2 weeks ago: > > >ht

Re: auto_now_add overwrites a given date

2007-07-05 Thread Malcolm Tredinnick
On Thu, 2007-07-05 at 07:30 +, Noam wrote: > Hello, > > The question is, as I see it, what bad thing would happen if > auto_now_add would set the date only if it's None. It's a backwards-incompatible change, so we'd need a strong reason to change it. [...] > I think that it would save othe

Re: auto_now_add overwrites a given date

2007-07-05 Thread Malcolm Tredinnick
On Thu, 2007-07-05 at 10:52 +0300, Noam Raphael wrote: > On 7/5/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > It's a backwards-incompatible change, so we'd need a strong reason to > > change it. > [...] > > This line of reasoning is

Re: Documentation should never show non-working examples. - was: "@cache_page" bug...

2007-07-05 Thread Malcolm Tredinnick
On Thu, 2007-07-05 at 11:52 +0200, Nicola Larosa wrote: > jedie wrote: > > Sorry, you have misunderstood this. Thus I have not meant this. ;) > > > > Fixing the ticket #1015 is not important to me. > > Insisting on telling people what to do, and not really doing anything > yourself, is obnoxious

Re: runtests failures

2007-07-05 Thread Malcolm Tredinnick
On Thu, 2007-07-05 at 12:50 -0500, Carl Karsten wrote: > I'm slowly getting this a bit more readable, but I won't post duplicates. Are you asking for help diagnosing these or trying to report a bug? You've just posted a bunch of output here without any surrounding text, so it's a bit hard to work

Re: runtests failures

2007-07-05 Thread Malcolm Tredinnick
On Fri, 2007-07-06 at 01:21 -0500, Carl Karsten wrote: > Malcolm Tredinnick wrote: [...] > > > > Some of the MySQL ones are expected, as has been mentioned in threads > > here recently. Others -- all the encoding-related ones -- look like you > > might need to set T

Re: runtests failures

2007-07-06 Thread Malcolm Tredinnick
On Fri, 2007-07-06 at 08:59 -0500, Carl Karsten wrote: [...] > > All going smoothly there should be only only one failed test: > > modeltests.fixtures (two sub-tests in there fail because the default > > MySQL storage engine does not support transactions, but it's reported as > > "failures=1"). >

Small concern in newforms-admin

2007-07-06 Thread Malcolm Tredinnick
I've been merging the Unicode changes into newforms-admin tonight (won't be finished until tomorrow; I'm losing willpower) and I came across this code (in admin/sites.py): if u'@' in username: # Mistakenly entered e-mail address instead of username? Look it up. try:

Re: Skipping tests that are bound to fail?

2007-07-06 Thread Malcolm Tredinnick
On Fri, 2007-07-06 at 17:24 +0200, Michael Radziej wrote: > Hi, > > I think it's a bit confusing that even with correct settings some tests > always fail for some backends. If I happen to compile any other software > package and the test suite fails, I usually suspect something went wrong. In > a

Re: Unicode branch - last call for comments(?)

2007-07-07 Thread Malcolm Tredinnick
On Wed, 2007-07-04 at 12:12 -0500, Adrian Holovaty wrote: > On 7/4/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Oh, something I just remembered: newforms-admin will be a bear to merge > > from trunk next time. There are some necessary Unicode changes in the > >

Re: Ned Batchelder's hyphenate

2007-07-10 Thread Malcolm Tredinnick
On Tue, 2007-07-10 at 18:26 +, [EMAIL PROTECTED] wrote: > > On Jul 9, 10:48 pm, "Jacob Kaplan-Moss" <[EMAIL PROTECTED]> > wrote: > > Maybe an addition to django.contrib.humanize? > > If we decide to only support English, then I am fine with including > this as part of django.contrib.humanize

Re: urlconf, strings vs. callables

2007-07-10 Thread Malcolm Tredinnick
On Tue, 2007-07-10 at 08:39 -0400, Sean Patrick Hogan wrote: > The "pythonic" way is a new addition to Django if I'm not mistaken. > > I personally prefer calling by string because (I'm assuming here) it > doesn't load the function unless it needs to. Bad assumption. The first time you access t

Re: urlconf, strings vs. callables

2007-07-10 Thread Malcolm Tredinnick
On Tue, 2007-07-10 at 09:20 +0200, Gábor Farkas wrote: > hi, > > when specifying view-functions in the urlconfs, you can either specify > them by their name as a string, or by referencing them "pythonically" > (importing them, and giving the urlconf the callable). > > which is the "preferred"

Re: mod_python: Why use req.uri, not req.path_info?

2007-07-10 Thread Malcolm Tredinnick
On Tue, 2007-07-10 at 23:45 +, Graham Dumpleton wrote: [...] > Django has problems in related areas with CGI and WSGI type hosting > solutions as well. For example, mod_wsgi, FastCGI, SCGI, and CGI. This > is because Django ignores SCRIPT_NAME variable which defines the mount > point of the ap

Re: db parameter impemtation

2007-07-12 Thread Malcolm Tredinnick
On Wed, 2007-07-11 at 16:10 -0500, Carl Karsten wrote: [...] > It is pretty much this simple: > > import settings > import MySQLdb > > con = MySQLdb.connect(user=settings.DATABASE_USER, > passwd=settings.DATABASE_PASSWORD, > db=settings.DATABASE_NAME ) > cur=con.cursor() > > cur.execu

Re: Proposal: customtags, a higher-level API for template tags

2007-07-12 Thread Malcolm Tredinnick
On Thu, 2007-07-12 at 01:58 -0500, Tom Tobin wrote: > Over at the Lawrence Journal-World, we have a bunch of custom template > tags included in Ellington, our commercial CMS based on Django. One > day, I finally got fed up with writing the same damned boilerplate > code for custom tags over and o

Re: Unicode + memcache = bug

2007-07-12 Thread Malcolm Tredinnick
On Thu, 2007-07-12 at 05:34 -0500, Jeremy Dunck wrote: > When using the low-level cache and memcache as the backend, you're > likely to run into this stack trace: > > ... > File "/pegasus/code/current/django/core/cache/backends/memcached.py" in set > 48. self._cache.set(key, value, timeout or s

Re: Proposal: customtags, a higher-level API for template tags

2007-07-12 Thread Malcolm Tredinnick
On Thu, 2007-07-12 at 23:24 +1000, Malcolm Tredinnick wrote: [...] > > A few comments (mostly questions) from an initial reading: One I forgot... (10) On my radar to commit fairly soon is one of Brian Harring's speed-ups for variable resolution -- #3453. It looks like this won'

Re: Unicode + memcache = bug

2007-07-12 Thread Malcolm Tredinnick
On Thu, 2007-07-12 at 08:55 -0500, Jeremy Dunck wrote: > On 7/12/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > > On Thu, 2007-07-12 at 05:34 -0500, Jeremy Dunck wrote: > ... > > > What's going on here is that the memcache.py library does

Re: db parameter impemtation

2007-07-12 Thread Malcolm Tredinnick
On Thu, 2007-07-12 at 22:27 +1000, Malcolm Tredinnick wrote: > On Wed, 2007-07-11 at 16:10 -0500, Carl Karsten wrote: > [...] > > It is pretty much this simple: > > > > import settings > > import MySQLdb > > > > con = MySQLdb.connect(us

Re: Move form_for_instance and form_for_model into django.db.models.Model?

2007-07-12 Thread Malcolm Tredinnick
On Thu, 2007-07-12 at 18:21 -0400, Todd O'Bryan wrote: > form_for_instance and form_for_model are great, but if you have to tweak > the form in any way (say you want to use a non-default widget for one of > the data fields) and want to use it more than once, you're reduced to > defining a new For

Re: Unicode Keys

2007-07-12 Thread Malcolm Tredinnick
On Thu, 2007-07-12 at 20:08 -0500, Jeremy Dunck wrote: > On 7/12/07, Collin Grady <[EMAIL PROTECTED]> wrote: > > For instance, if I have an input with name="語" and request.POST > > doesn't support unicode, how do I then get the value for that? :) > > I believe the issue is that *names* for kwargs

Re: How decoupled should forms and models be (was: Re: Move form_for_instance and form_for_model into django.db.models.Model?)

2007-07-12 Thread Malcolm Tredinnick
On Fri, 2007-07-13 at 01:31 -0400, Todd O'Bryan wrote: > On Fri, 2007-07-13 at 14:43 +1000, Malcolm Tredinnick wrote: > > > I'm -1 one on this for pretty much the same reasons as Adrian. It's just > > not that big a deal even for people who want to work the

Re: Decouple simplejson from Django?

2007-07-13 Thread Malcolm Tredinnick
On Fri, 2007-07-13 at 02:21 -0700, Johan Bergström wrote: > Why not put simplejson as a depedency in setup.py, so easy_install > fetches the latest avaliable version instead of the possibly older > bundled version then? > I get the point, as simplejson is a very integrated part in core > functiona

Re: UnicodeDecodeError after update of trunk

2007-07-13 Thread Malcolm Tredinnick
On Fri, 2007-07-13 at 00:48 -0700, frank h. wrote: > Hi, > I get the following stacktrace after updating trunk (to post-unicode- > branch-merge) > I am posting this here, because I don't see any of my views involved > in the stacktrace and I have a hard time figuring out what is wrong > (having fo

Re: UnicodeDecodeError after update of trunk

2007-07-13 Thread Malcolm Tredinnick
On Fri, 2007-07-13 at 00:48 -0700, frank h. wrote: > Hi, > I get the following stacktrace after updating trunk (to post-unicode- > branch-merge) > I am posting this here, because I don't see any of my views involved > in the stacktrace and I have a hard time figuring out what is wrong > (having fo

Re: Proposal: QuerySet.exists() method

2007-07-13 Thread Malcolm Tredinnick
On Fri, 2007-07-13 at 16:22 -0500, Adrian Holovaty wrote: > I'd like to add a QuerySet.exists() method, which would return True or > False if the given QuerySet contains at least one record. This would > be more efficient than qs.count() or len(qs) because it would perform > the following SQL unde

Re: Proposal: QuerySet.exists() method

2007-07-13 Thread Malcolm Tredinnick
On Fri, 2007-07-13 at 21:56 -0600, Ian Kelly wrote: > > By the way, for all database backends except SQLite, you can implement > > all of this sort of stuff (including exists and __len__) fairly fast > > using cursor.rowcount (the number of rows in the result set). > > Unfortunately, SQLite always

Re: Proposal: customtags, a higher-level API for template tags

2007-07-13 Thread Malcolm Tredinnick
Hey Tom, On Fri, 2007-07-13 at 23:19 -0500, Tom Tobin wrote: > On 7/12/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > > A few comments (mostly questions) from an initial reading: > > I've now implemented most of your suggestions [1]; a few questions

Re: Proposal: QuerySet.exists() method

2007-07-13 Thread Malcolm Tredinnick
On Sat, 2007-07-14 at 00:56 -0400, Leo Soto M. wrote: > On 7/13/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > [...] > > Due to Oracle inclusion, this has to be > > > > select count(*) from [table] where [...] > > > > and then check t

Re: Proposal: QuerySet.exists() method

2007-07-13 Thread Malcolm Tredinnick
On Sat, 2007-07-14 at 13:31 +1000, Malcolm Tredinnick wrote: > On Fri, 2007-07-13 at 16:22 -0500, Adrian Holovaty wrote: > > I'd like to add a QuerySet.exists() method, which would return True or > > False if the given QuerySet contains at least one record. [...] > I

Re: development documentation

2007-07-15 Thread Malcolm Tredinnick
On Sun, 2007-07-15 at 10:56 +, Marc Garcia wrote: > Hi all! > > Is there any django development documentation? I couldn't find any > document on how to start writting my own django add-on. > > Of course I can start browsing code, and looking for other add-ons, > but may be there is a post in

Re: Backwards incompatibility: obj.has_key(x) -> x in obj

2007-07-16 Thread Malcolm Tredinnick
On Mon, 2007-07-16 at 02:19 -0500, Jeremy Dunck wrote: > I just ran into a subtle backwards incompatibility introduced in [5091]. > > I've been pushing an instance of xml.sax.xmlreader.AttributesImpl onto > my Context. AttributesImpl tries to implement a dictionary-like > interface, including __

Re: Cache backend testing

2007-07-16 Thread Malcolm Tredinnick
On Mon, 2007-07-16 at 03:33 -0500, Jeremy Dunck wrote: > Since I'm fiddling with the memcache backend post-unicode, I decided > to run tests against all the backends while I was at it. > > (Apparently the cache tests aren't run against memcache very often, > because test_not_existent has been the

Re: test fail on win + sqlite

2007-07-16 Thread Malcolm Tredinnick
On Mon, 2007-07-16 at 18:05 -0500, Carl Karsten wrote: > I am trying to setup my site on a win box, not for production, but just to > demo > to a friend. I got errors, and so I tried the unit tests, and got 3 errors. > (below) > > The summary from IRC: > (04:46:25 PM) mattmcc: Hmm. Two trans

Re: runtests.py defaults

2007-07-16 Thread Malcolm Tredinnick
On Mon, 2007-07-16 at 18:37 -0500, Carl Karsten wrote: [...] > Here is what I would recommend: > > # settings_sqlite.py > DATABASE_ENGINE = 'sqlite3' > DATABASE_NAME = 'demodb' > ROOT_URLCONF=None > > rem testsqlite.bat > runtests.py --settings settings_sqlite 2>&1 > > The 2>1 thing so that it

Re: None != Null?

2007-07-17 Thread Malcolm Tredinnick
On Tue, 2007-07-17 at 07:28 +0200, Michael Radziej wrote: [...] > While interpreting __exact=None as "WHERE ... = NULL" might confuse new > users, it is probably just what users used to SQL expect (at least for me it > comes quite naturally). I wasn't convinced by this argument back in October an

Re: git and Django

2007-07-18 Thread Malcolm Tredinnick
On Wed, 2007-07-18 at 22:09 +, Rob Hudson wrote: > After going to a git presentation by Randal Schwartz and watching the > video by Linus on git, I decided to play with it some for a patch I'm > testing in Django. I got git and git-svn installed on my Mac, pulled > down the Django source and

Re: lazy translation and __proxy__

2007-07-19 Thread Malcolm Tredinnick
On Thu, 2007-07-19 at 11:16 +0200, Michael Radziej wrote: [...] > Malcolm, is there a reason for this, perhaps python2.3 related? No, it's partly a built-in safety feature (something like ugettext_lazy isn't designed to be converted directly to a string. It's unsafe) and partly a matter of avoidi

Re: repr for lazy translation

2007-07-19 Thread Malcolm Tredinnick
On Wed, 2007-07-18 at 18:36 +0200, Michael Radziej wrote: > Hi, > > after the unicode merge, the repr() of a lazy translation string is > '' > > This gets in my way of testing, since it used to be just the resulting > string. I'm helping myself with a > > class __proxy__(Promise): > #...

Re: docstrings

2007-07-26 Thread Malcolm Tredinnick
On Thu, 2007-07-26 at 09:58 -0500, Tom Tobin wrote: > On 7/25/07, Duc Nguyen <[EMAIL PROTECTED]> wrote: > > > > On a somewhat related note, is it just me or does no django core developer > > follow the "no line longer than 79 characters" note. I like using emacs > > and I have my frame width set

Re: How to sub-class a CharField for a custom EncryptedCharField

2007-07-26 Thread Malcolm Tredinnick
On Wed, 2007-07-25 at 23:43 +, z0n3z00t wrote: > > That's not a great answer, but in the meantime, you might want to take > > a look at the lazy instantiation in the GIS branch[1]. That code isn't > > exactly what you want, but it might help get you started on a > > descriptor-based approach t

Re: Peeking into database queries from the unit-test framework

2007-07-28 Thread Malcolm Tredinnick
On Sat, 2007-07-28 at 00:13 -0500, Adrian Holovaty wrote: > I propose we add a hook to the unit-test framework that would give > developers access to information about the underlying database queries > in a given test. > > Specifically, I could see (and I currently *have*) needs for the > followi

Re: WSGIRequest should set request.path to full uri path

2007-07-28 Thread Malcolm Tredinnick
On Fri, 2007-07-27 at 05:11 +, SmileyChris wrote: > Sorry bout the unfinished second half of that last message, I was just > thinking through type and I meant to delete it before posting. > > On Jul 27, 4:16 pm, Graham Dumpleton <[EMAIL PROTECTED]> > wrote: > > The other problem is that altho

Re: ticket 4789: select_related + depth bug, apply the patch?

2007-07-28 Thread Malcolm Tredinnick
On Fri, 2007-07-27 at 08:55 +0200, Gábor Farkas wrote: > hi, > > ticket 4789 fixes a bug in select_related-queries when used with the > depth parameter. > > it contains a patch which fixes the problem. it also contains the tests > for this fix. > > without this patch, select_related is unusab

Re: WSGIRequest should set request.path to full uri path

2007-07-28 Thread Malcolm Tredinnick
On Sat, 2007-07-28 at 23:20 +, Graham Dumpleton wrote: [...] > FWIW, I know I said that SCRIPT_NAME can't be calculated in > mod_python. Well, that isn't strictly true. > > If you are using mod_python 3.3.1 and have used the Location directive > then it is probably possible by using req.hlist

Re: Django Success Stories

2007-07-28 Thread Malcolm Tredinnick
On Sat, 2007-07-28 at 20:10 -0700, Rob Hudson wrote: > > Now, there's one small wrinkle that may prove unfortunate for you: in > > the Django community, it's pretty much established practice to equate > > good ideas with a volunteer offer. By this precedent, I do believe > > you've volunteered to

Re: ticket 4789: select_related + depth bug, apply the patch?

2007-07-30 Thread Malcolm Tredinnick
On Mon, 2007-07-30 at 16:11 +0200, Gábor Farkas wrote: > Jacob Kaplan-Moss wrote: > > On 7/30/07, Gábor Farkas <[EMAIL PROTECTED]> wrote: > >> approximately when do you plan to finish this rewrite? i realize it's > >> hard to predict, i'm just asking for very rough estimates... are we > >> talking

Re: Tickets for comment/BDFL approval

2007-07-31 Thread Malcolm Tredinnick
Hey Russ, On Tue, 2007-07-31 at 21:59 +0800, Russell Keith-Magee wrote: > Hi all (and especially Adrian), > > I appreciate that everyone is very busy with OSCON travel and other > work commitments, but I've got a few big tickets that have queued up > over the last month or so waiting on comment

Re: Autoescaping: good time?

2007-08-01 Thread Malcolm Tredinnick
Hey Michael, On Wed, 2007-08-01 at 16:51 +0200, Michael Radziej wrote: > On Wed, Aug 01, Jacob Kaplan-Moss wrote: > > > > > On 8/1/07, Michael Radziej <[EMAIL PROTECTED]> wrote: > > > since the unicode waves have calmed down, wouldn't it be a nice time to > > > include the autoescaping patch? >

Re: Supported versions of databases

2007-08-01 Thread Malcolm Tredinnick
On Wed, 2007-08-01 at 13:09 +0200, Nis Jørgensen wrote: > The django documentation currently only mentions supported/recommended > versions for mySQL, not for the other databases. > > I think it would be a good idea to have > > - documentation of supported versions for all databases (including >

Re: Autoescaping: good time?

2007-08-01 Thread Malcolm Tredinnick
On Wed, 2007-08-01 at 14:00 -0500, Jacob Kaplan-Moss wrote: [...] > So, given that, I'm pretty happy with Tom's mini-counter-proposal. It > might take some nasty hacking to "remember" where a template was > loaded from (not sure; gotta check), but not having < show up in > ".txt" templates would b

Re: testing Django against many Pythons and databases

2007-08-06 Thread Malcolm Tredinnick
On Mon, 2007-08-06 at 22:10 -0500, Gary Wilson wrote: > I know there are various setups people have for doing this, like Jacob's > snippet: > > http://www.djangosnippets.org/snippets/106/ > > but I was wondering what other developers' thoughts would be on adding > something like this to Django p

Re: Breaking out Django templates into a standalone library

2007-08-07 Thread Malcolm Tredinnick
On Tue, 2007-08-07 at 17:39 -0500, Tom Tobin wrote: > At the end of the angsty autoescaping thread (said angst in no small > part from my direction ^_^), I floated the idea that perhaps my > concern over autoescaping was pointed in the wrong direction -- that it > might be time to split Django's t

Re: Breaking out Django templates into a standalone library

2007-08-07 Thread Malcolm Tredinnick
On Tue, 2007-08-07 at 18:17 -0500, Adrian Holovaty wrote: > On 8/7/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Please, no. > > > > The main problems are > > Well, then -- I did a great job of contradicting your e-mail, with my > own message. :-)

Re: Breaking out Django templates into a standalone library

2007-08-07 Thread Malcolm Tredinnick
On Tue, 2007-08-07 at 19:03 -0500, James Bennett wrote: > On 8/7/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > I want to hear the use-case first. I may change my mind, but nobody's > > come up with a good reason so far. > > I think Tom's primary goal

Re: web typography support

2007-08-07 Thread Malcolm Tredinnick
I'll address the logistical part of your questions, since they don't seem to have been answered yet. On Mon, 2007-08-06 at 10:10 +0400, Alex Nikolaenkov wrote: [...] > Can you publish your plan concerning contributing applications? The first > thing I'll do in django & python will be typography

Re: MikeH's dbmigrations package

2007-08-07 Thread Malcolm Tredinnick
On Tue, 2007-08-07 at 21:34 -0400, Todd O'Bryan wrote: [...] > The tough thing is that the dbmigration code modifies the behavior of > syncdb. Now whether one should do that or not is debatable (I suppose > you could do './manage.py migratedb' instead), but shouldn't there be > some way for third-

Re: Breaking out Django templates into a standalone library

2007-08-07 Thread Malcolm Tredinnick
On Tue, 2007-08-07 at 23:17 -0500, Gary Wilson wrote: > Malcolm Tredinnick wrote: > > I want to hear the use-case first. I may change my mind, but nobody's > > come up with a good reason so far. > > How about looking at things from the opposite direction? Yes, it wou

Re: Breaking out Django templates into a standalone library

2007-08-07 Thread Malcolm Tredinnick
On Wed, 2007-08-08 at 00:27 -0500, Tom Tobin wrote: > On 8/7/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: [...] > > * Figuring out the settings stuff could be tricky. > > Absolutely agreed; this is where most of the fun is going to come in. ^_^ A couple of other areas are going to be at least

Re: feedback on full atom feed support

2007-08-09 Thread Malcolm Tredinnick
Hi James, On Thu, 2007-08-09 at 04:31 -0400, James Tauber wrote: > Any feedback on my full atom feed support > > http://code.google.com/p/django-atompub/ > > ? Are you looking for feedback in general (as in "is anybody using it?", a.k.a. "is this microphone on?") or as a resolution for #3569 a

Re: Improvement suggestion for {% url %}

2007-08-09 Thread Malcolm Tredinnick
On Wed, 2007-08-08 at 15:46 +0800, !张沈鹏(电子科大 08年毕业) wrote: > because if I want to get the link first , then get the count number . > if I just use reverse() in my custom tag, I have to write like below > > xxx > Digg:{% access_count_url music "rock",112 %} > > I write the same things twice , and

Re: Improvement suggestion for {% url %}

2007-08-09 Thread Malcolm Tredinnick
On Thu, 2007-08-09 at 21:37 +, SmileyChris wrote: > On Aug 10, 12:16 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > I'm not sure what the syntax would look like at the moment, but it's > > something I need to think about: it would help solve on

Re: input type=hidden for newforms

2007-08-10 Thread Malcolm Tredinnick
On Fri, 2007-08-10 at 07:27 +, james_027 wrote: > Hi, > > this might sound stupid but is there a good reason for adding > HiddenField for newforms? A hidden input element is a widget, not a field. It's a render-time property, not a semantic feature of the data. We already have newforms.widge

Re: Request data encoding

2007-08-10 Thread Malcolm Tredinnick
On Thu, 2007-08-02 at 15:14 -0700, Craig Ogg wrote: > On 8/2/07, ludvig.ericson <[EMAIL PROTECTED]> wrote: > > On Aug 2, 11:02 pm, Gábor Farkas <[EMAIL PROTECTED]> wrote: > > > Jacob Kaplan-Moss wrote: > > > > On 8/2/07, Daniel Brandt <[EMAIL PROTECTED]> wrote: > > > >> I am recieving POST-data th

Re: Request data encoding

2007-08-10 Thread Malcolm Tredinnick
On Thu, 2007-08-02 at 19:33 -0500, Jacob Kaplan-Moss wrote: > On 8/2/07, Simon Willison <[EMAIL PROTECTED]> wrote: > > This is a totally ridiculous flaw with the HTTP spec - you literally > > have no reliable way of telling what encoding a request coming in to > > your site uses, since you can't b

Re: Request data encoding

2007-08-10 Thread Malcolm Tredinnick
On Sat, 2007-08-11 at 13:16 +1000, Malcolm Tredinnick wrote: [...] > Receiving genuinely bad/invalid data is not uncommon either, as is > obvious as soon as you start running a really anal comment sanitisation > feature or looking at uploads from corporate systems. Trying to silently >

Re: Case-insensitive URLS (was: usability issues)

2007-08-10 Thread Malcolm Tredinnick
On Mon, 2007-08-06 at 09:49 +0400, Alex Nikolaenkov wrote: [...] > > (B) Reopening tickets because you disagree with the resolution is also > > quite impolite. Bringing the issue here is the right way to go, but > > leave the ticket closed unless you can convince us to rep-open it. > I never heard

Re: Request data encoding

2007-08-11 Thread Malcolm Tredinnick
On Sat, 2007-08-11 at 20:04 +0200, Daniel Brandt wrote: > My only problem with this is that I feel I'm writing framework-code in > my view. I'm clearly breaking the separation between application and > framework. Of course, no design will ever be perfect and you will > always have corner cases lik

Re: GSoC 2007 Status Update VI: Django REST interface

2007-08-12 Thread Malcolm Tredinnick
On Sun, 2007-08-12 at 13:28 +0200, Andreas Stuhlmüller wrote: [...] > Once the SoC final evaluation is over (Mon, August 20th), it will be a > lot easier (=possible) for me to work together with other people and > to accept code contributions. This strikes me a little strange since > SoC is suppos

Re: Does SELECT 1 FROM... Work on SQL Server and Oracle?

2007-08-13 Thread Malcolm Tredinnick
On Mon, 2007-08-13 at 16:45 -0500, Adrian Holovaty wrote: > On 8/12/07, Simon Greenhill <[EMAIL PROTECTED]> wrote: > > I'm trying to work out if Ticket #5030 is good to go or not. > > Basically, when save() is called on a model, django does a SELECT > > COUNT(*)... query to check that the primary

Re: Does SELECT 1 FROM... Work on SQL Server and Oracle?

2007-08-13 Thread Malcolm Tredinnick
On Tue, 2007-08-14 at 10:26 +1000, Malcolm Tredinnick wrote: > On Mon, 2007-08-13 at 16:45 -0500, Adrian Holovaty wrote: > > On 8/12/07, Simon Greenhill <[EMAIL PROTECTED]> wrote: > > > I'm trying to work out if Ticket #5030 is good to go or not. > > > Basic

Re: Newforms suggestions - pre_clean? magic cleaned_data? - access to errors?

2007-08-13 Thread Malcolm Tredinnick
Hi Simon, On Mon, 2007-08-13 at 18:00 -0700, sime wrote: > Hello all, I have some suggestions for newforms, which I've condensed > into point form, excuse me if they seem a little blunt they are just > meant to be concise -- > > 1. Magic cleaned_data - So we can get/set values out of order and

Re: Newforms suggestions - pre_clean? magic cleaned_data? - access to errors?

2007-08-13 Thread Malcolm Tredinnick
On Mon, 2007-08-13 at 18:18 -0700, sime wrote: > Another one -- > > 6. Maybe allow clean_method=x in field parameters, rather than have to > create a custom field or repeat similar clean functions. You can do that one in this fashion... class MyForm(Form) field1 = ...

<    6   7   8   9   10   11   12   13   14   15   >