Skip to content
Snippets Groups Projects
models.py 475 B
Newer Older
  • Learn to ignore specific revisions
  • Rafael László's avatar
    Rafael László committed
    from django.db import models
    from account.models import Profile
    
    
    class Mentor(models.Model):
        mentor = models.ForeignKey(
            Profile,
            related_name="mentor",
            on_delete=models.DO_NOTHING,
        )
        name = models.CharField(null=False, max_length=200)
        text = models.TextField()
    
    Rafael László's avatar
    Rafael László committed
        image = models.ImageField(
            upload_to='mentors/images/', null=True, blank=True)
    
    Rafael László's avatar
    Rafael László committed
        email = models.EmailField()
    
        def __str__(self):
            return self.name