Commit 13936a11 authored by Albert Gagalac's avatar Albert Gagalac

implemented admin site

parent 292e7c59
...@@ -9,18 +9,18 @@ class Artist(models.Model): ...@@ -9,18 +9,18 @@ class Artist(models.Model):
bio = models.TextField(max_length = 700) bio = models.TextField(max_length = 700)
class Album(Artist): class Album(models.Model):
artist = models.CharField(max_length=50,unique=True) artist = models.CharField(max_length=50,unique=True)
album_name = models.CharField(max_length=50, unique=True) album_name = models.CharField(max_length=50, unique=True)
description = models.TextField() description = models.TextField()
release_date = models.DateField() release_date = models.DateField()
label = models.CharField() label = models.CharField(max_length=50)
song_count = models.PositiveIntegerField() song_count = models.PositiveIntegerField()
class Song(Album): class Song(models.Model):
song_title = models.CharField(max_length=50, unique=True) song_title = models.CharField(max_length=50, unique=True)
artist = models.CharField(max_length=50) artist = models.CharField(max_length=50)
description = models.TextField() description = models.TextField()
song_length = models.PositiveIntegerField() song_length = models.PositiveIntegerField()
music_video = models.BooleanField(default=False) music_video = models.BooleanField(default=False)
lyrics = models.TextField() lyrics = models.TextField()
\ No newline at end of file
...@@ -17,6 +17,7 @@ from django.contrib import admin ...@@ -17,6 +17,7 @@ from django.contrib import admin
from django.urls import path, include from django.urls import path, include
urlpatterns = [ urlpatterns = [
path('', include('homepage.urls', namespace='homepage')),
path('homepage/', include('homepage.urls', namespace="homepage")), path('homepage/', include('homepage.urls', namespace="homepage")),
path('about/', include('about.urls', namespace="about")), path('about/', include('about.urls', namespace="about")),
path('contact/', include('contact.urls', namespace="contact")), path('contact/', include('contact.urls', namespace="contact")),
......
No preview for this file type
from django.db import models from django.db import models
# Create your models here. # Create your models here.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment