Re: A solution for slow database resets in the test system?

2007-07-28 Thread Russell Keith-Magee
On 7/29/07, Andrey Khavryuchenko <[EMAIL PROTECTED]> wrote: > > Russell, > > RK> I've been ruminating on this recently; the only solution I have come > RK> up with so far is to introduce a mock database backend for testing > RK> purposes. During a mock run, the mock backend would provide respon

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: Django Success Stories

2007-07-28 Thread Rob Hudson
> 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 gather this material . > > Seriously, though -- if it's somet

Re: Django Success Stories

2007-07-28 Thread Jacob Kaplan-Moss
Hi Rob -- This sounds like a *brilliant* idea. Since Django's still got a foot in the "unproven technology" category, anyone trying to convince management will likely benefit from some success stories and other related "marketing" material. Now, there's one small wrinkle that may prove unfortuna

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

2007-07-28 Thread Jacob Kaplan-Moss
On 7/28/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Haven't worked out exactly how to acommodate things like mod_python not > giving the full SCRIPT_NAME yet, but it's a relatively minor issue since > it's just a fact of life we need to work around. Something will present > itself. I'm no

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: WSGIRequest should set request.path to full uri path

2007-07-28 Thread Graham Dumpleton
On Jul 29, 8:19 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > 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 D

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

2007-07-28 Thread Adrian Holovaty
On 7/28/07, Rob Hudson <[EMAIL PROTECTED]> wrote: > I'm curious if it's ever been considered to rewrite the tutorial with > a more apt app or project? My main question is if it's open for > discussion or do most think it's a fine tutorial. It's definitely up for discussion, and I'm not tied to t

Django Success Stories

2007-07-28 Thread Rob Hudson
Hi Devs, One thing that came out of the Django Meet-up at OSCON was someone asking for advice on how to convince their superiors that Django is a good choice. This obviously depends on the needs of the individual or shop, but I was wondering if we could add a section to the Wiki for success stor

Django Tutorial

2007-07-28 Thread Rob Hudson
Hi Devs, I've been recommending Django to web developer friends. I typically first point them to Jacob's excellent video on Google for the background on Django (with the caveat that some code might be out of date but the general history and Django philosophy is well represented)... http://video.

Re: A solution for slow database resets in the test system?

2007-07-28 Thread Andrey Khavryuchenko
Russell, RK> I've been ruminating on this recently; the only solution I have come RK> up with so far is to introduce a mock database backend for testing RK> purposes. During a mock run, the mock backend would provide responses RK> that were previously recorded from a live database backend. T

Re: Is it possible to add the docs to the test framework to check for ReST errors?

2007-07-28 Thread Jacob Kaplan-Moss
On 7/28/07, Simon G. <[EMAIL PROTECTED]> wrote: > I was wondering if it was somehow possible to add the django docs -> > ReST generation stage into the test framework to catch these before > they get committed? That's a very good idea. Cleaning up the documentation generator is pretty high on my

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

2007-07-28 Thread Amit Upadhyay
On 7/28/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > The whole django.db.connection.queries thing has always been a bit of > a hack/wart. (Hackwart?) Maybe it's time to expose the underlying > queries in a more developer-friendly way. Off the top of my head, we > could allow the registration

Re: edit_inline for a reflexive m2m_intermediary

2007-07-28 Thread Nicola Larosa
Nicola Larosa wrote: > Having followed all the steps in the bug reporting guidelines, I have > now filed ticket #4937: > > http://code.djangoproject.com/ticket/4937 Marked as duplicate of #1939, sorry about that. #1939 and lots of other tickets are listed at: http://code.djangoproject.com/wiki

Re: Best Practices to Make your Apps Portable

2007-07-28 Thread Simon G.
Excellent, thanks! --Simon On Jul 28, 5:47 am, Sebastian Macias <[EMAIL PROTECTED]> wrote: > I just added it to the wiki: > > http://code.djangoproject.com/wiki/BestPracticesToWorkWith3rdPartyApp... --~--~-~--~~~---~--~~ You received this message because you are

Re: Best Practices to Make your Apps Portable

2007-07-28 Thread Tai Lee
Why do you need a shared project to house generic apps? Why not just put them at dango_root (or anywhere on your python path), and install them in your django projects (sites)? django_root/ genericapp1/ genericapp2/ mysite/ __init__.py apps/ __init__.py

Re: A solution for slow database resets in the test system?

2007-07-28 Thread Ivan Sagalaev
Russell Keith-Magee wrote: > If all you want is the fixtures, why not use a unittest.TestCase, and > put a call to management.load_data() in your TestCase.setUp() method? Speaking for myself I switched to Django's TestCase because it was just more convenient: it has fixture loading and self.clie

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

2007-07-28 Thread Russell Keith-Magee
On 7/28/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > Specifically, I could see (and I currently *have*) needs for the > following assertions: > > * Assert a given custom model method runs a certain, exact number of SQL > queries > > * Assert a given custom model method's SQL contains a cert

Re: A solution for slow database resets in the test system?

2007-07-28 Thread Russell Keith-Magee
On 7/28/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 7/27/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > > This still leaves the slowdown caused by the initial syncdb. At > > present, a syncdb is executed at the start of every test run. This > > syncdb is even slower than the flus

Re: A solution for slow database resets in the test system?

2007-07-28 Thread Russell Keith-Magee
On 7/28/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 7/27/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > If all you want is the fixtures, why not use a unittest.TestCase, and > > put a call to management.load_data() in your TestCase.setUp() method? > > I tried that and got the sam

Re: Is it possible to add the docs to the test framework to check for ReST errors?

2007-07-28 Thread Russell Keith-Magee
On 7/28/07, Simon G. <[EMAIL PROTECTED]> wrote: > > Hi all, > > Every so often we get a few tickets popping up about ReST errors in > the docs. I've just patched one (#4995) where some hideously glaring > mistakes like, say, missing a space after an asterisk, or one too few > empty lines caused na