Commit 4d6c7ca533a33bbff750163878f9f18b0c9896ee

Authored by Gustavo Bernardo
1 parent 89ceed5d

Included link image properly [Issue:#119]

Showing 1 changed file with 2 additions and 0 deletions   Show diff stats
links/models.py
1 from django.db import models 1 from django.db import models
2 from courses.models import Material 2 from courses.models import Material
3 from autoslug.fields import AutoSlugField 3 from autoslug.fields import AutoSlugField
  4 +from django.contrib.staticfiles.templatetags.staticfiles import static
4 # Create your models here. 5 # Create your models here.
5 class Link(Material): 6 class Link(Material):
6 link_url = models.URLField() 7 link_url = models.URLField()
7 link_description = models.CharField(max_length=200) 8 link_description = models.CharField(max_length=200)
  9 + image = models.ImageField(upload_to = 'links/',blank = True)
8 class Meta: 10 class Meta:
9 verbose_name = 'Link' 11 verbose_name = 'Link'
10 verbose_name_plural = "Links" 12 verbose_name_plural = "Links"