Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rachpurisima_music
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
Rachel
rachpurisima_music
Commits
6f5e9720
Commit
6f5e9720
authored
Feb 20, 2023
by
rachbit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set up django admin page
parent
8a2ced8b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
0 deletions
+20
-0
db.sqlite3
rachpurisima_music/db.sqlite3
+0
-0
admin.cpython-39.pyc
rachpurisima_music/homepage/__pycache__/admin.cpython-39.pyc
+0
-0
models.cpython-39.pyc
...purisima_music/homepage/__pycache__/models.cpython-39.pyc
+0
-0
admin.py
rachpurisima_music/homepage/admin.py
+20
-0
No files found.
rachpurisima_music/db.sqlite3
View file @
6f5e9720
No preview for this file type
rachpurisima_music/homepage/__pycache__/admin.cpython-39.pyc
View file @
6f5e9720
No preview for this file type
rachpurisima_music/homepage/__pycache__/models.cpython-39.pyc
View file @
6f5e9720
No preview for this file type
rachpurisima_music/homepage/admin.py
View file @
6f5e9720
from
django.contrib
import
admin
from
django.contrib
import
admin
from
.models
import
Artist
,
Album
,
Song
# Register your models here.
# Register your models here.
class
ArtistAdmin
(
admin
.
ModelAdmin
):
model
=
Artist
class
AlbumAdmin
(
admin
.
ModelAdmin
):
model
=
Album
class
SongAdmin
(
admin
.
ModelAdmin
):
model
=
Song
# registering the model and the admin is what tells
# Django that admin pages must be generated for the models specified
admin
.
site
.
register
(
Artist
,
ArtistAdmin
)
admin
.
site
.
register
(
Album
,
AlbumAdmin
)
admin
.
site
.
register
(
Song
,
SongAdmin
)
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