Re: UnicodeDecodeError Solution?

2010-03-19 Thread Les Smithson
Maybe feed your templates through a call to unicode.decode, with the errors arg set to 'replace'? This will replace all sequences that can't be decoded with a '?'. At least that lets you render the template. Depending on how far you want to go, you could also write your own error handler and replac

Re: Authentication issue

2010-02-24 Thread Les Smithson
request.user.is_anonymous() and django.contrib.auth.logout() respectively. On Feb 24, 2:36 pm, CrabbyPete wrote: > I have code that allows an anonymous user to look at some elses page, > but I want to limit what they can do so I have the following code > > def show(request): >      u = request.

Re: problem with login_required decorator in python2.3

2006-03-17 Thread Les Smithson
_anonymous(), login_url="/my/login/") @mylogin_required def blagh(request):    ... I haven't figured out how to override the template path 'registration/login' yet. -- Les Smithson <[EMAIL PROTECTED]> Open Network Solutions Ltd signature.asc Description: This is a digitally signed message part

Apache RewriteRule wont call Django URL

2006-03-14 Thread Les Smithson
make this work using the [R] flag, but that exposes /django/spam to the browser, which is what I'm trying to avoid. -- Les Smithson <[EMAIL PROTECTED]> Open Network Solutions Ltd signature.asc Description: This is a digitally signed message part

Re: Apache/mod_python with 2 different projects

2006-03-13 Thread Les Smithson
On Mon, 2006-03-13 at 14:14 -0600, Adrian Holovaty wrote: On 3/13/06, Les Smithson <[EMAIL PROTECTED]> wrote: > My guess is that the DJANGO_SETTINGS_MODULE is set once only per server process, > then its pot-luck which process and which DJANGO_SETTINGS_MODULE setting any

Apache/mod_python with 2 different projects

2006-03-13 Thread Les Smithson
ly, duplicating Apache configs & Django's URL mapping. Thanks for any tips... -- Les Smithson <[EMAIL PROTECTED]> Open Network Solutions Ltd signature.asc Description: This is a digitally signed message part