is there any way to set a default formating for float/decimal numbers like default formats for date/datetime values?

2014-07-01 Thread Juan Jose Huelga
I would like to set a float or decimal format like those set in django.conf.locale.en.formats, for example a default format that floatformat template filter could use to format my numbers by default without decimal places. Something like settings.USE_THOUSAND_SEPARATOR that django use by defaul

Re: formating

2013-10-28 Thread fabricio mata de castro Mata
the problem is that Form.valor_ultimacompra | tag this bringing all the input if you Form.valor_ultimacompra.value works but then I lose the input would make automatic? {{Form.valor_ultimacompra | floatformat: 2}} 2013/10/28 Leonardo Giordani > What is foundation? > You said that > > {{fo

Re: formating

2013-10-28 Thread Leonardo Giordani
What is foundation? You said that {{form.valor_ultimacompra}} works. What about {{form.valor_ultimacompra|foundation}} ? Leonardo Giordani Author of The Digital Cat My profile on About.me - My GitHub page

Re: formating

2013-10-28 Thread fabricio
no meu modelo valor_ultimacompra = models.DecimalField(u'Vlr.Ult.Compra', max_digits=18, decimal_places=2, default=0, blank=True, null=True) no template {% extends "base.html" %} {% load humanize %} {% load foundation %} {{form.valor_ultimacompra|foundation| floatformat:2 }} -- You rec

Re: formating

2013-10-28 Thread Leonardo Giordani
Can you please paste the code with a good formatting? To pastebin or similar? I'd like to see model, view and template. Leonardo Giordani Author of The Digital Cat My profile on About.me - My GitHub page

Re: formating

2013-10-28 Thread fabricio
> does not work > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@

Re: formating

2013-10-28 Thread Leonardo Giordani
I think that the extra space between "floatformat:" and "2" is confusing the template system. Try using "floatformat:2" without spaces. Leo Leonardo Giordani Author of The Digital Cat My profile on About.me - My GitHub page

formating

2013-10-26 Thread fabricio mata
even through the code {{form.valor_ultimacompra | floatformat: 2}} does not return anything. my model is valor_ultimacompra = models.DecimalField (u'Vlr. Ult.Compra 'max_digits = 18 , decimal_places = 2, default = 0, blank = True, null = True) when you step this way}} {{form.valor_ultimacompr

Re: jsi18n date and time formating

2010-10-19 Thread timc3
For example: formats['DATETIME_FORMAT'] = 'N j, Y, P'; On Oct 17, 10:13 pm, timc3 wrote: > I am using jsi18n for trying to internationalize some Javascript and > its work fine. > > But I am wondering how to translate the datetime format used (based on > PHP's date) to a format that Javascript ca

jsi18n date and time formating

2010-10-17 Thread timc3
I am using jsi18n for trying to internationalize some Javascript and its work fine. But I am wondering how to translate the datetime format used (based on PHP's date) to a format that Javascript can parse? Thanks -- You received this message because you are subscribed to the Google Groups "Dja

Admin formating for inline, fieldsets don't work?

2009-05-19 Thread Keith Pettit
In the admin pages I'm using a parent that can have multiple child objects. For display I'm using inlines in my admin.py. The parent displays fine and the child displays fine using inlines but I can't seem to find out a way to control the formating of the inline child objects. Th

Re: Date Formating

2009-02-18 Thread ReneMarxis
Solved Please see http://groups.google.com/group/django-users/browse_thread/thread/4f19a5e0c9719f53/3ff236709a6d6578#3ff236709a6d6578 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Date Formating

2009-02-16 Thread ReneMarxis
Hello i am having some problems getting date-formating running ... here is some code-snippet i use in my app http://dpaste.com/121354/ The form shows up ok. If i enter valid data everything is ok. But if i enter invalid data or none the form will be empty. There is no validation error showing

Re: Forms and formating error messages

2007-06-28 Thread AnaReis
On Jun 27, 9:41 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Wed, 2007-06-27 at 02:26 -0700, AnaReis wrote: > > Hi again, > > This is getting very frustrating because I can't make this work... > > This is exactly what I wrote in the files: > > In future, please remember that when you s

Re: Forms and formating error messages

2007-06-27 Thread Malcolm Tredinnick
On Wed, 2007-06-27 at 02:26 -0700, AnaReis wrote: > Hi again, > This is getting very frustrating because I can't make this work... > This is exactly what I wrote in the files: In future, please remember that when you send a message like this, a lot of us are reading it through an e-mail interface

Re: Forms and formating error messages

2007-06-27 Thread AnaReis
Hi again, This is getting very frustrating because I can't make this work... This is exactly what I wrote in the files: [newforms.py] from django import newforms as forms from django.newforms.forms import BoundField from django.template import Context, loader class TemplatedForm(forms.Form):

Re: Forms and formating error messages

2007-06-26 Thread AnaReis
I managed to solve this: from Manager.utils.newforms import TemplatedForm Thanks for the help! Ana --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: Forms and formating error messages

2007-06-26 Thread AnaReis
Hum... I tried to test the imports on IDLE but I couldn't import the file in anyway I tried.. I went to the Path Browser on IDLE and I couldn't find the newforms.py file that I created. I then noticed that in all the other folders there was a file named __init__.py, so I copied one of those init

Re: Forms and formating error messages

2007-06-26 Thread AnaReis
On Jun 26, 3:09 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2007-06-25 at 08:22 -0700, AnaReis wrote: > > Hi, > > I was trying to change the way in which the errors are presented in a > > form. > > I tried to put them in: > > {{field.label}}:{{field}}{% if > > field.field.require

Re: Forms and formating error messages

2007-06-25 Thread Malcolm Tredinnick
On Mon, 2007-06-25 at 08:22 -0700, AnaReis wrote: > Hi, > I was trying to change the way in which the errors are presented in a > form. > I tried to put them in: > {{field.label}}:{{field}}{% if > field.field.required %}*{%endif%} td>{%if field.errors%}{{field.errors}} span>{%endif%} > but I still

Forms and formating error messages

2007-06-25 Thread AnaReis
Hi, I was trying to change the way in which the errors are presented in a form. I tried to put them in: {{field.label}}:{{field}}{% if field.field.required %}*{%endif%}{%if field.errors%}{{field.errors}}{%endif%} but I still get them formatted as an and I would like the errors to appear as simple