How do I create a folder for a model when I submit the form in the admin page?

Question

Hello. I'm new to Django and I'm having trouble figuring out how to do it.

 

My model is like this:

class Clinica(models.Model):
    def __str__(self):
        return self.nome

    nome        = models.CharField(max_length=20)
    site        = models.URLField(blank=True,null=True)
    folder      = models.FilePathField(blank=True,null=True)
    data_inc    = models.DateTimeField('Data Publicada')
    data_lim    = models.DateField('Vencimento')

 

How can I create that folder?

Guest July 19, 2016, 4:20 p.m. 0 Answer

Warning! You are not logged in.
Your answer will be published as Guest user.

Post your Answer

 Prev question