diff options
author | 2019-04-18 20:47:42 +0200 | |
---|---|---|
committer | 2019-04-18 20:47:42 +0200 | |
commit | 3d33a3097a94a1f86f3944c87f06f58c60f77902 (patch) | |
tree | 03c08a5ba4d6ff014842aae96b3ff958b7ce1993 /pydis_site/apps/main/views/home.py | |
parent | Adding the migration and the lockfile (diff) |
Fixing all linting problems introduced by this PR. There's still a TODO left in viewsets, but that's for jchrist to deal with later, so I'm leaving that in.
Diffstat (limited to 'pydis_site/apps/main/views/home.py')
-rw-r--r-- | pydis_site/apps/main/views/home.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pydis_site/apps/main/views/home.py b/pydis_site/apps/main/views/home.py index f3f9d726..e06b3783 100644 --- a/pydis_site/apps/main/views/home.py +++ b/pydis_site/apps/main/views/home.py @@ -1,9 +1,9 @@ import requests - +from django.conf import settings from django.shortcuts import render from django.utils import timezone from django.views import View -from django.conf import settings + from pydis_site.apps.main.models import RepoData GITHUB_API = "https://api.github.com/users/python-discord/repos" @@ -26,10 +26,10 @@ class Home(View): if full_name in settings.HOMEPAGE_REPOS: repo_dict[full_name] = { - "full_name": repo["full_name"], - "description": repo["description"], - "language": repo["language"], - "forks_count": repo["forks_count"], + "full_name": repo["full_name"], + "description": repo["description"], + "language": repo["language"], + "forks_count": repo["forks_count"], "stargazers_count": repo["stargazers_count"], } print(f"repo_dict after processing = {repo_dict}") @@ -84,7 +84,7 @@ class Home(View): repo_data_container = [] # Create all the repodata records in the database. - for repo_name, api_data in api_data_container.items(): + for api_data in api_data_container.values(): repo_data = RepoData( repo_name=api_data["full_name"], description=api_data["description"], |