wins/my-wins/|views.my_wins|wins:my_wins| User's wins history | |/wins/community/|views.community_wins|wins:community_wins| Community wins feed | |/wins/toggle-public/int:win_id/|views.toggle_public|wins:toggle_public| Toggle win visibility | |/wins/celebrate/int:win_id/|views.toggle_celebration|wins:toggle_celebration` | Celebrate/uncelebrate win |
https://boost-dev.herokuapp.com/wins/submit/https://boost-dev.herokuapp.com/wins/my-wins/https://boost-dev.herokuapp.com/wins/community/https://boost-dev.herokuapp.com/wins/celebrate/42/
| URL Pattern | Provider | Description |
|---|---|---|
/accounts/login/github/ |
GitHub | GitHub OAuth login |
/accounts/login/google-oauth2/ |
Google OAuth login | |
/accounts/login/facebook/ |
Facebook OAuth login | |
/accounts/login/linkedin-oauth2/ |
LinkedIn OAuth login | |
/accounts/complete/github/ |
GitHub | GitHub OAuth callback |
/accounts/complete/google-oauth2/ |
Google OAuth callback | |
/accounts/complete/facebook/ |
Facebook OAuth callback | |
/accounts/complete/linkedin-oauth2/ |
LinkedIn OAuth callback |
| URL Pattern | View Function | URL Name | Description |
|---|---|---|---|
/login/ |
user_views.login_view |
login |
Standard login form |
/register/ |
user_views.register_view |
register |
User registration form |
/logout/ |
user_views.logout_view |
logout |
User logout |
https://boost-dev.herokuapp.com/login/https://boost-dev.herokuapp.com/register/https://boost-dev.herokuapp.com/accounts/login/github/
| URL Pattern | Description |
|---|---|
/admin/ |
Django admin interface |
/grappelli/ |
Enhanced admin interface (Grappelli) |
/admin/auth/user/- User management/admin/challenges/challenge/- Challenge management/admin/challenges/challengesolution/- Solution management/admin/users/userprofile/- User profile management/admin/users/userprogress/- User progress management/admin/users/achievement/- Achievement management/admin/wins/dailywin/- Daily wins management
The application follows RESTful URL patterns:
GET /challenges/- List challengesPOST /challenges/new/- Create challengeGET /wins/my-wins/- List user's winsPOST /wins/submit/- Create new win
GET /challenges/{id}/- View specific challengePOST /challenges/{id}/submit/- Submit solution to challengeGET /wins/view/{id}/- View specific winPOST /wins/celebrate/{id}/- Toggle celebration on win
POST /challenges/generate/- Generate AI challengePOST /wins/toggle-public/{id}/- Toggle win visibility
GET /challenges/ # List challenges with filters
GET /challenges/new/ # Show create form
POST /challenges/new/ # Create new challenge
GET /challenges/{id}/ # Show challenge detail
POST /challenges/{id}/submit/ # Submit solution
POST /challenges/generate/ # Generate AI challengeGET /wins/submit/ # Show win submission form
POST /wins/submit/ # Submit new win
GET /wins/my-wins/ # List user's wins
GET /wins/community/ # List public wins
POST /wins/celebrate/{id}/ # Toggle celebration
POST /wins/toggle-public/{id}/ # Toggle visibilityGET /dashboard/ # Main dashboard
GET /dashboard/community/ # Community hub
GET /dashboard/tech_news/ # Tech news feedGET /challenges/?difficulty=beginner&q=python&page=2
Parameters:
- difficulty: Filter by difficulty level
- Values: beginner, intermediate, hard
- q: Search query for title/description
- page: Pagination page number (default: 1)
GET /challenges/15/
POST /challenges/15/submit/
URL Parameters:
- pk (int): Challenge primary key/ID
POST /wins/celebrate/42/
POST /wins/toggle-public/42/
URL Parameters:
- win_id (int): Daily win primary key/ID
<!-- Dashboard links -->
<a href="{% url 'dashboard:dashboard' %}">Dashboard</a>
<a href="{% url 'dashboard:community' %}">Community</a>
<a href="{% url 'dashboard:tech_news' %}">Tech News</a>
<!-- Challenge links -->
<a href="{% url 'challenges' %}">All Challenges</a>
<a href="{% url 'new_challenge' %}">Create Challenge</a>
<a href="{% url 'challenge_detail' pk=challenge.id %}">View Challenge</a>
<!-- Wins links -->
<a href="{% url 'wins:submit_win' %}">Submit Win</a>
<a href="{% url 'wins:my_wins' %}">My Wins</a>
<a href="{% url 'wins:community_wins' %}">Community Wins</a>
<!-- Authentication links -->
<a href="{% url 'login' %}">Login</a>
<a href="{% url 'register' %}">Register</a>from django.shortcuts import redirect
from django.urls import reverse
# Redirect examples
return redirect('dashboard:dashboard')
return redirect('challenge_detail', pk=challenge.id)
return redirect('wins:my_wins')
# URL generation examples
challenge_url = reverse('challenge_detail', kwargs={'pk': 15})
submit_url = reverse('submit_solution', kwargs={'pk': 15})GET /challenges/
Content-Type: text/html
Returns: Rendered HTML template with challenge listPOST /challenges/new/
Content-Type: application/x-www-form-urlencoded
Data: title=Challenge+Title&description=Description&difficulty=beginner
Response: Redirect to challenge detail or form with errorsPOST /wins/celebrate/42/
Content-Type: application/json
Accept: application/json
Response: {"status": "success", "celebrated": true, "count": 5}200 OK- Successful GET requests302 Found- Successful POST with redirect201 Created- Resource created (future API)
400 Bad Request- Form validation errors401 Unauthorized- Authentication required403 Forbidden- Permission denied404 Not Found- Resource doesn't exist
500 Internal Server Error- Application errors503 Service Unavailable- External service failures
All POST requests require CSRF tokens:
<form method="post">
{% csrf_token %}
<!-- form fields -->
</form>Protected URLs require login:
@login_required
def protected_view(request):
# View codeSome URLs have additional permission requirements:
def challenge_detail(request, pk):
challenge = get_object_or_404(Challenge, pk=pk, is_approved=True)# Test challenge list
curl -H "Accept: text/html" https://boost-dev.herokuapp.com/challenges/
# Test challenge detail
curl -H "Accept: text/html" https://boost-dev.herokuapp.com/challenges/1/
# Test authentication required
curl -H "Accept: text/html" https://boost-dev.herokuapp.com/dashboard/from django.test import TestCase
from django.urls import reverse
class URLTestCase(TestCase):
def test_challenge_urls(self):
# Test challenge list
url = reverse('challenges')
response = self.client.get(url)
self.assertEqual(response.status_code, 200)
# Test challenge detail
url = reverse('challenge_detail', kwargs={'pk': 1})
response = self.client.get(url)
# Assert responsehttp://127.0.0.1:8000/challenges/
http://localhost:8000/dashboard/
https://boost-dev-9ed56bf6f182.herokuapp.com/challenges/
https://your-custom-domain.com/dashboard/
# settings.py
ALLOWED_HOSTS = ['localhost', '127.0.0.1']
if not DEBUG:
ALLOWED_HOSTS += ['.herokuapp.com', 'your-domain.com']# Future API patterns
urlpatterns = [
path('api/v1/', include('api.v1.urls')),
path('api/v2/', include('api.v2.urls')),
]# Redirect old URLs to new ones
urlpatterns = [
path('old-challenges/', RedirectView.as_view(url='/challenges/', permanent=True)),
]This comprehensive URL reference provides complete coverage of all routes, patterns, and API endpoints in the Boost.dev application, serving as a quick reference for developers working with the application's URL structure.