class File(models.Model):
    name = models.CharField(max_length=45)
description = models.CharField(max_length=100, blank=True)
file = models.FileField(upload_to='files')
Getting file extension in Django template