Skip to content

Commit 46da8c6

Browse files
Tony QiuTony Qiu
authored andcommitted
format
1 parent 1c94d7e commit 46da8c6

File tree

6 files changed

+11
-15
lines changed

6 files changed

+11
-15
lines changed

backend/apps/clubs/views.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from rest_framework.decorators import api_view, permission_classes
1010
from rest_framework.permissions import AllowAny
1111
from rest_framework.response import Response
12-
from ratelimit.decorators import ratelimit
1312

1413
from .models import Clubs
1514

backend/apps/core/views.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,13 @@ def home(_request):
6464
"Test vector similarity search"
6565
),
6666
"POST /api/auth/signup/": "Register a new user account with email (sends confirmation email)",
67-
"POST /api/auth/signup/": "Register a new user account with email (sends confirmation email)",
6867
"POST /api/auth/login/": "Login with email and password (creates session)",
6968
"GET /api/auth/me/": "Get current user info (requires login)",
7069
"POST /api/auth/logout/": "Logout (destroys session)",
7170
"GET /api/auth/confirm/<token>/": "Confirm email address with token",
7271
"POST /api/auth/resend-confirmation/": "Resend confirmation email",
7372
"POST /api/auth/forgot-password/": "Request password reset email",
7473
"POST /api/auth/reset-password/<token>/": "Reset password with token",
75-
"GET /api/auth/confirm/<token>/": "Confirm email address with token",
76-
"POST /api/auth/resend-confirmation/": "Resend confirmation email",
77-
"POST /api/auth/forgot-password/": "Request password reset email",
78-
"POST /api/auth/reset-password/<token>/": "Reset password with token",
7974
},
8075
"auth": {
8176
"info": "Uses session-based authentication. Login to access protected endpoints.",

backend/apps/newsletter/views.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
from django.utils import timezone
66
from rest_framework import status
77
from rest_framework.decorators import api_view, permission_classes
8-
from rest_framework.permissions import AllowAny, IsAuthenticated
8+
from rest_framework.permissions import AllowAny
99
from rest_framework.response import Response
10-
from utils.encryption_utils import email_encryption
1110

1211
from .models import NewsletterSubscriber
1312

backend/scraping/generate_static_data.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import os
22
import sys
3-
from dateutil import parser as date_parser
4-
from datetime import datetime, timezone, date, time
3+
from datetime import date, datetime, time, timezone
54
from pathlib import Path
65

76
from dotenv import load_dotenv

backend/scripts/populate-local-db-with-prod-data.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,22 +172,24 @@ def sync_data():
172172
# Build INSERT statement
173173
placeholders = ", ".join(["%s"] * len(columns))
174174
column_names = ", ".join(columns)
175-
175+
176176
# Convert data types properly for PostgreSQL
177177
values = []
178178
for col in columns:
179179
value = record_data[col]
180-
180+
181181
# Handle different data types
182182
if value is None:
183183
values.append(None)
184184
elif isinstance(value, dict):
185185
# Convert dict to JSON string for JSONB columns
186186
import json
187+
187188
values.append(json.dumps(value))
188189
elif isinstance(value, list):
189190
# Convert list to JSON string for JSONB columns
190191
import json
192+
191193
values.append(json.dumps(value))
192194
else:
193195
values.append(value)
@@ -204,10 +206,12 @@ def sync_data():
204206
else:
205207
# For other errors, show more detail
206208
print(f" ⚠️ Skipping record: {e}")
207-
209+
208210
# Commit after each model to prevent transaction abort cascades
209211
local_conn.commit()
210-
print(f" ✅ Successfully imported {successful_inserts}/{len(data)} {model_name.lower()}")
212+
print(
213+
f" ✅ Successfully imported {successful_inserts}/{len(data)} {model_name.lower()}"
214+
)
211215

212216
except Exception as e:
213217
print(f" ⚠️ Could not import {model_name}: {e}")

backend/utils/encryption_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
from cryptography.fernet import Fernet
1313
from dotenv import load_dotenv
14-
from django.conf import settings
1514

1615
load_dotenv()
1716

@@ -21,6 +20,7 @@
2120

2221
class EmailEncryption:
2322
"""Handles encryption and decryption of email addresses and user data."""
23+
2424
"""Handles encryption and decryption of email addresses and user data."""
2525

2626
def __init__(self):

0 commit comments

Comments
 (0)