diff --git a/courses/forms.py b/courses/forms.py index ae3a796..d72ef8c 100644 --- a/courses/forms.py +++ b/courses/forms.py @@ -51,7 +51,7 @@ class CourseForm(forms.ModelForm): class Meta: model = Course fields = ('name', 'objectivies', 'content', 'max_students', 'init_register_date', 'end_register_date', - 'init_date', 'end_date', 'image', 'category',) + 'init_date', 'end_date', 'category',) labels = { 'name': _('Name'), 'objectivies': _('Objectives'), @@ -61,7 +61,6 @@ class CourseForm(forms.ModelForm): 'end_register_date': _('Course registration end date'), 'init_date': _('Course start date'), 'end_date': _('Course end date'), - 'image': _('Image'), 'category': _('CourseCategory'), } help_texts = { @@ -73,7 +72,6 @@ class CourseForm(forms.ModelForm): 'end_register_date': _('Date that ends the registration period of the course (dd/mm/yyyy)'), 'init_date': _('Date that the course starts (dd/mm/yyyy)'), 'end_date': _('Date that the course ends (dd/mm/yyyy)'), - 'image': _('Representative image of the course'), 'category': _('CourseCategory which the course belongs'), } @@ -91,7 +89,7 @@ class UpdateCourseForm(CourseForm): class Meta: model = Course fields = ('name', 'objectivies', 'content', 'max_students', 'init_register_date', 'end_register_date', - 'init_date', 'end_date', 'image', 'category','students',) + 'init_date', 'end_date', 'category','students',) labels = { 'name': _('Name'), 'objectivies': _('Objectives'), @@ -101,7 +99,6 @@ class UpdateCourseForm(CourseForm): 'end_register_date': _('Course registration end date'), 'init_date': _('Course start date'), 'end_date': _('Course end date'), - 'image': _('Image'), 'category': _('CourseCategory'), 'students': _('Student'), } @@ -114,7 +111,6 @@ class UpdateCourseForm(CourseForm): 'end_register_date': _('Date that ends the registration period of the course (dd/mm/yyyy)'), 'init_date': _('Date that the course starts (dd/mm/yyyy)'), 'end_date': _('Date that the course ends (dd/mm/yyyy)'), - 'image': _('Representative image of the course'), 'category': _('CourseCategory which the course belongs'), 'students': _("Course's Students"), } diff --git a/courses/models.py b/courses/models.py index 218ec17..60ad7a5 100644 --- a/courses/models.py +++ b/courses/models.py @@ -46,7 +46,6 @@ class Course(models.Model): end_register_date = models.DateField(_('Register Date (End)')) init_date = models.DateField(_('Begin of Course Date')) end_date = models.DateField(_('End of Course Date')) - image = models.ImageField(verbose_name = _('Image'), blank = True, upload_to = 'courses/') category = models.ForeignKey(CourseCategory, verbose_name = _('Category'), related_name='course_category') professors = models.ManyToManyField(User,verbose_name=_('Professors'), related_name='courses_professors') students = models.ManyToManyField(User,verbose_name=_('Students'), related_name='courses_student', blank = True) @@ -146,7 +145,7 @@ class Material(Resource): topic = models.ForeignKey(Topic, verbose_name = _('Topic'), related_name='materials') students = models.ManyToManyField(User, verbose_name = _('Students'), related_name='materials') all_students = models.BooleanField(_('All Students'), default=False) - + class FileMaterial(models.Model): material = models.ForeignKey(Material, verbose_name = _('Material'), related_name='material_file') file = models.FileField(upload_to='uploads/%Y/%m/%d') @@ -156,7 +155,7 @@ class LinkMaterial(models.Model): material = models.ForeignKey(Material, verbose_name = _('Material'), related_name='material_link') name = models.CharField(max_length=100) description = models.TextField() - url = models.URLField('Link', max_length=300) + url = models.URLField('Link', max_length=300) """ It is a category for each subject. diff --git a/courses/templates/course/course_card.html b/courses/templates/course/course_card.html index 2f39e0e..c98069b 100644 --- a/courses/templates/course/course_card.html +++ b/courses/templates/course/course_card.html @@ -26,7 +26,7 @@ {% elif user|has_role:'student' %} {% if not request.user in course.students.all %} - + {% endif %} {% endif %} @@ -34,7 +34,7 @@
{% trans 'Course Name' %}: {{course.name}}
-{% trans 'Coordinator' %}: {{course.professors.all.0}}
+{% trans 'Professor' %}: {{course.professors.all.0}}
{% trans 'Description' %}:
diff --git a/courses/templates/course/create.html b/courses/templates/course/create.html
index a91b021..163331d 100644
--- a/courses/templates/course/create.html
+++ b/courses/templates/course/create.html
@@ -20,16 +20,7 @@
{% if field.auto_id == 'id_init_register_date' or field.auto_id == 'id_end_register_date' or field.auto_id == 'id_init_date' or field.auto_id == 'id_end_date'%}
- {% elif field.auto_id == 'id_image' %}
- {% render_field field class='form-control' %}
-