Questions tagged [django-admin-actions]

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.

113 questions
0
votes
1 answer

django custom actions interim formpage doesn't submit

Everytime I submit it quits back to model adminpage without executing anything. I'm trying to let there be an interim page for approval purposes. But it either doesn't notice submit or the submit has already happened on page load in other…
0
votes
1 answer

Custom button in Django Admin page, that when clicked, will change the field of the model to True

I have a sample model in my Django App: class CustomerInformation(models.Model): # CustomerInformation Schema name=models.CharField(max_length=200, verbose_name="Name",default="Default Name") login_url=models.URLField(max_length=200,…
0
votes
2 answers

Model register save user created Django admin

I'm using Django admin, and I have a model in which I have a created_user property. The problem is that I don't know how to register the user from the Django admin. How can I do this?
0
votes
1 answer

how to make search box on the admin change list page make a search over phone_number field in User model

I want to do search over Users using their phone number, the search_list don't do that with fields of PhoneNumberField(): class User(AbstractUser, PermissionsMixin): phone_number = PhoneNumberField( unique=True) email =…
E.Mohammed
  • 163
  • 1
  • 4
  • 13
0
votes
0 answers

Django HttpResponseRedirect wont redirect when message sent

I want my page to reload and show the django messages sent to the page when a POST call is made (by another user). From api I am calling the method like that: def create(self, request, pk=None): json_data = json.loads(request.body) …
0
votes
1 answer

Django admin page copy ManyToMany related field from one model to another

I am trying to write a scheduling app. Here there are multiple workers and I create a group of workers. The Group is used as a template to create schedule. When I create a Schedule object I want to take input of a Group object and copy the members…
0
votes
0 answers

the "Select all" header checkbox in django 2.7.6 version?

How to get header checkbox in python version 2.7.6?
0
votes
1 answer

stop Django admin actions from showing project wide

I've got a project with quite a few admin-actions. Currently I'm registering them like so: @admin.action(description='Some admin action description') def do_something_action(self, request, queryset): pass Some of these are being added to the…
S.D.
  • 2,486
  • 1
  • 16
  • 23
0
votes
1 answer

Django Admin delete user exception - Django Phone number

I have a django project which was working fine. I got the requirement to include phone verification so i used twilio and used the django [phone number][1]. I did the verification part and everything is working fine until i noticed the following…
0
votes
0 answers

How to edit custom field in django TabularInline

I have a following inline model under company management. i want to make editable those custom field under company detail page. anyone has a suggestion that how to make editable field 'email', 'name' and 'role'. I will send it to API while…
0
votes
1 answer

please help me for customizing my django admin pannel

i should add this tables in my admin class in django please help me
user12782685
0
votes
1 answer

How to change admin color in Django based on whether person is an Superuser or not?

I would like to implement a function in Django admin, that if a person logged is superuser then the color in admin is different. How can I approach it? I don't want 'normal' users to have access to admin, but I want to have 2 levels of access -…
afdkj
  • 3
  • 3
0
votes
1 answer

Django Admin action different names then function names

Is possible to have action display in Django Admin with a different name than its function name? for example: def an_action(): pass class AdminPanel(admin.ModelAdmin): actions = [ an_action] In the Django admin panel an_action would…
Josh Martin
  • 311
  • 3
  • 18
0
votes
1 answer

Django Admin. Giving permission to a user or a group and on save, I have 500 server error

update Briefly ran app in debug mode... On save it gave me the following: ProgrammingError at /admin/auth/user/4/change/ syntax error at or near "ON" LINE 1: ...ser_groups" ("user_id", "group_id") VALUES (4, 5) ON CONFLIC... Looked up the related…
bugthefifth
  • 161
  • 15
0
votes
1 answer

How to hide objects after deletion in Django admin?

in my Django admin interface if I delete something it leads to default Django admin deletion page. In that page under objects category can we delete any object message or make changes in it? I have provided with the image!!