summaryrefslogtreecommitdiff
path: root/app/birds/aba_importer.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2014-05-23 11:28:10 -0400
committerluxagraf <sng@luxagraf.net>2014-05-23 11:28:10 -0400
commit518b2d618bc10f93cfa44a83715593b8358eb9ce (patch)
treea07993c3ae31bed42f32c0e00788989568790716 /app/birds/aba_importer.py
parent4bae11bb25a8e3c43118891d17fd8e981ecf8dc6 (diff)
minor refactor to adoipt pep8 and pyflakes coding styles and clean up
some cruft that's been hangin round for years
Diffstat (limited to 'app/birds/aba_importer.py')
-rw-r--r--app/birds/aba_importer.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/app/birds/aba_importer.py b/app/birds/aba_importer.py
index e5df528..93f5bef 100644
--- a/app/birds/aba_importer.py
+++ b/app/birds/aba_importer.py
@@ -1,17 +1,16 @@
for row_index in range(sheet.nrows):
- if sheet.cell(row_index,0).value != '':
+ if sheet.cell(row_index, 0).value != '':
sci = sheet.cell(row_index, 0).value.split("(")[1].split(")")[0]
bc = BirdClass.objects.get(scientific_name__exact=sci)
common_name = sheet.cell(row_index, 1).value
sci_name = sheet.cell(row_index, 2).value
code = int(sheet.cell(row_index, 3).value)
bclass = bc
- #create bird here
+ # create bird here
b, created = Bird.objects.get_or_create(
- common_name = common_name,
- scientific_name = sci_name,
- code = code,
- bird_class = bc
+ common_name=common_name,
+ scientific_name=sci_name,
+ code=code,
+ bird_class=bc
)
print(b)
-