Top "Django-admin" questions

Django's built-in, automatic admin interface (django.

Readonly models in Django admin interface?

How can I make a model completely read-only in the admin interface? It's for a kind of log table, where …

django django-admin readonly
Using Django auth UserAdmin for a custom user model

From the Django.Contrib.Auth docs: Extending Django’s default User If you’re entirely happy with Django’s User …

django django-models django-admin django-authentication django-custom-user
many-to-many in list display django

class PurchaseOrder(models.Model): product = models.ManyToManyField('Product') vendor = models.ForeignKey('VendorProfile') dollar_amount = models.FloatField(verbose_name='Price') class …

python django django-admin admin django-queryset
Override default queryset in Django admin

One of my models has a deleted flag, which is used to hide objects globally: class NondeletedManager(models.Manager): """Returns …

django django-models django-admin
Creating Custom Filters for list_filter in Django Admin

I would like to make custom filters for django admin instead of the normal 'is_staff' and 'is_superuser'. I …

django django-admin
Django admin: how to sort by one of the custom list_display fields that has no database field

# admin.py class CustomerAdmin(admin.ModelAdmin): list_display = ('foo', 'number_of_orders') # models.py class Order(models.Model): bar = models.…

django sorting django-admin
Django Admin - Disable the 'Add' action for a specific model

I have a django site with lots of models and forms. I have many custom forms and formsets and inlineformsets …

python django django-admin
Django Admin: Using a custom widget for only one model field

I have a DateTimeField field in my model. I wanted to display it as a checkbox widget in the Django …

python django django-forms django-admin django-widget
Custom Filter in Django Admin on Django 1.3 or below

How can I add a custom filter to django admin (the filters that appear on the right side of a …

python django django-admin
UnicodeEncodeError: 'ascii' codec can't encode character

When uploading files with non-ASCII characters I get UnicodeEncodeError: Exception Type: UnicodeEncodeError at /admin/studio/newsitem/add/ Exception Value: 'ascii' …

django file-upload django-admin nginx django-uploads