loefsys.members.views module
Views for the member profiles.
- class loefsys.members.views.UserProfileMixin
Bases:
SingleObjectMixinMixin to retrieve the current user.
Overrides the get_object method to return the current user.
- get_object(_queryset=None)
Retrieve the user from the request.
- class loefsys.members.views.ProfileView(**kwargs)
Bases:
LoginRequiredMixin,DetailViewView for displaying a user’s profile by slug.
Fetches the user based on the slug field. (user.slug)
- context_object_name = 'member'
- template_name = 'profiles/profile.html'
- class loefsys.members.views.UserProfileView(**kwargs)
Bases:
UserProfileMixin,ProfileViewView for displaying the profile of the logged-in user.
Overrides the get_object method to return the current user.
- get_context_data(**kwargs)
Add user information to the context.
- class loefsys.members.views.UserProfileEditView(**kwargs)
Bases:
UserProfileMixin,UpdateViewView for updating the profile of the logged-in user.
- context_object_name = 'member'
- template_name = 'profiles/profile_edit.html'