Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

django-admin

How to override and extend basic Django admin templates?

August 20, 2022 by Magenaut

How do I override an admin template (e.g. admin/index.html) while at the same time extending it (see https://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-vs-replacing-an-admin-template)?

Categories Python, Q&A Tags django, django-admin, python Leave a comment

Django auto_now and auto_now_add

August 19, 2022 by Magenaut

For Django 1.1.

Categories Python, Q&A Tags datetime, django, django-admin, django-models, python Leave a comment

Can “list_display” in a Django ModelAdmin display attributes of ForeignKey fields?

August 19, 2022 by Magenaut

I have a Person model that has a foreign key relationship to Book, which has a number of fields, but I’m most concerned about author (a standard CharField).

Categories Python, Q&A Tags django, django-admin, django-models, modeladmin, python Leave a comment

Multiple ModelAdmins/views for same model in Django admin

August 19, 2022 by Magenaut

How can I create more than one ModelAdmin for the same model, each customised differently and linked to different URLs?

Categories Python, Q&A Tags django, django-admin, python Leave a comment

Custom Filter in Django Admin on Django 1.3 or below

August 18, 2022 by Magenaut

How can I add a custom filter to django admin (the filters that appear on the right side of a model dashboard)? I know its easy to include a filter based on a field of that model, but what about a “calculated” field like this:

Categories Python, Q&A Tags django, django-admin, python Leave a comment

How to add a calculated field to a Django model

August 17, 2022 by Magenaut

I have a simple Employee model that includes firstname, lastname and middlename fields.

Categories Python, Q&A Tags django-admin, django-models, python Leave a comment

Overriding the save method in Django ModelForm

August 15, 2022 by Magenaut

I’m having trouble overriding a ModelForm save method. This is the error I’m receiving:

Categories Python, Q&A Tags django, django-admin, django-forms, python Leave a comment

Default filter in Django admin

August 14, 2022 by Magenaut

How can I change the default filter choice from ‘ALL’? I have a field named as status which has three values: activate, pending and rejected. When I use list_filter in Django admin, the filter is by default set to ‘All’ but I want to set it to pending by default.

Categories Python, Q&A Tags django, django-admin, python Leave a comment

How to change ForeignKey display text in the Django Admin?

August 14, 2022 by Magenaut

How can I change the display text in a <select> field while selecting a field which is a ForeignKey?

Categories Python, Q&A Tags django, django-admin, foreign-keys, python, python-3.x Leave a comment

Django Admin – change header ‘Django administration’ text

August 14, 2022 by Magenaut

How does one change the ‘Django administration’ text in the django admin header?

Categories Python, Q&A Tags django, django-admin, python Leave a comment
Older posts
Page1 Page2 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress