Questions tagged [django-admin-tools]

It's a collection of extensions and tools for the Django administration interface.

It contains a full featured and customizable dashboard (for the admin index page and the admin applications index pages), a customizable menu bar and tools to make admin theming easier.

117 questions
4
votes
1 answer

How to create anchor on django admin page to scroll down to an inline or field automatically from a url

I have a fairly big model and on the admin page for that model I have a few inlines that show up at the bottom. I want to be able to link to the admin page for a model instance, and automatically scroll down to an inline so something like…
gt565k
  • 7,755
  • 3
  • 16
  • 9
3
votes
1 answer

'django.template.context_processors.request' issue with django-tables2 and django-admin-tools

I'm having an issue when trying to render a PDF through xhtml2pdf in Django(1.10.4) when using django-admin-tools(0.8.0) & django-tables2(1.5) together. I've done enough reading to understand the basis of what's going on but have not idea how to fix…
Dan2theR
  • 159
  • 2
  • 11
3
votes
0 answers

django admin panel add a confirmation window

I need to add a confirmation window on admin change model submit "save". Smth like this: "Do you really want to apply changes? Yes/No". I need it only for one model and only if the changed model satisfy the other conditions. I can`t override django…
2
votes
2 answers

Django admin-site is broken - Caught UnicodeDecodeError while rendering: 'ascii' codec can't decode byte 0xd0 in position 0

I was developing my own django-app and after testing at domain domain. example .ru moved all to example .ru by editing nginx.conf All worked fine, but now, this error appears: Caught UnicodeDecodeError while rendering: 'ascii' codec can't decode…
PoMaHTuK
  • 223
  • 2
  • 7
2
votes
1 answer

How to add both integer field and choices in a single attribute of a model class in django?

I want to add both choices of days and hours in my assigned_time field, along with adding how many days or how many hours. Here is what I tried that doesn't work. Here is my model.py class Timesheet(models.Model): DAYS= 'D' HOURS = 'H' …
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,…
2
votes
2 answers

Django admin: How to reverse the order of list_filter?

I have a dataset with models that show the year. What I need to do is reverse the order. By default, the Django admin interface shows the year by order of ascending number value (e.g. 2021, 2022, etc). What I'm aiming at is for the filter to display…
2
votes
1 answer

Django admin error ValidationError: ['ManagementForm data is missing or has been tampered with'] due to conditional inline use

I have a custom User model(AbstractUser) and a Stock model. Assume there's multiple user roles manager, supplier etc. The manager can be able to view other manager's details and supplier details. The User model got a conditional inline which shows…
2
votes
2 answers

Django admin page layout changed with new version

I am working on an existing django project where admin console is extensively used. With my latest run of package upgrade for my application admin page layout has changed. Models have started appearing on all the pages, leaving a small space to…
2
votes
1 answer

Adding extra fields to django InlineFormSet

Suppose I have 3 models: Chess Player Tournament Participation "Participation" is a junction table of two others. I use the following InlineFormSet in admin panel in order to show some fields from Participation model. from .models import…
Ersain
  • 1,466
  • 1
  • 9
  • 20
2
votes
3 answers

Totaling inside a cart model the subtotal of each TabularInline entry in Django Admin

Not sure if this is possible, but in my Cart (model class) detail view in Django Admin, I'd like to total up all of my TabularInline Entry model class subtotals, and save that value to my Cart's total_price attribute. Is there a way to do this or…
2
votes
1 answer

How to throw ValidationError for DjangoAdmin when it's a ModelAdmin w/change_view

I have a model class Group(models.Model): active = models.BooleanField(null=False, blank=False, default=True) and its admin pages class GroupAdmin(admin.ModelAdmin): change_form_template = "admin/group/group.html" form =…
ehacinom
  • 8,070
  • 7
  • 43
  • 65
2
votes
1 answer

How to allow a user to view data that is added only by him Django Admin

I have a Django application, where the user with restricted access registers a new post in Django admin. This user can only see in the table to register, update and delete the posts inserted by him, and can not view the posts entered by another…
2
votes
1 answer

django admin site foreign key fields

Can we have foreign key model fields display in another model as fields (not list display) on django admin site. I have a product and price model which has foreignkey of Price. I would like to display price, sale_price and sale as editable fields in…
2
votes
2 answers

Django admin tools new version model changes

I upgraded Django admin_tools to the latest version 0.5 . And I'm using Django 1.3 Now I am getting this error when I go to admin pages: OperationalError: (1054, "Unknown column 'admin_tools_dashboard_preferences.dashboard_id' in 'field…
user2641385