Refactor user authentication and dashboard features
- Added `is_admin` field to User model for role management. - Updated user context middleware to include current user in templates. - Enhanced session management with improved debug middleware. - Refactored dashboard view to fetch user-specific data and recent events. - Improved login and registration templates for better user experience. - Added admin routes with access control for admin users. - Updated Docker configuration for better error logging and dependency management. - Updated requirements to include new dependencies and specify versions.
This commit is contained in:
+17
-13
@@ -1,14 +1,18 @@
|
||||
fastapi
|
||||
uvicorn[standard]
|
||||
SQLAlchemy
|
||||
mysqlclient
|
||||
Jinja2
|
||||
python-multipart
|
||||
passlib[bcrypt]
|
||||
qrcode
|
||||
email-validator
|
||||
pillow
|
||||
python-jose[cryptography]
|
||||
itsdangerous
|
||||
fastapi>=0.95.0
|
||||
uvicorn[standard]>=0.21.1
|
||||
sqlalchemy>=2.0.9
|
||||
pymysql>=1.0.3
|
||||
cryptography>=40.0.2
|
||||
python-multipart>=0.0.6
|
||||
authlib>=1.2.0
|
||||
# Specify specific versions for passlib and bcrypt to avoid compatibility issues
|
||||
passlib==1.7.4
|
||||
bcrypt==4.0.1
|
||||
flask-session==0.5.0
|
||||
starlette>=0.27.0
|
||||
jinja2>=3.1.2
|
||||
itsdangerous>=2.1.2
|
||||
python-jose[cryptography]>=3.3.0
|
||||
python-dotenv>=1.0.0
|
||||
qrcode
|
||||
pydantic[email]>=1.10.7
|
||||
httpx
|
||||
Reference in New Issue
Block a user