Skip to content

Commit

Permalink
enable type species in voucher table
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosp420 committed Jan 15, 2018
1 parent 1f042b9 commit 5545b62
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
6 changes: 5 additions & 1 deletion voseq/create_dataset/views.py
@@ -1,3 +1,4 @@
import logging
import os
import re

Expand All @@ -12,6 +13,9 @@
from .utils import CreateDataset


log = logging.getLogger(__name__)


@login_required
def index(request):
form = CreateDatasetForm()
Expand Down Expand Up @@ -65,7 +69,7 @@ def results(request):
},
)
else:
print("invalid form")
log.debug("invalid form")
return render(request, 'create_dataset/index.html',
{
'username': username,
Expand Down
6 changes: 5 additions & 1 deletion voseq/gene_table/views.py
@@ -1,5 +1,6 @@
import copy
import csv
import logging
import os
import uuid

Expand All @@ -16,6 +17,9 @@
from public_interface.models import Genes


log = logging.getLogger(__name__)


def index(request):
version, stats = get_version_stats()
username = get_username(request)
Expand Down Expand Up @@ -129,7 +133,7 @@ def get_stats_from_datasets(self):
try:
os.remove(in_file)
except OSError as e:
print("There is no partition file to remove: {0}".format(e))
log.error("There is no partition file to remove: {0}".format(e))
return stats

def make_guid(self):
Expand Down
5 changes: 3 additions & 2 deletions voseq/voucher_table/forms.py
Expand Up @@ -19,11 +19,12 @@ class VoucherTableForm(BaseDatasetForm):
('subspecies', 'Subspecies'),
('author', 'Author'),
('hostorg', 'Host org.'),
('type_species', 'Type species'),
],
widget=forms.CheckboxSelectMultiple(),
initial=['code', 'genus', 'species'],
required=False,
help_text='If taxon_names is None, use standart code_genus_species',
help_text='If taxon_names is None, use standard code_genus_species',
)
collector_info = forms.MultipleChoiceField(
label='Locality and collector info:',
Expand Down Expand Up @@ -51,7 +52,7 @@ class VoucherTableForm(BaseDatasetForm):
required=False,
)
field_delimitor = forms.ChoiceField(
label='Choose your field delimitor:',
label='Choose your field delimiter:',
choices=[
('COMMA', 'comma'),
('TAB', 'tab'),
Expand Down

0 comments on commit 5545b62

Please sign in to comment.