django_celery_beat.admin

Periodic Task Admin interface.

class django_celery_beat.admin.ClockedScheduleAdmin(model, admin_site)[source]

Admin-interface for clocked schedules.

fields = ('clocked_time',)
list_display = ('clocked_time',)
property media
class django_celery_beat.admin.PeriodicTaskAdmin(model, admin_site)[source]

Admin-interface for periodic tasks.

actions = ('enable_tasks', 'disable_tasks', 'toggle_tasks', 'run_tasks')
celery_app = <Celery proj>
changelist_view(request, extra_context=None)[source]

The ‘change list’ admin view for this model.

date_hierarchy = 'start_time'
disable_tasks(request, queryset)[source]
enable_tasks(request, queryset)[source]
fieldsets = ((None, {'fields': ('name', 'regtask', 'task', 'enabled', 'description'), 'classes': ('extrapretty', 'wide')}), ('Schedule', {'fields': ('interval', 'crontab', 'solar', 'clocked', 'start_time', 'last_run_at', 'one_off'), 'classes': ('extrapretty', 'wide')}), ('Arguments', {'fields': ('args', 'kwargs'), 'classes': ('extrapretty', 'wide', 'collapse', 'in')}), ('Execution Options', {'fields': ('expires', 'expire_seconds', 'queue', 'exchange', 'routing_key', 'priority', 'headers'), 'classes': ('extrapretty', 'wide', 'collapse', 'in')}))
form

alias of PeriodicTaskForm

get_queryset(request)[source]

Return a QuerySet of all model instances that can be edited by the admin site. This is used by changelist_view.

list_display = ('__str__', 'enabled', 'interval', 'start_time', 'last_run_at', 'one_off')
list_filter = ['enabled', 'one_off', 'task', 'start_time', 'last_run_at']
property media
model

alias of PeriodicTask

readonly_fields = ('last_run_at',)
run_tasks(request, queryset)[source]
search_fields = ('name',)
toggle_tasks(request, queryset)[source]
class django_celery_beat.admin.PeriodicTaskForm(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]

Form that lets you create and modify periodic tasks.

class Meta[source]

Form metadata.

exclude = ()
model

alias of PeriodicTask

base_fields = {'args': <django.forms.fields.CharField object>, 'clocked': <django.forms.models.ModelChoiceField object>, 'crontab': <django.forms.models.ModelChoiceField object>, 'description': <django.forms.fields.CharField object>, 'enabled': <django.forms.fields.BooleanField object>, 'exchange': <django.forms.fields.CharField object>, 'expire_seconds': <django.forms.fields.IntegerField object>, 'expires': <django.forms.fields.DateTimeField object>, 'headers': <django.forms.fields.CharField object>, 'interval': <django.forms.models.ModelChoiceField object>, 'kwargs': <django.forms.fields.CharField object>, 'name': <django.forms.fields.CharField object>, 'one_off': <django.forms.fields.BooleanField object>, 'priority': <django.forms.fields.IntegerField object>, 'queue': <django.forms.fields.CharField object>, 'regtask': <django_celery_beat.admin.TaskChoiceField object>, 'routing_key': <django.forms.fields.CharField object>, 'solar': <django.forms.models.ModelChoiceField object>, 'start_time': <django.forms.fields.DateTimeField object>, 'task': <django.forms.fields.CharField 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__’.

clean_args()[source]
clean_kwargs()[source]
declared_fields = {'regtask': <django_celery_beat.admin.TaskChoiceField object>, 'task': <django.forms.fields.CharField object>}
property media

Return all media required to render the widgets on this form.

class django_celery_beat.admin.TaskChoiceField(*, choices=(), **kwargs)[source]

Field that lets you choose between task names.

valid_value(value)[source]

Check to see if the provided value is a valid choice.

widget

alias of TaskSelectWidget

class django_celery_beat.admin.TaskSelectWidget(attrs=None, choices=())[source]

Widget that lets you choose between task names.

celery_app = <Celery proj>
property choices
property media
tasks_as_choices()[source]