Implement team join request functionality with views and actions
- Added join_requests.html template for displaying pending join requests. - Created join_team.html template for users to submit join requests. - Implemented request_processed.html template to show the result of join request processing. - Developed authentication utilities for user session management. - Introduced convenience redirects for common URL patterns. - Established team management routes and actions for creating, editing, and joining teams. - Added functionality for approving and denying join requests with email notifications. - Enhanced team views to include user permissions and team member details. - Implemented utility functions for team-related operations such as calculating total points and team rank.
This commit is contained in:
+8
-1
@@ -11,7 +11,10 @@ from typing import Dict, Any, List, Type, Optional
|
||||
import inspect as py_inspect
|
||||
|
||||
from ..db import SessionLocal, Base
|
||||
from ..models import User, Team, TeamMembership, QRCode, QRSet, TeamAchievement, Event
|
||||
from ..models import (
|
||||
User, Team, TeamMembership, QRCode, QRSet, TeamAchievement, Event,
|
||||
OAuthAccount, TeamJoinRequest, EventAttendee, UserPoints
|
||||
)
|
||||
from ..templates_config import templates
|
||||
|
||||
router = APIRouter()
|
||||
@@ -25,6 +28,10 @@ MODELS = {
|
||||
'qr_set': (QRSet, "QR Sets"),
|
||||
'team_achievement': (TeamAchievement, "Team Achievements"),
|
||||
'event': (Event, "Events"),
|
||||
'oauth_account': (OAuthAccount, "OAuth Accounts"),
|
||||
'team_join_request': (TeamJoinRequest, "Team Join Requests"),
|
||||
'event_attendee': (EventAttendee, "Event Attendees"),
|
||||
'user_points': (UserPoints, "User Points"),
|
||||
}
|
||||
|
||||
def get_db():
|
||||
|
||||
Reference in New Issue
Block a user