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: Serving Static Files - Pics work, but CSS doesn't

2009-04-16 Thread Les
You might post your settings.py as a help to other newbies On Apr 15, 7:21 pm, Anthony wrote: > Thanks. > > I was just trying to get the stylesheet to show up.  I have a full CSS > template I got from somewhere else that I'll be using now that it's > being successfully pulled in. > > On Apr 15,

Re: NameError on view which IS defined

2009-03-01 Thread Les
On Mar 1, 11:22 pm, Malcolm Tredinnick wrote: > On Sun, 2009-03-01 at 19:38 -0800, Les wrote: > > I created a view and template dummy / dummy.html to use in new urls > > for testing. > > > Despite the fact that both are defined, I get NameError: > > > The o

NameError on view which IS defined

2009-03-01 Thread Les
line to enable the admin: (r'^admin/(.*)', admin.site.root), ) # serve static in debug if settings.DEBUG: urlpatterns += patterns('', (r'^static_media/(?P.*)$', 'django.views.static.serve', {'document_root': '/home/le

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