Revised the code for PEP8.

This commit is contained in:
依瑪貓 2020-07-16 22:25:33 +08:00
parent 5b9ac93ee5
commit 42e444b8c8
3 changed files with 5 additions and 4 deletions

View File

@ -79,7 +79,8 @@ class User(models.Model):
visits = models.PositiveSmallIntegerField(null=True)
visited_at = models.DateTimeField(null=True, db_column="visited")
visited_ip = models.GenericIPAddressField(null=True, db_column="ip")
visited_host = models.CharField(max_length=128, null=True, db_column="host")
visited_host = models.CharField(
max_length=128, null=True, db_column="host")
visited_country = models.ForeignKey(
Country, on_delete=models.PROTECT, null=True,
db_column="ct", to_field="code", related_name="users")

View File

@ -81,8 +81,7 @@ class Period:
_data_start = None
_data_end = None
def __init__(
self, spec = None, data_start = None, data_end = None):
def __init__(self, spec=None, data_start=None, data_end=None):
self._period = self.Parser(spec)
self._data_start = data_start
self._data_end = data_end

View File

@ -466,6 +466,7 @@ class SqlQuery:
"""
sql = ""
params = []
def __init__(self, sql, params):
self.sql = sql
self.params = params