Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_Francoconuts
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Chester Tan
widget_Francoconuts
Commits
118ce515
Commit
118ce515
authored
May 14, 2022
by
Bryan Carlo Guanlao
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.discs.ateneo.edu/chesterpogi/widget_Francoconuts
parents
4c8d3031
f6fd0c33
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
65 additions
and
15 deletions
+65
-15
.gitignore
.gitignore
+2
-1
.env
widget_Francoconuts/.env
+0
-1
assignment_detail.html
.../assignments/templates/assignments/assignment_detail.html
+13
-0
assignments.html
...conuts/assignments/templates/assignments/assignments.html
+0
-8
course_list.html
...conuts/assignments/templates/assignments/course_list.html
+17
-0
urls.py
widget_Francoconuts/assignments/urls.py
+3
-2
views.py
widget_Francoconuts/assignments/views.py
+13
-2
chesterC.png
widget_Francoconuts/static/assignments/chesterC.png
+0
-0
base.html
widget_Francoconuts/templates/base.html
+12
-0
settings.py
widget_Francoconuts/widget_Francoconuts/settings.py
+5
-1
No files found.
.gitignore
View file @
118ce515
...
...
@@ -3,4 +3,5 @@
*.pyc
__pycache__
db.sqlite3
media
\ No newline at end of file
media
.env
\ No newline at end of file
widget_Francoconuts/.env
deleted
100644 → 0
View file @
4c8d3031
SECRET_KEY = 'django-insecure-$y$z*4bad7nc46_+$udo32cis1&=e&%7#*_$47+ym=d#u3t46m'
\ No newline at end of file
widget_Francoconuts/assignments/templates/assignments/assignment_detail.html
0 → 100644
View file @
118ce515
<ul>
<ul>
<li>
{{object.course.course_code}} {{object.course.course_title}} {{object.course.section}}
</li>
</ul>
<li>
{{object.name}}
</li>
<li>
{{object.description}}
</li>
<li>
{{object.max_points}}
</li>
<li>
{{object.passing_score}}
</li>
{% load static %}
<li><img
src=
"{% static 'assignments/chesterC.png' %}"
alt=
"image"
></li>
</ul>
widget_Francoconuts/assignments/templates/assignments/assignments.html
deleted
100644 → 0
View file @
4c8d3031
<h1>
ASSIGNMENTS:
</h1>
{% for assignment in assignments %}
<p>
Assignment Name: {{assignment.name}}
</p>
<p>
Description: {{assignment.description}}
</p>
<p>
Perfect Score: {{assignment.max_points}}
</p>
<p>
Passing Score: {{assignment.passing_score}}
</p>
<p>
Course/Section: {{assignment.course.course_code}} {{assignment.course.course_title}} {{assignment.course.section}}
</p><br>
{% endfor %}
\ No newline at end of file
widget_Francoconuts/assignments/templates/assignments/course_list.html
0 → 100644
View file @
118ce515
{% extends 'base.html' %}
{% block content %}
<h1>
Assignmets Per Course
</h1>
<label>
List of Courses:
</label>
<ul>
{% for course in object_list %}
<li>
{{course.course_code}} {{course.course_title}} {{course.section}}
</li>
<ul>
{% for assignment in course.assignment.all %}
<li>
<a
href=
"{% url 'assignment-detail' assignment.id %}"
>
{{assignment}}
</a>
</li>
{% endfor %}
</ul>
{% endfor %}
</ul>
{% endblock content %}
\ No newline at end of file
widget_Francoconuts/assignments/urls.py
View file @
118ce515
from
django.urls
import
path
from
.views
import
assignments
from
.views
import
assignments
,
AssignmentDetailView
,
AssignmentListView
urlpatterns
=
[
path
(
''
,
assignments
,
name
=
'assignments'
)
path
(
''
,
AssignmentListView
.
as_view
(),
name
=
'assignments'
),
path
(
'<int:pk>/details/'
,
AssignmentDetailView
.
as_view
(),
name
=
'assignment-detail'
),
]
\ No newline at end of file
widget_Francoconuts/assignments/views.py
View file @
118ce515
from
django.shortcuts
import
render
from
.models
import
Assignment
from
.models
import
Assignment
,
Course
from
django.views.generic.detail
import
DetailView
from
django.views.generic.list
import
ListView
def
assignments
(
request
):
assignments_context
=
Assignment
.
objects
.
all
()
context
=
{
'assignments'
:
assignments_context
courses
=
Course
.
objects
.
order_by
(
'course_code'
)
context
=
{
'assignments'
:
assignments_context
,
'courses'
:
courses
,
}
return
render
(
request
,
'assignments/assignments.html'
,
context
)
class
AssignmentListView
(
ListView
):
model
=
Course
class
AssignmentDetailView
(
DetailView
):
model
=
Assignment
\ No newline at end of file
widget_Francoconuts/static/assignments/chesterC.png
0 → 100644
View file @
118ce515
112 KB
widget_Francoconuts/templates/base.html
0 → 100644
View file @
118ce515
<!DOCTYPE html>
<html>
<head>
<title>
Francoconuts Widget
</title>
</head>
<body>
<h1>
WIDGET
</h1>
<hr></hr>
{% block content %}
{% endblock content %}
</body>
</html>
\ No newline at end of file
widget_Francoconuts/widget_Francoconuts/settings.py
View file @
118ce515
...
...
@@ -125,7 +125,11 @@ USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.0/howto/static-files/
STATIC_URL
=
'static/'
STATIC_URL
=
'/static/'
STATICFILES_DIRS
=
[
os
.
path
.
join
(
BASE_DIR
,
'static'
),
]
# Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment