diff options
author | 2019-04-18 20:47:42 +0200 | |
---|---|---|
committer | 2019-04-18 20:47:42 +0200 | |
commit | 3d33a3097a94a1f86f3944c87f06f58c60f77902 (patch) | |
tree | 03c08a5ba4d6ff014842aae96b3ff958b7ce1993 | |
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.
-rw-r--r-- | pydis_site/apps/api/models/bot/message.py | 2 | ||||
-rw-r--r-- | pydis_site/apps/main/views/home.py | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/pydis_site/apps/api/models/bot/message.py b/pydis_site/apps/api/models/bot/message.py index 22500be0..2578d5c6 100644 --- a/pydis_site/apps/api/models/bot/message.py +++ b/pydis_site/apps/api/models/bot/message.py @@ -2,9 +2,9 @@ from django.contrib.postgres import fields as pgfields from django.core.validators import MinValueValidator from django.db import models -from pydis_site.apps.api.models.utils import ModelReprMixin from pydis_site.apps.api.models.bot.tag import validate_tag_embed from pydis_site.apps.api.models.bot.user import User +from pydis_site.apps.api.models.utils import ModelReprMixin class Message(ModelReprMixin, models.Model): 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"], |