diff --git a/musicvis/settings.py b/musicvis/settings.py index 7a7df1e..7eefdbb 100644 --- a/musicvis/settings.py +++ b/musicvis/settings.py @@ -76,8 +76,12 @@ WSGI_APPLICATION = 'musicvis.wsgi.application' DATABASES = { 'default': { - 'ENGINE': 'django.db.backends.sqlite3', - 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + 'ENGINE': 'django.db.backends.postgresql_psycopg2', + 'NAME': 'spotifyvis', + 'USER': 'django', + 'PASSWORD': 'django', + 'HOST': 'localhost', + 'PORT': '', } } diff --git a/requirements.txt b/requirements.txt index a0eaa1d..7eba139 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,6 +7,7 @@ idna==2.6 isort==4.3.4 lazy-object-proxy==1.3.1 mccabe==0.6.1 +psycopg2==2.7.4 pylint==1.8.4 pytz==2018.4 requests==2.18.4 diff --git a/spotifyvis/models.py b/spotifyvis/models.py index f5e28c4..d33da87 100644 --- a/spotifyvis/models.py +++ b/spotifyvis/models.py @@ -3,7 +3,6 @@ from django.db import models # Artist {{{ # class Artist(models.Model): - class Meta: verbose_name = "Artist" verbose_name_plural = "Artists" @@ -21,13 +20,12 @@ class Artist(models.Model): # User {{{ # class User(models.Model): - class Meta: verbose_name = "User" verbose_name_plural = "Users" - user_id = models.CharField(primary_key=True, max_length=30) - username = models.CharField(max_length=30) + user_id = models.CharField(primary_key=True, max_length=30) # the user's Spotify ID + username = models.CharField(max_length=30) # User's Spotify user name, if set def __str__(self): return self.username diff --git a/spotifyvis/static/spotifyvis/scripts/user_data.js b/spotifyvis/static/spotifyvis/scripts/user_data.js new file mode 100644 index 0000000..e69de29 diff --git a/spotifyvis/templates/spotifyvis/user_data.html b/spotifyvis/templates/spotifyvis/user_data.html index 699f831..f31d42f 100644 --- a/spotifyvis/templates/spotifyvis/user_data.html +++ b/spotifyvis/templates/spotifyvis/user_data.html @@ -15,10 +15,11 @@
You are using an outdated browser. Please upgrade your browser to improve your experience.
Logged in as {{ id }}
+