These are chat archives for django/django

Jul 2018
Jul 27 2018 00:58
@hossam0114 I see you are cross posting same thing multiple channels. Please be on topic!
Jul 27 2018 06:31
@elcolie your message is reached !
Sanjeev Sharma
Jul 27 2018 11:19
Anybody here with some experience of deploying Django on ElasticBeanstalk with S3? My work is almost done, but I am unable to fetch media files from my S3 bucket. HELP.
Curtis Maloney
Jul 27 2018 11:20
@thesanjeevsharma which custom storage backend are you using?
Jul 27 2018 13:49

Hello everyone, I have a decimalfield in my form and, in order to format it correctly, I used the humanize module(had to chance the input type to text in order to do so). Problem is, now when I try to save another value, I get an error saying that it is not a number. Has anyone dealt with this before? Should I need to overwrite the clean method on my form.

this is the form:

class AddAzienda(ModelForm):
    class Meta:
        model = Azienda
        fields = ('logo', 'nome', 'indirizzo', 'citta', 'provincia', 'cap', 'p_iva', 'rea', 'email', 'top_pdf', 'bottom_pdf', 'is_active', "capitale_sociale")

and this is the model:

class Azienda(models.Model):
    class Meta:
        verbose_name = 'Azienda'
        verbose_name_plural = 'Aziende'
    logo = models.ImageField(upload_to='azienda/')
    nome = models.CharField(max_length=250)
    indirizzo = models.CharField(max_length=250)
    citta = models.CharField(max_length=250, blank=True, null=True)
    cap = models.CharField(max_length=250, blank=True, null=True)
    provincia = models.CharField(max_length=250)
    p_iva = models.CharField(max_length=250)
    rea = models.CharField(max_length=250)
    email = models.EmailField()
    top_pdf = models.ImageField(upload_to="azienda/")
    bottom_pdf = models.ImageField(upload_to="azienda/")
    is_active = models.BooleanField(default=True)
    capitale_sociale = models.DecimalField(decimal_places=2, max_digits=12, blank=True, null=True)
Jul 27 2018 15:07
@matfire If I were you I will implement my own clean() method.