Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_robo_mommy
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Raul Jarod Conanan
midterm_robo_mommy
Commits
2b804b8b
Commit
2b804b8b
authored
Mar 06, 2023
by
Raul Jarod Conanan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'Assignments' into 'dev'
Assignments See merge request
!11
parents
21c92230
60d561f1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
4 deletions
+7
-4
admin.py
widget_robo_mommy/Assignments/admin.py
+4
-1
models.py
widget_robo_mommy/Assignments/models.py
+2
-0
views.py
widget_robo_mommy/Assignments/views.py
+1
-3
No files found.
widget_robo_mommy/Assignments/admin.py
View file @
2b804b8b
from
django.contrib
import
admin
from
django.contrib
import
admin
from
.models
import
Assignment
,
Course
from
.models
import
Assignment
,
Course
class
AssignmentAdmin
(
admin
.
ModelAdmin
):
class
AssignmentAdmin
(
admin
.
ModelAdmin
):
model
=
Assignment
model
=
Assignment
class
CourseAdmin
(
admin
.
ModelAdmin
):
class
CourseAdmin
(
admin
.
ModelAdmin
):
model
=
Course
model
=
Course
admin
.
site
.
register
(
Assignment
,
AssignmentAdmin
)
admin
.
site
.
register
(
Assignment
,
AssignmentAdmin
)
admin
.
site
.
register
(
Course
,
CourseAdmin
)
admin
.
site
.
register
(
Course
,
CourseAdmin
)
widget_robo_mommy/Assignments/models.py
View file @
2b804b8b
from
django.db
import
models
from
django.db
import
models
class
Course
(
models
.
Model
):
class
Course
(
models
.
Model
):
code
=
models
.
CharField
(
max_length
=
10
,
blank
=
True
,
null
=
True
)
code
=
models
.
CharField
(
max_length
=
10
,
blank
=
True
,
null
=
True
)
title
=
models
.
CharField
(
max_length
=
255
,
blank
=
True
,
null
=
True
)
title
=
models
.
CharField
(
max_length
=
255
,
blank
=
True
,
null
=
True
)
section
=
models
.
CharField
(
max_length
=
3
,
blank
=
True
,
null
=
True
)
section
=
models
.
CharField
(
max_length
=
3
,
blank
=
True
,
null
=
True
)
class
Assignment
(
models
.
Model
):
class
Assignment
(
models
.
Model
):
name
=
models
.
CharField
(
max_length
=
255
,
blank
=
True
,
null
=
True
)
name
=
models
.
CharField
(
max_length
=
255
,
blank
=
True
,
null
=
True
)
description
=
models
.
TextField
(
blank
=
True
,
null
=
True
)
description
=
models
.
TextField
(
blank
=
True
,
null
=
True
)
...
...
widget_robo_mommy/Assignments/views.py
View file @
2b804b8b
from
django.shortcuts
import
render
from
django.http
import
HttpResponse
from
django.http
import
HttpResponse
from
.models
import
Assignment
,
Course
from
.models
import
Assignment
import
os
def
index
(
request
):
def
index
(
request
):
...
...
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