# Path: phylocommons/get_treestore.py
# def get_treestore():
#     return Treestore(**settings.TREESTORE_KWARGS)
# 
# def tree_id_from_uri(uri):
#     return Treestore.id_from_uri(uri, base_uri=settings.TREE_URI)
# 
# def uri_from_tree_id(tree_id):
#     return Treestore.uri_from_id(tree_id, base_uri=settings.TREE_URI)


from django import forms
from phylocommons.get_treestore import get_treestore, tree_id_from_uri, uri_from_tree_id
from phylocommons import settings
import Bio.Phylo as bp


class QueryForm(forms.Form):
    with get_treestore() as treestore:
        taxa = forms.CharField(required=True,
                               widget=forms.Textarea)

# Path: phylocommons/get_treestore.py
# def get_treestore():
#     return Treestore(**settings.TREESTORE_KWARGS)
# 
# def tree_id_from_uri(uri):
#     return Treestore.id_from_uri(uri, base_uri=settings.TREE_URI)
# 
# def uri_from_tree_id(tree_id):
#     return Treestore.uri_from_id(tree_id, base_uri=settings.TREE_URI)


# Path: treequery/forms.py
from django import forms
from phylocommons.get_treestore import get_treestore, tree_id_from_uri, uri_from_tree_id
from phylocommons import settings
import Bio.Phylo as bp



class QueryForm(forms.Form):
    with get_treestore() as treestore:
        taxa = forms.CharField(required=True,
                               widget=forms.Textarea)

        taxa.widget.attrs['class'] = 'stretch'