mirror of
https://github.com/boostorg/website-v2.git
synced 2026-02-27 05:32:08 +00:00
🚧 hooks up libraries to profile
* Breaks library markup into a template * Adds authored and maintained context objects * Adds loops to include template for authored and maintained
This commit is contained in:
@@ -51,3 +51,10 @@ class ProfileViewSet(DetailView):
|
||||
queryset = User.objects.all()
|
||||
template_name = "users/profile.html"
|
||||
context_object_name = "user"
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
user = self.get_object()
|
||||
context["authored"] = user.authors.all()
|
||||
context["maintained"] = user.maintainers.all()
|
||||
return context
|
||||
|
||||
Reference in New Issue
Block a user