Re: Check if user is a member of group in template

2007-10-09 Thread Ryan Kanno
I think you're looking for something like this: http://www.djangosnippets.org/snippets/282/ On Oct 9, 3:22 am, äL <[EMAIL PROTECTED]> wrote: > Inhttp://code.djangoproject.com/wiki/CookBookRequiredGroupLoginI > found how > to show a template only if the user is in a specific group (admin). > >

Empty urls.py file and {% url %} tags

2007-06-25 Thread Ryan Kanno
I know this isn't big (and maybe it's by design), but this didn't happen prior to I believe -r 5516. If you have a empty urls.py include file in any app within the project, it causes the {% url %} tag to not resolve for any app, even an unrelated app view. The exception returned is somewhere

Re: Named URL patterns to use prefix?

2007-04-25 Thread Ryan Kanno
Already a ticket? Shoot, I swore I searched, but I couldn't find one. Sorry about that - my apologies. (http://code.djangoproject.net/ticket/4129) _RK On Apr 24, 6:32 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2007-04-24 at 15:21 +0000, Ryan Kanno wrote: > > I

Named URL patterns to use prefix?

2007-04-24 Thread Ryan Kanno
I'm just curious if named URL patterns will be able to use the prefix given (or if there's any reason not to) ie, urlpatterns += patterns('my_pattern', url(r'^(?P[\d]+)/$', 'details', name="my-details"), Right now, I have to pass into url the following:

Newforms edit with custom form

2007-04-23 Thread Ryan Kanno
I've been playing around with newforms (with a custom form) and I was just wondering if anyone else has run into the same situation and I'm curious as to what solutions others have come up with. Basically, I just want to edit an instance and I've been consistently writing the following piece of

Re: Detect ajax request

2007-04-11 Thread Ryan Kanno
Ahh... that's what I was missing. Thanks, Nathan (as I'm also using jQuery). :) On Apr 10, 6:23 pm, "Nathaniel Whiteinge" <[EMAIL PROTECTED]> wrote: > I've been happily using limodou's suggestion with the jQuery framework > for a few weeks, hopefully whatever framework you're using also sends >

Detect ajax request

2007-04-10 Thread Ryan Kanno
I've searched Googs and this group for an answer to the following question: Is there a standard way to detect if a request was an ajax one? I know I could append a key to the ajax request like in Mr. Bennett's post here: