Login app working (#47)

Can login and create User object. Also now store user token info in db
(closes #48).
This commit is contained in:
2018-06-29 08:43:03 -04:00
parent 8b1344d453
commit e50d3d8476
15 changed files with 223 additions and 193 deletions

View File

@@ -4,7 +4,7 @@
<head>
<title>User Login</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="{% static 'spotifyvis/css/dark_bg.css' %}">
<link rel="stylesheet" href="{% static 'css/dark_bg.css' %}">
<style type="text/css">
.text-overflow {
overflow: hidden;
@@ -20,12 +20,9 @@
<div class="container">
<div id="login">
<h1>spotify-lib-vis</h1>
<a href="/login" class="btn btn-primary">Scan Library</a>
<a href="{% url "admin_graphs" %}" class="btn btn-primary">Admin Graphs</a>
<a href="{% url 'login:spotify_login' %}" class="btn btn-primary">Login</a>
<a href="{% url 'login:admin_graphs' %}" class="btn btn-primary">Admin Graphs</a>
</div>
</div>
<script src="{% static 'spotifyvis/scripts/index.js' %}"></script>
</body>
</html>

View File

@@ -0,0 +1,22 @@
{% load static %}
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>User Spotify Data</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="{% static 'css/dark_bg.css' %}">
</head>
<body>
<!--[if lt IE 7]>
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<p>Logged in as {{ user_id }}</p>
<a href="" class="btn btn-primary">Scan Library</a>
</body>
</html>