Django Admin Actions django-admin comes by default with django installation and it is one of strongest feature of django. So there are many actions that can be taken by django like add user, change their permissions, change their access levels and many more.
Questions tagged [django-admin-actions]
113 questions
2
votes
1 answer
How can I display image in admin.py and one of my field in employee table is not appearing correct in admin.py?
I am working on creating Employee monitoring system. I have 3 models right now. Here they are
class User(models.Model):
username= models.CharField(max_length=256, verbose_name='Username')
first_name = models.CharField(max_length=256,…

Noor Ibrahim
- 51
- 8
2
votes
1 answer
Display SQL results in Django Admin interface
I have set up a Django Admin Interface (django.contrib.admin) to see my data from my Mysql Database.
I would like to know if it's possible to make specifics SQL queries ?
So far, all my tables are registered to be displayee in the Django Admin…

lilouch
- 1,054
- 4
- 23
- 43
2
votes
2 answers
Replace foreign key dropdown with textbox with add/edit icon - Django
Related to foreign key fields in the Django Admin, the default display
element is a drop down list box containing all of the foreign key
items from the related model. I my app it will contain thousands of items and I am looking to change the…

Brijesh
- 159
- 1
- 2
- 10
2
votes
0 answers
Add and delete option are not visible in django administrator, when using along with mongodb
Attached is the code snippet of the settings file, I have used MongoDB engine. I am not very sure what is happening wrong here.
Even on starting a fresh new project, add or delete options are not visible.
I have added some extra middleware and…

pokemon blue
- 1,870
- 1
- 15
- 19
2
votes
1 answer
How to set a custom queryset class for Django admin actions?
In an application I'm building, I've created a series of custom model managers and querysets to have a higher level api.
The problem comes when I execute an admin action. The queryset passed to it seems to be a generic one, and I would like to have…

jmoreno
- 612
- 10
- 23
2
votes
1 answer
Django admin action to add bulk manytomany fields?
I'm trying to add multiple items to a ManyToManyField on Django via actions.
The models:
class Publisher(models.Model):
name = models.CharField(max_length=30)
address = models.CharField(max_length=50)
website = models.URLField()
class…
user5170375
2
votes
1 answer
Django admin custom CSV report
I have a django project with 3 models. The user, the project (in which he works on) and the Change (which logs start and finish working time as well as the project and user).
I want to export a custom CSV report. Ex: total working hours of users per…

George Vas
- 113
- 2
- 11
1
vote
1 answer
Add a custom admin action in Django when an object in another model is created
I wanted to implement one functionality in my Django application such that a custom admin action is created whenever an object is created in some other model.
For e.g.
I have one model as Semester:
class Semester(models.Model):
name =…

ishaan mittal
- 13
- 4
1
vote
1 answer
How can I change titles in action section in Django admin panel?
I want to change titles in action section in Django admin. How can I do that?

Darwin
- 1,695
- 1
- 19
- 29
1
vote
0 answers
Django: How to show a message in a custom admin action with a download?
I'm defining a custom admin action called Download CSV. In this action I want to download a .csv file and show a message to the user. I have not been able to make both happen.
I tried this way:
@admin.action(description=gettext_lazy("Download…

Ignacio Maestro
- 23
- 4
1
vote
2 answers
Django custom admin actions with an intermediate page submit not triggered
Writing an admin action so an administrator can select a template they can use to send a message to subscribers by inputting only the subject and text message. Using a filtered list from the admin panel an action called broadcast is triggered on…

JP1
- 69
- 9
1
vote
2 answers
Custom Django 'delete' action not firing from admin list view
I have a 'notes' model in my Django app where I've built some custom delete actions:
class Note(models.Model):
[MODEL FIELDS HERE]
def delete(self, *args, **kwargs):
[STUFF HEPPENS HERE]
super(Note, self).delete()
If I…

campegg
- 123
- 1
- 1
- 11
1
vote
1 answer
Django Admin actions don't work after redefining primary key of the model
I am using standard models.Model in Django. I changed my primary key to _id (mongo). After that, actions in Django Admin don't work anymore. For example, when I use the default Django action – Delete selected, no object is found through the query.…

rav668
- 11
- 3
1
vote
1 answer
How to add actions to Python django admin page
I have a django project in which the the form records the name and the email addresses of the users and I was able to put that data using forms.py and models.py.
What I want to do nextis to create an action through which I can download that in csv…

Ayaan Ahmad
- 11
- 3
1
vote
0 answers
How to see all the recent changes of admin panel, who did it and when?
I want to see all the recent actions that has been done, how can i see it?

raj-kapil
- 177
- 1
- 15