putting resident_id back into detail views.py