Skip to content

Commit 5933041

Browse files
committed
Merge branch 'main' of https://github.com/ericahan22/Wat2Do
2 parents 947fd17 + d3fea51 commit 5933041

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+1762
-325
lines changed

.github/workflows/update-events-data.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ jobs:
124124
run: |
125125
git config --global user.name 'github-actions[bot]'
126126
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
127-
git add frontend/src/data/staticData.ts
127+
git add frontend/src/data/staticData.ts frontend/public/rss.xml
128128
git commit -m "chore: update static data from DB" || echo "No changes to commit"
129129
git pull --rebase && git push
130130

README.md

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -25,39 +25,15 @@ Waterloo, scraped directly from Instagram.
2525
- **Club directory:** Explore all clubs with links to their website/Instagram
2626
- **Email newsletter:** Subscribe to get the latest events in your inbox, once daily
2727

28-
**How It Works:**
29-
Events are automatically collected from club Instagram posts, using the OpenAI API to extract details from captions and images. Data is refreshed daily.
30-
31-
## 🛠️ Project Structure
32-
33-
```
34-
.
35-
├── backend/
36-
│ ├── manage.py
37-
│ ├── requirements.txt
38-
│ ├── apps/ # Django apps (events, clubs, newsletter, etc.)
39-
│ ├── scraping/ # Instagram scraping scripts
40-
│ └── config/ # Settings and URLs
41-
├── frontend/
42-
│ ├── src/
43-
│ │ ├── app/
44-
│ │ │ └── App.tsx
45-
│ │ ├── features/
46-
│ │ └── shared/
47-
│ │ ├── components/
48-
│ │ └── hooks/
49-
│ ├── package.json
50-
│ └── public/
51-
```
52-
5328
### Environment Setup
5429

5530
#### Database
5631
```bash
5732
docker compose up --build
5833
```
5934

60-
#### Backend (expose PRODUCTION=1 in /backend/.env for supabase db, else defaults to local postgres db)
35+
#### Backend
36+
# (expose PRODUCTION=1 in /backend/.env for supabase db, else defaults to local postgres db)
6137
```bash
6238
cd backend
6339
python -m venv .venv

backend/apps/clubs/views.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44

55
import json
66
from rest_framework import status
7-
from rest_framework.decorators import api_view, permission_classes, throttle_classes
7+
from rest_framework.decorators import api_view, permission_classes
88
from rest_framework.permissions import AllowAny
99
from rest_framework.response import Response
10-
from rest_framework.throttling import AnonRateThrottle
10+
from ratelimit.decorators import ratelimit
1111

1212
from .models import Clubs
1313

1414

1515
@api_view(["GET"])
1616
@permission_classes([AllowAny])
17-
@throttle_classes([AnonRateThrottle])
17+
@ratelimit(key='ip', rate='60/hr', block=True)
1818
def get_clubs(request):
1919
"""Get all clubs from database (no pagination)"""
2020
try:

backend/apps/core/urls.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,13 @@
88

99
urlpatterns = [
1010
path("", views.home, name="home"),
11-
path("auth/signup/", views.signup_view, name="signup"),
12-
path("auth/login/", views.login_email_view, name="login"),
13-
path("auth/me/", views.me_view, name="me"),
14-
path("auth/logout/", views.logout_view, name="logout"),
11+
path("auth/signup/", views.signup, name="signup"),
12+
path("auth/login/", views.login_email, name="login"),
13+
path("auth/me/", views.user_info, name="me"),
14+
path("auth/logout/", views.logout, name="logout"),
15+
path("auth/confirm/<str:token>/", views.confirm_email, name="confirm_email"),
16+
path("auth/resend-confirmation/", views.resend_confirmation, name="resend_confirmation"),
17+
path("auth/forgot-password/", views.forgot_password, name="forgot_password"),
18+
path("auth/reset-password/<str:token>/", views.reset_password, name="reset_password"),
19+
path("protected/", views.protected_view, name="protected"),
1520
]

0 commit comments

Comments
 (0)