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
1
vote
1 answer
Django - add choice field to django admin list_filter
This is one of my django admin classes:
class InactiveSiteAdmin(SiteAdmin):
change_list_template = 'admin/change_list_inactive.html'
list_display = ('is_active', 'thumb', 'name', 'show_url', 'get_desc',
'keywords','category',…

jundymek
- 1,013
- 4
- 18
- 40
1
vote
0 answers
Django 1.6.4 - Delete model with defered fields in admin
I'm encountering a strange issue with deferred fields in the Django admin. Here's how the model is structured.
class LightweightManager(models.Manager):
def get_query_set(self):
return super(LightweightManager, self).get_queryset()\
…

bogs
- 2,286
- 18
- 22
1
vote
1 answer
Update Multiple Items with Input Value in Django Admin
I would like to set the value of a field in multiple rows of Django Admin.
For example if I had database of books with shelf locations I might move several books to another shelf. I need a way, within Django Admin, to input the new shelf location…
user759885
0
votes
0 answers
Django: Save inline form before run action
I'm using a django-inline-actions package for let end-users run actions in admin inlines.
But it's no matter what exactly using for action button, i can implement it by hand (like this, for example), behavior will still the same.
This look as:
As…

swasher
- 368
- 4
- 17
0
votes
0 answers
Nested List in Django Admin
I have two models, something like this:
class Category(models.Model):
title = models.CharField(max_length=32)
date_created = models.DateTimeField(auto_now_add=True)
class Post(models.Model):
title = models.CharField(max_length=64)
…

virvaldium
- 226
- 3
- 13
0
votes
0 answers
Throttle admin action django
I have accept_withdraw_request action in my RequestWithdaw admin model
class RequestWithdraws(admin.ModelAdmin):
list_display = ("get_email", "amount", "address", "is_accept", "is_reviewed")
list_filter = ("is_reviewed",)
actions =…

Gtihon9
- 11
- 1
0
votes
0 answers
Adding Checkbox For Each Row to Select Rows Without Adding Any Actions in Django Admin Model Page
Problem image
I want to add checkboxes for each row like action checkboxes to post selected rows to a view with my custom buttons. If I do it like this with adding a pointless action, it behaves like I am doing an action and it redirects to the same…
0
votes
1 answer
By default, is transaction used in Django Admin Actions?
I know that by default, transaction is used in Django Admin when adding, changing and deleting data according to my tests.
But, I selected Delete selected persons and clicked on Go in Django Admin Actions. *I use PostgreSQL:
Then, clicked on Yes,…

Super Kai - Kazuya Ito
- 22,221
- 10
- 124
- 129
0
votes
0 answers
How to remove the default "Successfully deleted ..." message for "Delete Selected" in Django Admin Action?
In the overridden delete_queryset(), I deleted loaded messages and added the new message "Deleted successfully!!" as shown below:
# "store/admin.py"
from .models import Person
from django.contrib import admin,…

Super Kai - Kazuya Ito
- 22,221
- 10
- 124
- 129
0
votes
0 answers
How to show GenericRelation object field value in list_display?
models.py
class ModelA(models.Model):
name = models.CharField(max_length=40)
class ModelB(models.Model):
name = models.CharField(max_length=100)
model_c = GenericRelation("modelc")
class ModelC(models.Model):
model_a =…

shraysalvi
- 303
- 1
- 10
0
votes
1 answer
How to run "SELECT FOR UPDATE" for the default "Delete selected" in Django Admin Actions?
I have Person model as shown below:
# "store/models.py"
from django.db import models
class Person(models.Model):
name = models.CharField(max_length=30)
And, this is Person admin below:
# "store/admin.py"
from django.contrib import admin
from…

Super Kai - Kazuya Ito
- 22,221
- 10
- 124
- 129
0
votes
0 answers
Long Processing within Django ModelAdmin Form
I have a custom form in a admin.ModelAdmin where I use to upload some CSV data with a file upload.
Sometimes, processing this CSV file takes longer than the HTTP Worker timeouts will allow, forcing me to split up the CSV file into smaller chunks…

keehun
- 41
- 4
0
votes
1 answer
Django - Apply model on many (1000's) foreign key objects in admin
I have a model of a football coach and a model of a membership payment which has a foreign key to the coach model.
In the admin, I want to be able to apply the membership to a lot of coaches at once and not only to one coach. In essence, I imagine a…

Stef
- 13
- 3
0
votes
0 answers
Inline form validation based on Parentform - Django Admin
Below is my admin form
Class RequestedAreaInilne(admin.StackedInline):
model = RequestedArea
fields = ("area", "building")
class BuildingAdmin(admin.ModelAdmin):
fields = ("special_access", "user_id", etc ....)
inlines =…

Anish
- 4,262
- 6
- 36
- 58
0
votes
0 answers
django admin custom actions form page - How to get data from forms in formset, while formset won't validate form
I don't know how to get the updated fields, from the forms in the formset, into individual messages, because the formset is never valid.
I've already tried the "for form in formset" inside and outside the form.is_valid() with .get['field'],…

viciousvegs
- 35
- 5