Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
widget_group 23
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bianca Aguilar
widget_group 23
Commits
16231c67
Commit
16231c67
authored
May 19, 2022
by
Bianca Aguilar
Browse files
Options
Browse Files
Download
Plain Diff
Fixing conflicts on my end
parents
c70d42ce
6e231563
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
39 additions
and
2 deletions
+39
-2
0004_alter_reaction_announcement.py
announcements/migrations/0004_alter_reaction_announcement.py
+4
-0
models.cpython-310.pyc
assignments/__pycache__/models.cpython-310.pyc
+0
-0
urls.cpython-310.pyc
assignments/__pycache__/urls.cpython-310.pyc
+0
-0
views.cpython-310.pyc
assignments/__pycache__/views.cpython-310.pyc
+0
-0
0004_assignment_image.py
assignments/migrations/0004_assignment_image.py
+19
-0
0004_assignment_image.cpython-310.pyc
...rations/__pycache__/0004_assignment_image.cpython-310.pyc
+0
-0
models.py
assignments/models.py
+2
-0
assignment.html
assignments/templates/assignments/assignment.html
+1
-1
assignment_detail.html
assignments/templates/assignments/assignment_detail.html
+1
-0
urls.py
assignments/urls.py
+1
-1
1.jpg
images/1.jpg
+0
-0
settings.py
widget_group_23/settings.py
+5
-0
urls.py
widget_group_23/urls.py
+6
-0
No files found.
announcements/migrations/0004_alter_reaction_announcement.py
View file @
16231c67
<<<<<<<
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
...
...
assignments/__pycache__/models.cpython-310.pyc
View file @
16231c67
No preview for this file type
assignments/__pycache__/urls.cpython-310.pyc
View file @
16231c67
No preview for this file type
assignments/__pycache__/views.cpython-310.pyc
View file @
16231c67
No preview for this file type
assignments/migrations/0004_assignment_image.py
0 → 100644
View file @
16231c67
# Generated by Django 4.0.3 on 2022-05-19 15:51
from
django.db
import
migrations
,
models
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'assignments'
,
'0003_assignment_course'
),
]
operations
=
[
migrations
.
AddField
(
model_name
=
'assignment'
,
name
=
'image'
,
field
=
models
.
ImageField
(
default
=
1
,
upload_to
=
'images'
),
preserve_default
=
False
,
),
]
assignments/migrations/__pycache__/0004_assignment_image.cpython-310.pyc
0 → 100644
View file @
16231c67
File added
assignments/models.py
View file @
16231c67
...
...
@@ -24,6 +24,8 @@ class Assignment(models.Model):
course
=
models
.
ForeignKey
(
Course
,
on_delete
=
models
.
CASCADE
)
image
=
models
.
ImageField
(
upload_to
=
'images'
)
@
property
def
passing_score
(
self
):
return
self
.
max_points
*
0.60
...
...
assignments/templates/assignments/assignment.html
View file @
16231c67
...
...
@@ -9,7 +9,7 @@
{% block content %}
<ul>
{% for c in course_list %}
{% for c in course_list
|dictsort:"course_code"
%}
<li><p
class=
"course_section"
>
{{ c.course_code }} {{ c.course_title }} {{ c.section }}
</p>
<ul
class=
"course_assignments"
>
{% for a in assignment_list %}
...
...
assignments/templates/assignments/assignment_detail.html
View file @
16231c67
...
...
@@ -11,4 +11,5 @@
<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 }}"
>
{% endblock %}
\ No newline at end of file
assignments/urls.py
View file @
16231c67
...
...
@@ -4,7 +4,7 @@ from .views import AssignmentsPageView, AssignmentDetailView
urlpatterns
=
[
path
(
''
,
AssignmentsPageView
.
as_view
(),
name
=
'index'
),
path
(
'<int:pk>/details'
,
AssignmentDetailView
.
as_view
(),
name
=
'assignment-detail'
),
path
(
'
assignment/
<int:pk>/details'
,
AssignmentDetailView
.
as_view
(),
name
=
'assignment-detail'
),
]
app_name
=
"assignments"
\ No newline at end of file
images/1.jpg
0 → 100644
View file @
16231c67
5.19 KB
widget_group_23/settings.py
View file @
16231c67
...
...
@@ -126,6 +126,11 @@ USE_TZ = True
STATIC_URL
=
'static/'
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_ROOT
=
os
.
path
.
join
(
BASE_DIR
,
'widget_group_23/media'
)
# Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
...
...
widget_group_23/urls.py
View file @
16231c67
...
...
@@ -18,6 +18,9 @@ from django.urls import include, path
from
django.conf
import
settings
from
django.conf.urls.static
import
static
from
django.conf
import
settings
from
django.conf.urls.static
import
static
urlpatterns
=
[
path
(
'homepage/'
,
include
(
'homepage.urls'
,
namespace
=
"homepage"
)),
path
(
'forum/'
,
include
(
'forum.urls'
,
namespace
=
"forum"
)),
...
...
@@ -25,3 +28,6 @@ urlpatterns = [
path
(
'announcements/'
,
include
(
'announcements.urls'
,
namespace
=
"announcements"
)),
path
(
'admin/'
,
admin
.
site
.
urls
),
]
if
settings
.
DEBUG
:
urlpatterns
+=
static
(
settings
.
MEDIA_URL
,
document_root
=
settings
.
MEDIA_ROOT
)
\ No newline at end of file
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