How can I disable the Django Celery admin modules

0 votes
I have no need to the celery modules in my Django admin. Is there a way I could remove it?
Jun 12, 2020 in Python by kartik
• 37,510 points
312 views

1 answer to this question.

0 votes

Hello @kartik,

To be more specific, in admin.py of any app inside INSTALLED_APPS after 'djcelery'

from django.contrib import admin
from djcelery.models import (
    TaskState, WorkerState, PeriodicTask, 
    IntervalSchedule, CrontabSchedule)

admin.site.unregister(TaskState)
admin.site.unregister(WorkerState)
admin.site.unregister(IntervalSchedule)
admin.site.unregister(CrontabSchedule)
admin.site.unregister(PeriodicTask)

Hope this works!

answered Jun 12, 2020 by Niroj
• 82,720 points

Related Questions In Python

0 votes
1 answer

How do I add a link from the Django admin page of one object to the admin page of a related object?

Hello @kartik, Set show_change_link to True (False by default) in your inline ...READ MORE

answered Jun 12, 2020 in Python by Niroj
• 82,720 points
2,728 views
0 votes
1 answer

How can I disable logging while running unit tests in Python Django?

Hello @kartik, Since you are in Django, you ...READ MORE

answered Jun 23, 2020 in Python by Niroj
• 82,720 points
3,378 views
0 votes
1 answer

How can I get all the request headers in Django?

Hello @kartik,  You can use request.headers to access the HTTP ...READ MORE

answered Jun 30, 2020 in Python by Niroj
• 82,720 points
3,149 views
0 votes
1 answer

How can I get the username of the logged-in user in Django?

Hello @kartik, You can use the request object ...READ MORE

answered Jul 29, 2020 in Python by Niroj
• 82,720 points
4,365 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,033 views
0 votes
0 answers
+4 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,810 points
1,556 views
0 votes
1 answer

In Django Admin how do I disable the Delete link?

Hello @kartik, Simple you can use this code: class ...READ MORE

answered Aug 13, 2020 in Python by Niroj
• 82,720 points
421 views
0 votes
1 answer

How can I get the domain name of my site within a Django template?

Hello kartik, The variation of the context processor ...READ MORE

answered Apr 23, 2020 in Python by Niroj
• 82,720 points
3,384 views