Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_k3git
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
Stefan Gomez
midterm_k3git
Commits
1fa802ca
Commit
1fa802ca
authored
May 07, 2023
by
Nate Brevin A. Que
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implemented the 'Edit Assignment Page'
parent
897d7c6b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
4 deletions
+24
-4
assignment-details.html
...assignments/templates/assignments/assignment-details.html
+1
-1
assignment-edit.html
...it/assignments/templates/assignments/assignment-edit.html
+13
-0
urls.py
widget_k3git/assignments/urls.py
+2
-1
views.py
widget_k3git/assignments/views.py
+8
-2
db.sqlite3
widget_k3git/db.sqlite3
+0
-0
No files found.
widget_k3git/assignments/templates/assignments/assignment-details.html
View file @
1fa802ca
...
...
@@ -10,5 +10,5 @@
</h3>
{% endblock %}
{% block scripts %}
<input
type=
"submit"
value=
"Edit Assignment"
>
<a
href=
"/assignments/{{ assignment.pk }}/edit"
><input
type=
"submit"
value=
"Edit Assignment"
></a
>
{% endblock %}
\ No newline at end of file
widget_k3git/assignments/templates/assignments/assignment-edit.html
0 → 100644
View file @
1fa802ca
{% extends 'base.html' %}
{% block title %}Edit Book{% endblock %}
{% block content %}
<form
action=
""
method=
"post"
>
{% csrf_token %}
{{ form.as_p }}
<input
type=
"submit"
value=
"Save Changes to Assignment"
>
</form>
{% endblock %}
{% block scripts %}
{% endblock %}
\ No newline at end of file
widget_k3git/assignments/urls.py
View file @
1fa802ca
from
django.contrib
import
admin
from
django.urls
import
path
from
.views
import
index
,
AssignmentDetailView
,
AssignmentCreateView
from
.views
import
index
,
AssignmentDetailView
,
AssignmentCreateView
,
AssignmentUpdateView
urlpatterns
=
[
path
(
''
,
index
,
name
=
'index'
),
path
(
'<int:pk>/details'
,
AssignmentDetailView
.
as_view
(),
name
=
'assignment-details'
),
path
(
'add/'
,
AssignmentCreateView
.
as_view
(),
name
=
'add-assignment'
),
path
(
'<int:pk>/edit'
,
AssignmentUpdateView
.
as_view
(),
name
=
'edit-assignment'
),
]
app_name
=
"assignments"
\ No newline at end of file
widget_k3git/assignments/views.py
View file @
1fa802ca
from
django.shortcuts
import
render
from
django.views.generic.detail
import
DetailView
from
django.views.generic.edit
import
CreateView
from
django.views.generic.edit
import
CreateView
,
UpdateView
from
.models
import
Assignment
...
...
@@ -20,3 +20,9 @@ class AssignmentCreateView(CreateView):
model
=
Assignment
fields
=
'__all__'
template_name
=
'assignments/assignment-add.html'
class
AssignmentUpdateView
(
UpdateView
):
model
=
Assignment
fields
=
'__all__'
template_name
=
'assignments/assignment-edit.html'
\ No newline at end of file
widget_k3git/db.sqlite3
View file @
1fa802ca
No preview for this file type
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