1

I'm using django-userena for accounts and profiles. I extended the UserProfile model by adding a filefield:

class UserProfile(UserenaBaseProfile):
    GENDER_CHOICES = (
                    (1, ('Male')),
                    (2, ('Female')),
                    )
    user = models.OneToOneField(User, unique=True,
                            verbose_name=('user'),
                            related_name='User_Profile')
    gender = models.PositiveSmallIntegerField(('gender'),
                            choices=GENDER_CHOICES,
                            blank=True,
                            null=True)
    website = models.URLField(('website'), blank=True, verify_exists=True)
    location =  models.CharField(('location'), max_length=255, blank=True)
    birth_date = models.DateField(('birth date'), blank=True, null=True)
    about_me = models.TextField(('about me'), blank=True)
    resume = models.FileField(('resume'), upload_to='uploads/files', blank=True)

Now I want to create a view that downloads that resume file, but I don't know how to create it.

I'm doing it through django so as to restrict who can see the file.

Jesramz
  • 97
  • 1
  • 7

0 Answers0