Commit f2ca6600 authored by Emmanuel Linus T. Evangelista's avatar Emmanuel Linus T. Evangelista

Merge branch 'master' into evangelista/forum

parents 2093cf64 4f7f5afc
# Widgets FEKK
CSCI 40 - A and C
## Lab 1
## Lab
Contributors:
- Emmanuel Linus Evangelista (Forum)
- Kyla Sydney Martin (Announcements)
......@@ -9,4 +9,5 @@ Contributors:
- Franco Manuel Velasco (Homepage)
Video Link for Lab 1: https://drive.google.com/file/d/1iZN6jfImQB5sxjsqfMPsWcjvSW20x3ei/view?usp=sharing
Video Link for Lab 2: https://drive.google.com/drive/folders/1T3HRmLxzgxY3vQLCxVyrm97430llL96i?usp=sharing
\ No newline at end of file
Video Link for Lab 2: https://drive.google.com/drive/folders/1T3HRmLxzgxY3vQLCxVyrm97430llL96i?usp=sharing
Video Link for Lab 3: https://drive.google.com/drive/folders/1_50dYF_dUWmvoTX1KkqkKXG9AWM3xUS8?usp=sharing
\ No newline at end of file
......@@ -13,12 +13,16 @@
<div id = "courses">
<ul>
<div class = "wrapper">
{% for a in assignments %}
{% for c in course%}
<div class = "block">
<h2> {{a.course}} </h2>
<li>
<a href="/assignment/{{ a.pk }}/details"> {{a.name}} </a>
</li>
<h2> {{ c }}</h2>
{% for a in assignments %}
{% if c == a.course%}
<li>
<a href="/assignment/{{ a.pk }}/details"> {{a.name}} </a>
</li>
{%endif%}
{%endfor%}
</div>
{%endfor%}
</div>
......
......@@ -16,6 +16,6 @@
<div id = "courses">
<h1> List of courses: </h1>
</div>
{% include "Assignments/assignment_list.html" with assignments=assignment %}
{% include "Assignments/assignment_list.html" with assignments=assignment course=course %}
{%endblock content%}
\ No newline at end of file
......@@ -10,7 +10,7 @@ For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
"""
from os import getenv
from os import getenv, path
from pathlib import Path
from dotenv import load_dotenv
......@@ -19,6 +19,8 @@ load_dotenv()
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
MEDIA_ROOT = path.join(BASE_DIR, 'media')
MEDIA_URL = '/uploads/'
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
......
......@@ -13,6 +13,8 @@ Including another URLconf
1. Import the include() function: from django.urls import include, path
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
import Announcements.views as Announcements_views
......@@ -34,3 +36,6 @@ urlpatterns = [
]
if settings.DEBUG:
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
\ No newline at end of file
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