I'm using Django 1.2.1 and it doesn't work any longer ;)
Just switched back to Django 1.2 and it works. But I think that's not
a solution.
Regards
Simon
On 6 Jul., 15:21, saboter wrote:
> I used the workaround in project that runs under django 1.2 and it
> looks good in admin even after repeated
Hello,
ticket 13546 si definitely more relevant than 13560. :) Thanks.
I used the workaround in project that runs under django 1.2 and it
looks good in admin even after repeated editation.
Regards,
Martin
On 5. Júl, 23:43 h., Simon Westphahl wrote:
> Hi,
>
> I also tried your workaround a
Hi,
I also tried your workaround and it fixes the input issue, but if you
edit your model again, the value in the input field is not properly
localized (uses a dot as decimal separator).
Ticket 13546 (ttp://code.djangoproject.com/ticket/13546) seems
relevant to our problem.
I only wonder why the
I have mixed models with admin in my example. Sorry.
It should be like this:
### models.py
[...]
class JobForm(ModelForm):
def __init__(self, *args, **kwargs):
super(JobForm,self).__init__(*args,**kwargs)
self.fields['price'].localize = True
...
[...]
###
### admin.py
class
Hello,
i have the same problem, the decimal field input is not localized by
default in admin. (Works in changelist.) So it shows and accepts only
dot as decimal separator.
It looks that admin doesnt set localize parameter in Field class init.
(Its False by default.)
I didnt found a ticket exactl
I figured out a way to get it working.
### models.py
[...]
class DecTest(models.Model):
dec = models.DecimalField(max_digits=8, decimal_places=2)
class LocalDecForm(forms.ModelForm):
dec = forms.DecimalField(max_digits=8, decimal_places=2,
localize=True)
class Meta:
model = De
For clarification: The output in the admin list view is properly
localized. Only the input doesn't work.
I'm using Django 1.2.1 and a almost vanilla Django project only with
this one test app installed.
On 3 Jul., 22:07, Simon Westphahl wrote:
> Hi,
>
> I tried to implement a localized "DecimalFi
Hi,
I tried to implement a localized "DecimalField" but it doesn't seem to
work. When entering a decimal number with a German decimal seperator
( , ) the admin interface tells me to "Enter a number". Is there some
setting/middleware/etc. I overlooked?
My "settings.py" and test model look somethin
8 matches
Mail list logo