cache.set could be more functional

2009-08-29 Thread Chris McCormick
Hi *, I always find myself using this idiom: cache.get(key, set_cached(key, KeyValue.objects.get(user=request.user, key=key))) Which basically sets the key upon fetching it. It requires me to define set_cached to be something like this though: def set_cached(key, value): """

Re: Single sign-in

2009-08-28 Thread Chris McCormick
Hi All, My workmate just pointed out that somebody has now done this. Hooray! <http://github.com/uswaretech/Django-Socialauth/tree/master> Chris. On Tue, May 05, 2009 at 05:15:16PM +0100, Chris McCormick wrote: > > Hi All, > > I am sensing a need for a library which allows

Re: Displaying username on every page

2009-08-20 Thread Chris McCormick
On Wed, Aug 19, 2009 at 09:39:23PM -0700, John Barham wrote: > > On Aug 19, 9:27 pm, Kenneth Gonsalves wrote: > > > > Yes, I'd read about RequestContext but from what I understand you have > > > to pass it explicitly to render_to_response().  Is that the case? > > > > yes > > Thanks for the

Re: OT: Drawing lines in the browser

2009-08-18 Thread Chris McCormick
On Tue, Aug 18, 2009 at 07:40:00AM -0700, Ian McDowall wrote: > On Aug 18, 8:53 am, Thomas Guettler wrote: > > Hi, > > > > this is offtopic: How can you draw lines in a (django) web application? > > > > I think you need to use flash or java to do it. I googled for it, but

Non-intrusive way to authenticate phpBB against Django

2009-08-04 Thread Chris McCormick
Hi All, Just uploaded this: http://code.google.com/p/phpbb-json-auth/ Hope it's useful to someone else. Best, Chris. --- http://mccormick.cx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Changing domain cookie

2009-08-04 Thread Chris McCormick
On Tue, Aug 04, 2009 at 09:14:42AM +1000, Malcolm Tredinnick wrote: > > On Mon, 2009-08-03 at 17:51 +0100, Chris McCormick wrote: > > I have a strange issue happening with domain cookies. On the site I'm > > working > > Python's Cookie module doesn't handle multiple

Changing domain cookie

2009-08-03 Thread Chris McCormick
Hi All, I have a strange issue happening with domain cookies. On the site I'm working on we previously didn't have SESSION_COOKIE_DOMAIN set and so the cookie defaulted to "Host: mysite.com" We have a bunch of users logged in with that cookie set. Then we decided we wanted to share the cookie

Bloxsom in Django

2009-06-09 Thread Chris McCormick
Hi, I present for you, a half-implemented, possibly buggy implementation of the text-file based blogging engine PyBloxsom, re-done in Django. Maybe this will be useful to someone else who has a pybloxsom blog and wants to transition to something more manageable/hackable (with no offense to the

Re: Single sign-in

2009-05-23 Thread Chris McCormick
requirement. > > Is there any development and/or any existing code/module/app that > implements sign-in using Google/Facebook/Twitter/OpenID/EmailID/UserID > something that friendfeed did just recently. > > On May 5, 9:15 pm, Chris McCormick <ch...@mccormick.cx> wrote: >

Single sign-in

2009-05-05 Thread Chris McCormick
Hi All, I am sensing a need for a library which allows for a user to sign into Django apps using any of their existing credentials with another site, and I wanted to start a library project for providing this to Django programmers. I thought I would ask here first and see if there is something

Order_by number of foreign key joins

2009-03-10 Thread Chris McCormick
Hi, I want to do something like: Thing.objects.all().order_by("otherthing__count") So there's a many-to-many between Thing and Otherthing, and I want to get a list of Things in the order of most-otherthings joined - is there some easy, Djangoish way to do it, or should I create a new field in

Undocumented comment setting

2009-02-27 Thread Chris McCormick
Hi, The COMMENTS_ALLOW_PROFANITIES setting is undocumented at http://docs.djangoproject.com/en/dev/ref/contrib/comments/settings/ This really tripped me up on the website I am building which only allows users to compose comments made up entirely of swear words. Best, Chris.