beat.web.dataformats.admin module

class beat.web.dataformats.admin.DataFormatModelForm(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, instance=None, use_required_attribute=None, renderer=None)[source]

Bases: django.forms.models.ModelForm

class Meta[source]

Bases: object

model

alias of beat.web.dataformats.models.DataFormat

exclude = []
widgets = {'extend': <django.forms.widgets.Select object>, 'referenced_formats': <django.forms.widgets.SelectMultiple object>, 'short_description': <django.forms.widgets.TextInput object>}
clean_declaration_file()[source]

Cleans-up the declaration_file data, make sure it is really new

clean()[source]

Cleans-up the input data, make sure it overall validates

base_fields = {'author': <django.forms.models.ModelChoiceField object>, 'declaration_file': <beat.web.ui.forms.CodeMirrorJSONFileField object>, 'description_file': <beat.web.ui.forms.CodeMirrorRSTFileField object>, 'extend': <django.forms.models.ModelChoiceField object>, 'fork_of': <django.forms.models.ModelChoiceField object>, 'name': <beat.web.ui.forms.NameField object>, 'previous_version': <django.forms.models.ModelChoiceField object>, 'referenced_formats': <django.forms.models.ModelMultipleChoiceField object>, 'shared_with': <django.forms.models.ModelMultipleChoiceField object>, 'shared_with_team': <django.forms.models.ModelMultipleChoiceField object>, 'sharing': <django.forms.fields.TypedChoiceField object>, 'short_description': <django.forms.fields.CharField object>, 'version': <django.forms.fields.IntegerField object>}
declared_fields = {'declaration_file': <beat.web.ui.forms.CodeMirrorJSONFileField object>, 'description_file': <beat.web.ui.forms.CodeMirrorRSTFileField object>, 'name': <beat.web.ui.forms.NameField object>}
property media
beat.web.dataformats.admin.rehash_dataformat(modeladmin, request, queryset)[source]

Recalculates the hash of an dataformat

class beat.web.dataformats.admin.DataFormat(model, admin_site)[source]

Bases: django.contrib.admin.options.ModelAdmin

list_display = ('id', 'author', 'name', 'version', 'short_description', 'creation_date', 'extend', 'previous_version', 'fork_of', 'sharing', 'hash')
search_fields = ['author__username', 'name', 'short_description']
list_filter = ('sharing',)
readonly_fields = ('hash', 'short_description')
actions = [<function rehash_dataformat>]
form

alias of DataFormatModelForm

filter_horizontal = ['shared_with', 'shared_with_team']
fieldsets = ((None, {'fields': ('name', 'author')}), ('Documentation', {'classes': ('collapse',), 'fields': ('short_description', 'description_file')}), ('Versioning', {'classes': ('collapse',), 'fields': ('version', 'previous_version', 'fork_of')}), ('Sharing', {'classes': ('collapse',), 'fields': ('sharing', 'shared_with', 'shared_with_team')}), ('Referenced objects (read-only)', {'classes': ('collapse',), 'fields': ('extend', 'referenced_formats')}), ('Source code', {'fields': ('hash', 'declaration_file')}))
property media