optimized project_views.py