Skip to content

Commit 93be26d

Browse files
dumax315github-actions[bot]
authored andcommitted
Auto code format
1 parent 9d033c9 commit 93be26d

10 files changed

Lines changed: 10 additions & 32 deletions

File tree

UserAuth/util.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
from .models import User, SpotifyToken
2-
from django.utils import timezone
31
import datetime
4-
from requests import post, get
52
import os
6-
from dotenv import load_dotenv
73
from functools import cache
84

95
from django.utils import timezone

UserAuth/views.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
import secrets
2-
3-
from django.http import HttpResponseBadRequest
4-
from django.shortcuts import render, redirect
5-
from requests import Request, post, exceptions
6-
from .util import update_or_create_user_tokens, get_top_song_album_covers
7-
from .models import SpotifyToken
81
import os
92
import secrets
103

114
import requests
125
from django.contrib import messages
136
from django.contrib.auth import authenticate, get_user_model, login, logout
147
from django.contrib.auth.decorators import login_required
8+
from django.http import HttpResponseBadRequest
159
from django.shortcuts import get_object_or_404, redirect, render
1610
from dotenv import load_dotenv
1711
from requests import Request, exceptions, post
@@ -64,10 +58,7 @@ def authWithSpotify(request):
6458
"redirect_uri": REDIRECT_URI,
6559
"client_id": CLIENT_ID,
6660
},
67-
)
68-
.prepare()
69-
.url
70-
)
61+
) .prepare() .url)
7162

7263
return redirect(url)
7364

@@ -262,5 +253,3 @@ def getSpotifyUserData(access_token):
262253
raise Exception(
263254
f"Failed to retrieve user info. Status code: {response.status_code}"
264255
)
265-
266-

Wrapped/urls.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
from UserAuth.views import delete_account
55

66
from .views import (create_wrap, like_wrap, make_wraps_public,
7-
view_public_wraps, view_wrap,
8-
view_wraps)
7+
view_public_wraps, view_wrap, view_wraps)
98

109
urlpatterns = [
1110
path("view_wraps/", view_wraps, name="view_wraps"),

Wrapped/views.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
from datetime import datetime
44

55
import requests
6-
from django.http import JsonResponse, HttpResponseServerError
7-
from django.shortcuts import render, redirect, get_object_or_404
86
from django.contrib.auth.decorators import login_required
97
from django.contrib.auth.models import AnonymousUser
10-
from django.http import HttpResponseNotFound, JsonResponse
8+
from django.http import (HttpResponseNotFound, HttpResponseServerError,
9+
JsonResponse)
1110
from django.shortcuts import get_object_or_404, redirect, render
1211

1312
from UserAuth.models import SpotifyToken
@@ -125,7 +124,7 @@ def like_wrap(request, wrap_id):
125124
message = "Liked"
126125
wrap.save()
127126

128-
return JsonResponse({'message': message})
127+
return JsonResponse({"message": message})
129128

130129

131130
key_map = {

templates/UserAuth/contactus.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ <h2>Contact Us</h2>
5757
{% endif %}
5858
</div>
5959
</div>
60-
{% endblock %}
60+
{% endblock %}

templates/UserAuth/index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ <h1 class="promo-title">Unwrap at any time.</h1>
1818
</div>
1919
</div>
2020
{% include "UserAuth/albumScrollDisplay.html" with album_covers=album_covers direction="left" classNames="index-page-albums-mobile" %}
21-
2221
<div id="meet-the-team">
2322
<h2 class="team-title">Meet the Team</h2>
2423
<div class="team-container">
@@ -72,7 +71,6 @@ <h3 class="team-name">Aneesh Kanaram</h3>
7271
Hi, I'm Aneesh! I helped design our site's ability to post your wrap and see what others have done!
7372
</p>
7473
</div>
75-
7674
</div>
7775
<div class="promo-content">
7876
<a href="{% url 'contact' %}" class="promo-button">FAQ / Contact Us</a>

templates/UserAuth/login.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ <h3>Sign in</h3>
2828
Connect with Spotify
2929
</a>
3030
</div>
31-
{% endblock %}
31+
{% endblock %}

templates/Wrapped/choose_time_range.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ <h1 id="name">Generate your Wrapped</h1>
2929
</div>
3030
</div>
3131
</form>
32-
{% endblock %}
32+
{% endblock %}

templates/Wrapped/view_public_wraps.html

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
<h1>Public Wraps</h1>
55
<button id="filter-button">Show Liked Wraps</button>
66
{{ wraps }}
7-
{% for wrap in wraps %}
8-
{{ wrap }}
9-
{% endfor %}
7+
{% for wrap in wraps %}{{ wrap }}{% endfor %}
108
<ul id="wraps-list">
119
{% for wrap in wraps %}
1210
<li>

templates/Wrapped/view_wrap.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{% block head %}
44
<link rel="stylesheet" href="{% static 'Wrapped/view_wrap.css' %}">
55
{% endblock %}
6-
76
{% block body %}
87
<h1 class="view-wrap-title">{{ wrap_title }}</h1>
98
<div id="outer-wrap-container">

0 commit comments

Comments
 (0)