gemtract

gemtract.forms

class gemtract.forms.ExportForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, field_order=None, use_required_attribute=None, renderer=None)[source]

Bases: django.forms.forms.Form

Form to export the gemtracted network

base_fields = {'discard_fake_enzymes': <django.forms.fields.BooleanField object>, 'network_format': <django.forms.fields.ChoiceField object>, 'network_type': <django.forms.fields.ChoiceField object>, 'remove_ghost_species': <django.forms.fields.BooleanField object>, 'remove_reaction_enzymes_removed': <django.forms.fields.BooleanField object>, 'remove_reaction_missing_species': <django.forms.fields.BooleanField object>, 'removing_enzyme_removes_complex': <django.forms.fields.BooleanField object>}
clean()[source]

Hook for doing any extra form-wide cleaning after Field.clean() has been called on every field. Any ValidationError raised by this method will not be associated with a particular field; it will have a special-case association with the field named ‘__all__’.

declared_fields = {'discard_fake_enzymes': <django.forms.fields.BooleanField object>, 'network_format': <django.forms.fields.ChoiceField object>, 'network_type': <django.forms.fields.ChoiceField object>, 'remove_ghost_species': <django.forms.fields.BooleanField object>, 'remove_reaction_enzymes_removed': <django.forms.fields.BooleanField object>, 'remove_reaction_missing_species': <django.forms.fields.BooleanField object>, 'removing_enzyme_removes_complex': <django.forms.fields.BooleanField object>}
media

gemtract.views

gemtract.views.__prepare_context(request)[source]

prepare the context dictionary

to always send default information to the browser

Parameters:request (django:HttpRequest) – the request
Returns:the default context
Return type:dict
gemtract.views.export(request)[source]

answer the request for /gemtract/export

delivers the export template

Parameters:request – the request
Returns:redirect to /gemtract on error, otherwise delivers the template
gemtract.views.filter(request)[source]

answer the request for /gemtract/filter

delivers the filter template

Parameters:request – the request
Returns:redirect to /gemtract on error, otherwise delivers the template
gemtract.views.index(request)[source]

answer the request for /gemtract

  • delivers the index page
  • optionally accepts an uploaded model
  • optionally displays the top bar with different steps
Parameters:request – the request
Returns:redirect to filter after upload, otherwise delivers the template
gemtract.views.model_exists(request)[source]

does a model actually exist?

maybe it was cleared by the cache or we had some storage issues?

Parameters:request – the request
Returns:true if the user’s model exists
Return type:bool

Template Tags

gemtract.templatetags.template_tags.addclass(field, css)[source]

adds another CSS class to a DOM element

Parameters:
  • field – the DOM element
  • css – the additional CSS class
Returns:

the field with attached class