Skip to content

Commit

Permalink
Merge pull request #418 from AleksandrKosmylev/structure_views
Browse files Browse the repository at this point in the history
Ordered templates
  • Loading branch information
fey authored Jun 4, 2024
2 parents f55b2ac + 1fe6100 commit dacf9a7
Show file tree
Hide file tree
Showing 33 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion contributors/views/achievements.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class AchievementListView(generic.ListView):
"""Achievement list."""

template_name = 'achievements_list.html'
template_name = 'contributor/achievements_list.html'
model = Contributor
contributors = Contributor.objects.with_contributions()

Expand Down
2 changes: 1 addition & 1 deletion contributors/views/contributor.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class DetailView(
"""Contributor's details."""

model = Contributor
template_name = 'contributor_details.html'
template_name = 'contributor/contributor_details.html'
slug_field = 'login'

def get_context_data(self, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/contributor_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class CompareWithYourselfView(ListView):
"""View of comparing current user with another one."""

model = Contribution
template_name = 'contributor_compare_with_yourself.html'
template_name = 'contributors_sections/contributors/contributor_compare_with_yourself.html' # noqa: E501
slug_field = 'contributor'

def get_queryset(self):
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/contributor_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class ListView(TableSortSearchAndPaginationMixin, generic.ListView):
"""A list of issues of a contributor."""

template_name = 'contributor_issues.html'
template_name = 'contributor/contributor_issues.html'
sortable_fields = (
'info__title',
'repository__full_name',
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/contributor_prs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class ListView(TableSortSearchAndPaginationMixin, generic.ListView):
"""A list of pull requests of a contributor."""

template_name = 'contributor_prs.html'
template_name = 'contributor/contributor_prs.html'
sortable_fields = (
'info__title',
'repository__full_name',
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/contributors.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class ListView(TableSortSearchAndPaginationMixin, generic.ListView):
"""A list of contributors with contributions."""

queryset = Contributor.objects.visible().with_contributions()
template_name = 'contributors_list.html'
template_name = 'contributors_sections/contributors/contributors_list.html'
sortable_fields = (
'login',
'name',
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/contributors_for_period.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class ListView(contributors.ListView):
"""A list of contributors with monthly contributions."""

template_name = 'contributors_for_period.html'
template_name = 'contributors_sections/contributors/contributors_for_period.html' # noqa: E501
context_object_name = 'contributors_list'

def get_context_data(self, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ListView(
):
"""A list of issues."""

template_name = 'open_issues.html'
template_name = 'contributors_sections/issues/open_issues.html'
filterset_class = IssuesFilter
sortable_fields = ( # noqa: WPS317
'info__title',
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/leaderboard_commits.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ListView(
"""List of leaders among contributors by commits."""

queryset = Contributor.objects.visible().with_contributions()
template_name = 'leaderboard_commits.html'
template_name = 'contributors_sections/leaderboard/leaderboard_commits.html' # noqa: E501
sortable_fields = (
'-commits',
)
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/leaderboard_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ListView(
"""List of leaders among contributors by issues."""

queryset = Contributor.objects.visible().with_contributions()
template_name = 'leaderboard_issues.html'
template_name = 'contributors_sections/leaderboard/leaderboard_issues.html'
sortable_fields = (
'-issues',
)
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/leaderboard_prs.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class ListView(
"""List of leaders among contributors by pull requests."""

queryset = Contributor.objects.visible().with_contributions()
template_name = 'leaderboard_prs.html'
template_name = 'contributors_sections/leaderboard/leaderboard_prs.html'
sortable_fields = (
'-pull_requests',
)
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/organization.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
class OrgRepositoryList(repositories.ListView):
"""An organization's details."""

template_name = 'organization_details.html'
template_name = 'contributors_sections/organizations/organization_details.html' # noqa: E501
sortable_fields = ( # noqa: WPS317
'name',
'project',
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/organizations.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ListView(TableSortSearchAndPaginationMixin, generic.ListView):
queryset = Organization.objects.filter(
repository__is_visible=True,
).distinct().annotate(repository_count=Count('repository'))
template_name = 'organizations_list.html'
template_name = 'contributors_sections/organizations/organizations_list.html' # noqa: E501
sortable_fields = (
'name',
('repository_count', _("Repositories")),
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/pull_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ListView(TableSortSearchAndPaginationMixin, generic.ListView):
)
ordering = sortable_fields[0]

template_name = 'pull_requests_list.html'
template_name = 'contributors_sections/pull_requests/pull_requests_list.html' # noqa: E501

def get_queryset(self): # noqa: WPS615
"""Get pull requests.
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/repositories.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ListView(
),
)
)
template_name = 'repositories_list.html'
template_name = 'contributors_sections/repositories/repositories_list.html'
sortable_fields = ( # noqa: WPS317
'name',
'organization',
Expand Down
2 changes: 1 addition & 1 deletion contributors/views/repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class RepoContributorList(contributors.ListView):
"""A repository's details."""

template_name = 'repository_details.html'
template_name = 'contributors_sections/repositories/repository_details.html' # noqa: E501

def get_queryset(self): # noqa: WPS615
"""Get a dataset."""
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit dacf9a7

Please sign in to comment.