Sorry for the delayed response -
And yeah, I'm using cmemcached - looks like the django docs have been
updated in the past month to show it's deprecated. Thanks!
On Apr 19, 9:08 am, Karen Tracey wrote:
> On Sun, Apr 18, 2010 at 3:54 AM, Michael Strickland
> wrote:
>
>
>
>
>
> > Temporary fix:
>
On Sun, Apr 18, 2010 at 3:54 AM, Michael Strickland wrote:
> Temporary fix:
>
> It appears to be a result of changeset [12637] in memcached.py:
> http://code.djangoproject.com/changeset/12637
>
> # memcached.py, lines 53-54 removed in def set()
> 53: if isinstance(value, unicode):
> 54:value
Temporary fix:
It appears to be a result of changeset [12637] in memcached.py:
http://code.djangoproject.com/changeset/12637
# memcached.py, lines 53-54 removed in def set()
53: if isinstance(value, unicode):
54:value = value.encode('utf-8')
In my templates at least, this means that before
On Apr 5, 11:53 am, Willem wrote:
> Thanks DR -- see below
>
> class ProfileManager(models.Manager):
>
> def recently_added_people(self):
> cache_key = 'recently_added_people'
> profile_list = cache.get(cache_key)
> if profile_list is None:
> list = Profile.
Thanks DR -- see below
class ProfileManager(models.Manager):
def recently_added_people(self):
cache_key = 'recently_added_people'
profile_list = cache.get(cache_key)
if profile_list is None:
list = Profile.objects.order_by('-id').filter(
On Apr 5, 10:42 am, Willem wrote:
> If I unicode(the_list) in views.py -- the list becomes un-us able in
> my template...
>
> See: http://bit.ly/aXTW5pfor the error on my site
It would be useful to see the definition of your Profile class -
especially the __unicode__ method, if you have one.
--
If I unicode(the_list) in views.py -- the list becomes un-us able in
my template...
See: http://bit.ly/aXTW5p for the error on my site
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegro
from django.utils.encoding import *
# views.py ##
def country_detail(request,
country_code):
profiles =
Profile.objects.filter(country__shortcode=country_code).filter(user__is_active='1')
return render_to_response('people/country.html',{
'country_code': country_code,
'country
from django.utils.encoding import *
# views.py ##
def country_detail(request,
country_code):
profiles =
Profile.objects.filter(country__shortcode=country_code).filter(user__is_active='1')
return render_to_response('people/country.html',{
'country_code': country_code,
'country
ankit,
I understand the error is related to unicode -- but it is not clear
where the unicode() statement must go.
Where in my code in views.py
## views.py ##
def country_detail(request,country_code):
profiles =
Profile.objects.filter(country__shortcode=country_code).filter(user__is_active='1
use encoding method
unicode(str).encde("UTF-8")
On Mon, Apr 5, 2010 at 12:59 PM, Willem wrote:
> I get following error:
>
> "Caught UnicodeEncodeError while rendering: 'ascii' codec can't encode
> character u'\xe1' in position 161: o
I get following error:
"Caught UnicodeEncodeError while rendering: 'ascii' codec can't encode
character u'\xe1' in position 161: ordinal not in range(128)"
If I comment out the cache line in template -- all is OK
Any ideas?
Many thanks
-
12 matches
Mail list logo