Closed Lucianovici closed 10 years ago
Well, after I tested on the mezzanine demo server, and saw it's working. Now it's clear to me that I have misconfigured something.
$ locale LANG=ro_RO.utf8 LC_CTYPE="ro_RO.utf8" LC_NUMERIC="ro_RO.utf8" LC_TIME="ro_RO.utf8" LC_COLLATE="ro_RO.utf8" LC_MONETARY="ro_RO.utf8" LC_MESSAGES="ro_RO.utf8" LC_PAPER="ro_RO.utf8" LC_NAME="ro_RO.utf8" LC_ADDRESS="ro_RO.utf8" LC_TELEPHONE="ro_RO.utf8" LC_MEASUREMENT="ro_RO.utf8" LC_IDENTIFICATION="ro_RO.utf8" LC_ALL=
Testin locally on my workstation: OS: Gentoo, 3.5.7-gentoo Local Server: django dev server (manage.py runserver).
Can you please help me :) Thanks!
Anyway, not something very important, since only on my local environment something is messed up. Everything seems to work on a production env (Ubuntu, Gunicorn behind nginx).
However, some resources that might help: http://stackoverflow.com/questions/11660627/python-app-import-error-in-django-with-wsgi-gunicorn http://stackoverflow.com/questions/2108824/mysql-incorrect-string-value-error-when-save-unicode-string-in-django
Hi,
Great job! I really like mezzanine + cartridge. I'm kind of new to django/python world, but I'm leaning every day :)
Intro
I'm creating a simple ecommerce, adapting an existing html/css/js template. I need ajax calls to update cart and also add products to cart from product listings.
Everything seems to work, after I created my own view, bound to something like 'ajax/product/add/product-slug'.
Inside my view clp_shop.view I simply called the original shop.view.product respecting DRY.
My problem
I have unicode characters (ă î â ț ș) inside product titles, therefore in shop.models.Cart.add_item I'd need to have
If not, (title="roșii" slug="rosii") I get the obvious error:
UnicodeEncodeError at /ajax/product/add/rosii/ 'ascii' codec can't encode character u'\u0219' in position 2: ordinal not in range(128)
Questions:
Environment:
Mezzanine==3.0.4 Cartridge==0.9.1
SLUGIFY = "django.template.defaultfilters.slugify"
Thanks!