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
9525e3b0
Commit
9525e3b0
authored
Mar 02, 2023
by
Stefan Gomez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created the dashboards page and its models, and updated the project's settings.
parent
7d25903a
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
55 additions
and
0 deletions
+55
-0
__init__.py
widget_k3git/dashboard/__init__.py
+0
-0
admin.py
widget_k3git/dashboard/admin.py
+14
-0
apps.py
widget_k3git/dashboard/apps.py
+6
-0
__init__.py
widget_k3git/dashboard/migrations/__init__.py
+0
-0
models.py
widget_k3git/dashboard/models.py
+17
-0
tests.py
widget_k3git/dashboard/tests.py
+3
-0
urls.py
widget_k3git/dashboard/urls.py
+10
-0
views.py
widget_k3git/dashboard/views.py
+3
-0
__init__.cpython-311.pyc
...t_k3git/widget_k3git/__pycache__/__init__.cpython-311.pyc
+0
-0
settings.cpython-311.pyc
...t_k3git/widget_k3git/__pycache__/settings.cpython-311.pyc
+0
-0
settings.py
widget_k3git/widget_k3git/settings.py
+1
-0
urls.py
widget_k3git/widget_k3git/urls.py
+1
-0
No files found.
widget_k3git/dashboard/__init__.py
0 → 100644
View file @
9525e3b0
widget_k3git/dashboard/admin.py
0 → 100644
View file @
9525e3b0
from
django.contrib
import
admin
from
.
models
import
Department
,
WidgetUser
class
DepartmentAdmin
(
admin
.
ModelAdmin
):
model
=
Department
class
WidgetUserAdmin
(
admin
.
ModelAdmin
):
model
=
WidgetUser
admin
.
site
.
register
(
Department
,
DepartmentAdmin
)
admin
.
site
.
register
(
Assignment
,
AssignmentAdmin
)
widget_k3git/dashboard/apps.py
0 → 100644
View file @
9525e3b0
from
django.apps
import
AppConfig
class
DashboardConfig
(
AppConfig
):
default_auto_field
=
'django.db.models.BigAutoField'
name
=
'dashboard'
widget_k3git/dashboard/migrations/__init__.py
0 → 100644
View file @
9525e3b0
widget_k3git/dashboard/models.py
0 → 100644
View file @
9525e3b0
from
django.db
import
models
class
Department
(
models
.
Model
):
dept_name
=
models
.
CharField
(
max_length
=
100
)
home_unit
=
models
.
CharField
(
max_length
=
100
)
def__str__
(
self
):
return
'{}, {}'
.
format
(
self
.
dept_name
,
self
.
home_unit
)
class
WidgetUser
(
models
.
Model
):
first_name
=
models
.
CharField
(
max_length
=
100
)
middle_name
=
models
.
CharField
(
max_length
=
100
)
last_name
=
models
.
CharField
(
max_length
=
100
)
department
=
models
.
ForeignKey
(
Department
,
on_delete
=
models
.
CASCADE
)
widget_k3git/dashboard/tests.py
0 → 100644
View file @
9525e3b0
from
django.test
import
TestCase
# Create your tests here.
widget_k3git/dashboard/urls.py
0 → 100644
View file @
9525e3b0
from
django.contrib
import
admin
from
django.urls
import
path
from
.views
import
index
urlpatterns
=
[
path
(
''
,
index
,
name
=
'index'
),
]
app_name
=
"dashboard"
\ No newline at end of file
widget_k3git/dashboard/views.py
0 → 100644
View file @
9525e3b0
from
django.shortcuts
import
render
# Create your views here.
widget_k3git/widget_k3git/__pycache__/__init__.cpython-311.pyc
0 → 100644
View file @
9525e3b0
File added
widget_k3git/widget_k3git/__pycache__/settings.cpython-311.pyc
0 → 100644
View file @
9525e3b0
File added
widget_k3git/widget_k3git/settings.py
View file @
9525e3b0
...
...
@@ -43,6 +43,7 @@ INSTALLED_APPS = [
'django.contrib.messages'
,
'django.contrib.staticfiles'
,
'assignments'
,
'dashboard'
,
]
MIDDLEWARE
=
[
...
...
widget_k3git/widget_k3git/urls.py
View file @
9525e3b0
...
...
@@ -3,5 +3,6 @@ from django.urls import include, path
urlpatterns
=
[
path
(
'assignments/'
,
include
(
'assignments.urls'
,
namespace
=
"assignments"
)),
path
(
'dashboard/'
,
include
(
'dashboard.urls'
,
namespace
=
"dashboard"
)),
path
(
'admin/'
,
admin
.
site
.
urls
),
]
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