Re: Django-admin-tools unicode problem

2013-06-28 Thread Roberto López López
Hi, I can perfectly understand Portuguese, but it's not the case for many users of this mailing list. Please, stick to English... Cheers, Roberto On 06/28/2013 01:35 PM, Sandro Dutra wrote: > Como o Gilberto postou, pode haver um problema quando o teu editor de > textos salva o arquivo do te

Re: Django-admin-tools unicode problem

2013-06-28 Thread Sandro Dutra
Como o Gilberto postou, pode haver um problema quando o teu editor de textos salva o arquivo do template, tente abrir este template pelo bloco de notas e ao 'salvar como' deve haver um campo lá embaixo para selecionar a 'Codificação', selecione UTF-8 e salve ou tente a configuração relativa no edit

Re: Django-admin-tools unicode problem

2013-06-27 Thread Jaimerson Leandro Amaro de Araújo
Cara, o problema é que a exceção tá sendo no template do aplicativo, que lê as informações do banco de dados. Alterar os arquivos do admin-tools é inviável em termos de portabilidade na hora do deploy. O que eu quero saber é se é possível mudar o encoding padrão desse app. Em quarta-feira, 26 d

Re: Django-admin-tools unicode problem

2013-06-26 Thread gilberto dos santos alves
tudo depende do seu editor de texto. por exemplo no windows em português do brasil normalmente é usado o cp1250 como padrão. mas na hora de salvar o seu arquivo você pode escolher salvá-lo como utf-8 (aí no início do código vai a correspondente diretiva) se preferir salvar em outro codepage deve

Re: Django-admin-tools unicode problem

2013-06-26 Thread Sandro Dutra
Jaimerson, ainda assim creio que você deva tentar adicionar ao topo de suas views e/ou dos módulos usados do admin-tools a linha: # -*- coding: utf-8 -*- ou # -*- coding: iso-8859-1 -*- Isso permitirá ao Python ler o arquivo no encoding definido. 2013/6/26 Jaimerson Leandro Amaro de Araújo >

Re: Django-admin-tools unicode problem

2013-06-26 Thread Jaimerson Leandro Amaro de Araújo
Uh, I know it`s an encoding problem, I was hoping there was a way of changing default charset for that app. Em quarta-feira, 26 de junho de 2013 10h16min02s UTC-3, Odin escreveu: > > Think it's an encode problem. I never use this app but try to add this > line o top of your views file: > > # -*-

Re: Django-admin-tools unicode problem

2013-06-26 Thread Sandro Dutra
Think it's an encode problem. I never use this app but try to add this line o top of your views file: # -*- coding: utf-8 -*- 2013/6/26 Jaimerson Leandro Amaro de Araújo > (I posted this on django-admin-tools mail list, but apparently there's no > one alive there) > > > Hello, I'm stuck in a e

Django-admin-tools unicode problem

2013-06-26 Thread Jaimerson Leandro Amaro de Araújo
(I posted this on django-admin-tools mail list, but apparently there's no one alive there) Hello, I'm stuck in a encoding issue, on the dashboard template. Some of my models have fields with non-ascii characters (like "à" or "á"), and when I try to load the page, I get the following error: Djan

Django-admin-tools unicode problem

2013-06-26 Thread Jaimerson Leandro Amaro de Araújo
(I have posted this on django-admin-tools specific mailing list, but apparently there's no one alive there) Hello, I'm stuck in a encoding issue, on the dashboard template. Some of my models have fields with non-ascii characters (like "à" or "á"), and when I try to load the page, I get the follo

Apache unicode problem!why it is OK in "manage.py runserver 8000" ? but it is not OK when "apach + mod_python" !

2009-11-28 Thread hao he
hi all: I write a tag "model_as_table_with", used like this in template : {{model_instance | *model_as_table_with*:"real_name,gender,birthdate,}} problem was raise in my "*model_as_table_with*" function. this following code is ok when I runserver with "manage.py runserver 8000" *col = "%s:%s"

Re: unicode problem?

2009-08-26 Thread andreas schmid
take a look at that discussion: http://groups.google.com/group/django-users/browse_thread/thread/1de89cdee99b1086 lerner wrote: > def output(request): > response = HttpResponse(mimetype='text/csv') > response['Content-Disposition'] = 'attachment; filename=%s' % > 'address.csv' > t = l

unicode problem?

2009-08-26 Thread lerner
def output(request): response = HttpResponse(mimetype='text/csv') response['Content-Disposition'] = 'attachment; filename=%s' % 'address.csv' t = loader.get_template('csv.html') #objs = Address.objects.get_list() objs = Address.objects.all() d = [] for o in objs:

Re: Unicode problem when rendering a template

2007-09-07 Thread Tipan
On Sep 5, 9:28 pm, wolfds <[EMAIL PROTECTED]> wrote: > Can we see the model definition for Reward? Just got back to this and realised I was being a dummy. Whilst I had changed all the def's to unicode, I'd still left some str() functions on the return. Changed these to smart_unicode() and the p

Re: Unicode problem when rendering a template

2007-09-05 Thread wolfds
Can we see the model definition for Reward? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, se

Unicode problem when rendering a template

2007-09-05 Thread Tipan
I've recently updated our Django source to the latest version which meant implementing the Unicode handling. In the main all went well, although I'm getting a few decode errors such as: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 28: ordinal not in range(128) I have chan

Re: Template: unicode problem

2007-07-31 Thread Malcolm Tredinnick
On Tue, 2007-07-31 at 15:40 +, Mario Gonzalez wrote: > Hello, I'm getting some problems with unicode in templates: 'ascii' > codec can't encode character u'\xf1' in position 1: ordinal not in > range(128) However, templates, database are in UTF8. I changed > __str__ by __unicode__ in my model

Re: Template: unicode problem

2007-07-31 Thread Mario Gonzalez
On 31 jul, 12:28, Mario Gonzalez <[EMAIL PROTECTED]> wrote: > > I understand it and please forgive my pour words :-) I'll do what > you said and I'll try to fix it by my self today. If not, I'll write > to this list for any comments. > The problem: I had a non-ascii character (ñ) in my templa

Re: Template: unicode problem

2007-07-31 Thread Malcolm Tredinnick
Mario, On Tue, 2007-07-31 at 15:40 +, Mario Gonzalez wrote: [...] > Django (I think) is trying to encode an ascii string. I modified > django/template/__init__.py line 704 and just for testing purposes I > deleted raise and I changed it by print e > > Index: __init__.py > =

Re: Template: unicode problem

2007-07-31 Thread Mario Gonzalez
On 31 jul, 12:18, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > There may well be a problem, but from the current information there is a > 0% chance of anybody being able to guess the solution. There are just > too many things it could be from bad strings in your code to bad > handling on some u

Template: unicode problem

2007-07-31 Thread Mario Gonzalez
Hello, I'm getting some problems with unicode in templates: 'ascii' codec can't encode character u'\xf1' in position 1: ordinal not in range(128) However, templates, database are in UTF8. I changed __str__ by __unicode__ in my models files. Django (I think) is trying to encode an ascii string

Re: Unicode problem while changing from 0.95 to latest developer version

2007-07-19 Thread Jeremy Dunck
On 7/19/07, piotr <[EMAIL PROTECTED]> wrote: ... > TemplateSyntaxError: Caught an exception while rendering: 'utf8' codec > can't decode bytes in position 833-834: invalid data > ... > Any idea what can be wrong? I'm betting a string it's trying to decode isn't in utf-8. ;-) Go through this ch

Unicode problem while changing from 0.95 to latest developer version

2007-07-19 Thread piotr
Hello, I have done upgrade from 0.95 to svn developer version. One of my django apps using unicode characters does not start anymore, I get the following: -- Traceback (most recent call last): File "C:\Python24\lib\site-packages\django\core

Re: Django unit tests and unicode problem

2007-04-29 Thread Eugene Morozov
Hmm, I've figured how to inspect context in the test by reading django sources. But that didn't help greatly, because context['translation'].content (translation is a model for translated pages content) still returns doubly encoded utf-8 data. By the way, the page in browser is rendered correctly.

Django unit tests and unicode problem

2007-04-29 Thread Eugene Morozov
Hello, I'm new to django (using it only for two weeks and I was reading django tutorial, documentation and book for the first week). I'm writing unit tests for my CMS similar to built-in flatpages CMS, but with builtin i18n features and other things required for full- fledged CMS. I cannot use s

Django unit tests and unicode problem

2007-04-29 Thread Eugene Morozov
Hello, I'm new to django (using it only for two weeks and I was reading django tutorial, documentation and book for the first week). I'm writing unit tests for my CMS similar to built-in flatpages CMS, but with builtin i18n features and other things required for full- fledged CMS. I cannot use s

Re: SelectDateWidget unicode problem

2007-04-12 Thread Christian Schmidt
Got the same Problem here. On my Laptop all is fine but on the Server I got an Unicode Error. Seems to me, that the german month "März" isn't correctly encoded. Can someone help? On both PCs is DEFAULT_CHARSET = 'utf-8' in the settings and a postgres database running. Christian. --~--~---

SelectDateWidget unicode problem

2007-04-11 Thread Robert
When trying to use a SelectDateWidget from forms.extras.widgets.py I'm getting the following error: Traceback (most recent call last): File "c:\Python24\Lib\site-packages\django\template\__init__.py" in render_node 723. result = node.render(context) File "c:\Python24\Lib\site-packages\django\t