Commit d518f6ae authored by Ysobel Vera's avatar Ysobel Vera

Removing unnecessary bits of code

Removed unnecessary comments in settings.py and some parts of code that weren't being used in models in the homepage app.
parent a3fe9afb
Pipeline #2681 canceled with stages
No preview for this file type
...@@ -11,21 +11,14 @@ class Artist(models.Model): ...@@ -11,21 +11,14 @@ class Artist(models.Model):
def get_absolute_url(self): def get_absolute_url(self):
return reverse('artist_detail', args=[str(self.artist_name)]) return reverse('artist_detail', args=[str(self.artist_name)])
@property
def is_tutorial(self):
return self.monthly_listeners == 1
class Album(models.Model): class Album(models.Model):
album_name = models.CharField(max_length=200) album_name = models.CharField(max_length=200)
artist = models.ForeignKey( artist = models.ForeignKey(
Artist, Artist,
on_delete=models.CASCADE, on_delete=models.CASCADE
related_name='artists'
) )
#models.CharField(max_length=200)
description = models.CharField(max_length=200) description = models.CharField(max_length=200)
release_date = models.IntegerField() release_date = models.CharField(max_length=200)
class Song(models.Model): class Song(models.Model):
song_title = models.CharField(max_length=200) song_title = models.CharField(max_length=200)
......
...@@ -25,7 +25,6 @@ BASE_DIR = Path(__file__).resolve().parent.parent ...@@ -25,7 +25,6 @@ BASE_DIR = Path(__file__).resolve().parent.parent
# SECURITY WARNING: keep the secret key used in production secret! # SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = os.getenv('SECRET_KEY') SECRET_KEY = os.getenv('SECRET_KEY')
#'django-insecure-n13bg_yfe#iwk)*tg$gc6ap95vabi#v%kz=g^avw_-sg%)+ax1'
# SECURITY WARNING: don't run with debug turned on in production! # SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True DEBUG = True
......
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