Skip to content

Commit

Permalink
feat: remove unused module and adapy utils to pipenv, #89
Browse files Browse the repository at this point in the history
  • Loading branch information
ddio committed Oct 27, 2021
1 parent 3651c6f commit 7d36465
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 470 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ django = "==2.1.15"
jsonfield = "==2.0.2"
raven = "==6.9.0"
psycopg2-binary = "==2.8.6"
scrapy-tw-rental-house = "==1.1.1"
scrapy-tw-rental-house = "==1.1.2"

[requires]
python_version = "3"
8 changes: 4 additions & 4 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions backend/rental/libs/export/field.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ def to_human(self, val, use_tf=True):
if self.fn:
val = self.fn(val)

if type(val) is datetime:
if isinstance(val, datetime):
val = timezone.localtime(val).strftime('%Y-%m-%d %H:%M:%S %Z')
elif val is '' or val is None:
elif val == '' or val is None:
val = '-'
elif val is True or val == 'true':
elif val == True or val == 'true':
val = 'T' if use_tf else 1
elif val is False or val == 'false':
elif val == False or val == 'false':
val = 'F' if use_tf else 0

return val
Expand All @@ -51,13 +51,13 @@ def to_machine(self, val):
if self.fn:
val = self.fn(val)

if type(val) is datetime:
if isinstance(val, datetime):
pass
elif val is '' or val is None:
elif val == '' or val is None:
val = None
elif val is True or val == 'true':
elif val == True or val == 'true':
val = True
elif val is False or val == 'false':
elif val == False or val == 'false':
val = False

return val
73 changes: 0 additions & 73 deletions crawler/crawler/items.py

This file was deleted.

86 changes: 0 additions & 86 deletions crawler/crawler/spiders/all_591_cities.py

This file was deleted.

Loading

0 comments on commit 7d36465

Please sign in to comment.