Finishing up assignments app

parent 6e231563
<<<<<<< HEAD
# Generated by Django 4.0.3 on 2022-05-19 15:51
=======
# Generated by Django 4.0.3 on 2022-05-18 05:18
>>>>>>> e8302eda5a5b3d0f12807e7cd55e42d4b2a3be23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('announcements', '0003_reaction_reaction_name'),
]
operations = [
migrations.AlterField(
model_name='reaction',
name='announcement',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='reacts', to='announcements.announcement'),
),
]
......@@ -24,7 +24,7 @@ class Assignment(models.Model):
course = models.ForeignKey(Course, on_delete = models.CASCADE)
image = models.ImageField(upload_to='images')
image = models.ImageField(upload_to='assignments/')
@property
def passing_score(self):
......
......@@ -8,8 +8,10 @@
{% block content %}
<p class="course">{{ object.course.course_code }} {{ object.course.course_title }} {{ object.course.section }}</p>
<p class="title">{{ object.name }}</p>
<p class="desc">{{ object.description }}</p>
<p class="score">Perfect Score: {{ object.max_points }}</p>
<p class="score">Passing Score: {{ object.passing_score }}</p>
<img src= "{{ object.image }}">
<img src= "{{ object.image.url }}">
<div class="assign_details">
<p class="desc">{{ object.description }}</p>
<p class="score">Perfect Score: {{ object.max_points }}</p>
<p class="score">Passing Score: {{ object.passing_score }}</p>
</div>
{% endblock %}
\ No newline at end of file
No preview for this file type
......@@ -128,7 +128,7 @@ STATICFILES_DIRS = [os.path.join(BASE_DIR, 'widget_group_23/static')]
STATIC_ROOT = os.path.join(BASE_DIR, 'widget_group_23/staticfiles')
MEDIA_URL = '/media'
MEDIA_URL = '/media/'
MEDIA_ROOT = os.path.join(BASE_DIR, 'widget_group_23/media')
# Default primary key field type
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment