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
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
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
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
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
>
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:
>
> # -*-
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
(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
(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
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"
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
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:
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
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
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
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
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
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
> =
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
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
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
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
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.
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
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
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.
--~--~---
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
27 matches
Mail list logo