2008-6-30

00:01 cramm
00:01 cramm
that's what I'm getting
00:03 sakyamuni
that is what it does for sqlite it seems, I am using postgres and DATABASE_NAME just gives me the regular DB name. I'll dig further hmm
00:14 cramm
sakyamuni: the test suite des use the 'regular' database you've specified with DATABASE_NAME in your setting.py
00:16 cramm
*does
00:17 sakyamuni
cramm: when i start the test suite it creates a test_dbname database so I figured it used that one.
00:19 sakyamuni
I will just work around this by assuming the db name is 'test_'+settings.DATABASE_NAME for now.
00:22 cramm
oh sorry, you're right. I had forgot about the test_ prefix thing
04:32 paltman
for anyone who might be interested i got the patch for ticket #4667 (edit inline support for generic relations in nfa) working. there is a write up of what i did in this blog post: http://paltman.com/2008/06/29/edit-inline-suppo...
04:32 DjangoBot
07:08 is_null
hello everybody, i don't understand how to clone --bare with only one sub-directory. Any tip please? I checked man git-clone
07:10 is_null
sorry, wrong channel nevermind
10:33 david`bgk
it seems there is a useless import of wraps in contrib.auth.decorators, someone confirms before I fill a ticket?
10:41 jezdez
david`bgk: yep, that seems to be unused
10:43 trbs
humn shouldn't wraps be used in the decorators ?
10:44 trbs
user_passes_test and login_required to wrap the decorated functions attributes
10:47 david`bgk
I can't find any reference to that, update_wrapper is used but not wraps
10:48 trbs
in the rest of django's decorators wraps is used in the decorators as : return wraps(view_func)(decorate)
10:49 trbs
i think this is also what should be the case in contrib.auth.decorators
12:01 cramm
david`bgk: Hi, can you remeber if the test suite failure you werre seeing on Mac OS X is this one?: http://code.djangoproject.com/wiki/DjangoOnWind...
12:34 david`bgk
cramm, it looks exactly the same: http://dpaste.com/59930/
12:36 cramm
david`bgk: could you give me details about (OS, python, setuptools) version, python distribution so I can add them to that page?
12:40 david`bgk
of course, osx leopard, python 2.5.1
12:40 david`bgk
mmmh where can I find setuptools informations?
12:48 cramm
david`bgk: hmm, on Debian and on Windows it's a package installable separately from Python
12:51 david`bgk
cramm, 0.6c8 for setuptools
12:52 cramm
david`bgk: thanks
14:23 telenieko
freakboy3742: FYI, in Spain Mark is spelled Marc with C ;)) (for r7805) but no worries :)
14:23 DjangoBot
14:44 telenieko
mm.. r7770 says nfa is merged up to r7766, but it does not have the changes introduced in r7724, any clue?
14:44 DjangoBot
14:44 DjangoBot
14:44 DjangoBot
15:01 SimonW
I have a suggestion for fixing AlreadyRegistered in newforms-admin - anyone awake who cares to hear it?
15:01 cramm
telenieko: seems like a manual merge was needed and the hunk slipped from the eyes because on nf-a there is a SiteAdmin class definition between Site and RequestSite
15:02 cramm
*from the eyes of brosner
15:02 telenieko
cramm: I saw it, maybe it conflicted during merge, I'll try to ping brosner later if he gets around, thanks ;)
15:06 jkocherhans
SimonW: yes, please. unless you want to wait until some more people show up.
15:06 empty
SimonW: did you see the discussion on Django-dev about this a while back?
15:07 SimonW
empty: I think so, can't remember the details
15:07 SimonW
here's the solution: allow people to register the same model more than once, BUT force them to specify the URL when they do so
15:07 empty
15:07 empty
I can't remember either. :D
15:07 SimonW
there's a very good use case for having a model registered multiple times
15:08 SimonW
say I have one model, but I want user type A to have one set of customisations when they edit it, and user type B to have another set of customisations
15:08 SimonW
easiest way to do that would be to write two different custom ModelAdmin classes
15:08 SimonW
and register it twice at two different URLs
15:08 SimonW
: /admin/categories-for-superusers/ and /admin/categories-for-regular-users/ for example
15:09 SimonW
admin.site.register(Category, SuperUserCategoryAdmin, slug="categories-for-superusers")
15:09 SimonW
admin.site.register(Category, RegularUserCategoryAdmin, slug="categories-for-regular-users")
15:09 SimonW
if you only register something once there's no need to pass the optional slug="" argument
15:09 SimonW
and everything works exactly the same as it does now
15:10 SimonW
if you try to register a model twice and /don't/ provide the slug="" argument on the second attempt, you get an exception
15:10 SimonW
anything crazy about that? if not I'll write it up for the mailing list and investigate how hard it would be to actually implement
15:10 jkocherhans
I can see the benefit in that. I've written a few ModelAdmin classes that had 3 or 4 branches for just about every authorization method.
15:12 jkocherhans
I don't love putting the slug in the registration, but I guess ModelAdmin is already handling dispatch, so I can't think of a *real* reason not to like it.
15:53 brosner
telenieko: r7730
15:53 DjangoBot
15:55 telenieko
mm. thanks brosner, something's wrong in my git then :)
15:56 telenieko just noticed he didn't have nfa updated on git :o
15:56 telenieko
brosner: I'm changing nfa auth tests L23
15:56 brosner
i already fixed that
15:56 telenieko
another effect of not having svn up-to-date, agh!
15:57 telenieko
luckyly it was a simple thing
15:57 telenieko
thanks ;)
15:57 brosner
i just removed the nfa tests in favor of the trunk ones
15:57 brosner
they were doing the same thing
16:00 SimonW
brosner - did you see our recent discussion about AlreadyRegistered ? Check channel logs from about an hour ago
16:01 brosner
SimonW: yeah i did. one second and i'll get back to you :)
16:01 brosner
actually a bit longer than a second. going into a meeting ;)
16:04 SimonW
I'm about to head for a train, probably be back online in half an hour or so