beat.web.databases.admin module¶
-
class
beat.web.databases.admin.DatabaseModelForm(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)[source]¶ Bases:
django.forms.models.ModelForm-
class
Meta[source]¶ Bases:
object-
model¶ alias of
beat.web.databases.models.Database
-
exclude= []¶
-
widgets= {'short_description': <django.forms.widgets.TextInput object>}¶
-
-
base_fields= {'declaration_file': <beat.web.ui.forms.CodeMirrorJSONFileField object>, 'description_file': <beat.web.ui.forms.CodeMirrorRSTFileField object>, 'fork_of': <django.forms.models.ModelChoiceField object>, 'name': <beat.web.ui.forms.NameField object>, 'previous_version': <django.forms.models.ModelChoiceField 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>, 'source_code_file': <beat.web.ui.forms.CodeMirrorPythonFileField 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>, 'source_code_file': <beat.web.ui.forms.CodeMirrorPythonFileField object>}¶
-
media¶
-
class
-
class
beat.web.databases.admin.DatabaseProtocolInline(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.TabularInline-
model¶
-
can_delete= False¶
-
extra= 0¶
-
max_num= 0¶
-
readonly_fields= ('name',)¶
-
ordering= ('name',)¶
-
media¶
-
-
class
beat.web.databases.admin.Database(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('id', 'name', 'version', 'short_description', 'creation_date', 'previous_version', 'sharing')¶
-
search_fields= ['name', 'short_description', 'previous_version__author__username', 'previous_version__name']¶
-
list_display_links= ('id', 'name')¶
-
readonly_fields= ('short_description',)¶
-
form¶ alias of
DatabaseModelForm
-
inlines= [<class 'beat.web.databases.admin.DatabaseProtocolInline'>]¶
-
filter_horizontal= ['shared_with', 'shared_with_team']¶
-
actions= [<function notify_by_email.<locals>.notify_by_email_inner>, 'new_version']¶
-
fieldsets= ((None, {'fields': ('name',)}), ('Documentation', {'classes': ('collapse',), 'fields': ('short_description', 'description_file')}), ('Versioning', {'classes': ('collapse',), 'fields': ('version', 'previous_version')}), ('Sharing', {'classes': ('collapse',), 'fields': ('sharing', 'shared_with', 'shared_with_team')}), ('Source code', {'fields': ('declaration_file', 'source_code_file')}))¶
-
media¶
-
-
class
beat.web.databases.admin.DatabaseSetTemplateOutputInline(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.TabularInline-
model¶ alias of
beat.web.databases.models.DatabaseSetTemplateOutput
-
extra= 0¶
-
ordering= ('name',)¶
-
readonly_fields= ('name', 'dataformat')¶
-
has_delete_permission(request, obj=None)[source]¶ Returns True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
-
has_add_permission(request)[source]¶ Returns True if the given request has permission to add an object. Can be overridden by the user in subclasses.
-
media¶
-
-
class
beat.web.databases.admin.DatabaseSetTemplate(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('id', 'name')¶
-
search_fields= ['name']¶
-
list_display_links= ('id', 'name')¶
-
readonly_fields= ('name',)¶
-
inlines= [<class 'beat.web.databases.admin.DatabaseSetTemplateOutputInline'>]¶
-
has_delete_permission(request, obj=None)[source]¶ Returns True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
-
has_add_permission(request)[source]¶ Returns True if the given request has permission to add an object. Can be overridden by the user in subclasses.
-
media¶
-
-
class
beat.web.databases.admin.DatabaseSetOutputInline(parent_model, admin_site)[source]¶ Bases:
django.contrib.admin.options.TabularInline-
model¶
-
extra= 0¶
-
ordering= ('template__name',)¶
-
readonly_fields= ('template',)¶
-
has_delete_permission(request, obj=None)[source]¶ Returns True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
-
has_add_permission(request)[source]¶ Returns True if the given request has permission to add an object. Can be overridden by the user in subclasses.
-
media¶
-
-
class
beat.web.databases.admin.DatabaseSet(model, admin_site)[source]¶ Bases:
django.contrib.admin.options.ModelAdmin-
list_display= ('id', 'protocol', 'name', 'template', 'hash')¶
-
search_fields= ['name', 'template__name', 'protocol__database__name', 'protocol__name']¶
-
list_display_links= ('id', 'name')¶
-
readonly_fields= ('name', 'template', 'protocol', 'hash')¶
-
inlines= [<class 'beat.web.databases.admin.DatabaseSetOutputInline'>]¶
-
has_delete_permission(request, obj=None)[source]¶ Returns True if the given request has permission to change the given Django model instance, the default implementation doesn’t examine the obj parameter.
Can be overridden by the user in subclasses. In such case it should return True if the given request has permission to delete the obj model instance. If obj is None, this should return True if the given request has permission to delete any object of the given type.
-
has_add_permission(request)[source]¶ Returns True if the given request has permission to add an object. Can be overridden by the user in subclasses.
-
media¶
-