Django Admin Cookbook Chinese version

English original link http://books.agiliq.com/projects/django-admin-cookbook/en/latest/

How Django Admin Cookbook- customize and use Django Admin management background

This is a book about how to use and customize Django Admin management background, which uses the way we are answering about 40 questions common and basic tasks of writing.

These sections based on a common set of Django model to explain, you can read (the model used in this book) here.
Simply put, we have established two Django application, namely events and entities. Its data model comprising:

  • events应用:Epic,Event,EventHero,EventVillian
  • entities应用:Category,Origin,Hero,Villain

This book presents

Text and design

  • 1. How do I change management background title Django administration?
  • 2. How to set up a complex text model?
  • 3. How to create two separate management site?
  • 4. How do you delete the default application from Django Admin background?
  • 5. How to add a logo in the background in Django Admin?
  • 6. How to override the default template Django Admin background?

Field computing

  • 1. How to display a calculated field in the list view page?
  • 2. How to optimize queries in Django Admin background?
  • 3. How to Enable sort of calculated fields?
  • 4. How to enable filtering of the computed field?
  • 5. How to display "On" calculated Boolean field or "off" icon?

Batch and custom actions

  • 1. How do you add additional actions in Django Admin background?
  • 2. How to export a CSV from Django Admin background?
  • 3. How to Delete to delete the selected operating background in Django Admin?
  • 4. How will custom action buttons (not operating) added to the list page background Django Admin?
  • 5. How to use Django Admin backstage import CSV?

Competence

  • 1. How Django Admin background is limited to specific users?
  • 2. How to restrict access to back-end part of Django Admin?
  • 3. How only allows administrators to create an object?
  • 4. How do I delete Model "Add" / "Delete" button?

Within the model with field

  • 1. How to edit multiple models from a Django Admin backstage?
  • 2. How do I add one to one relationship administrator inline?
  • 3. How to add inline nested in the Django admin?
  • 4. How to create a Django Admin background from two different models?

Model List

  • 1. How to display more rows in the list view page?
  • 2. How to disable the background Django Admin tab?
  • 3. How to add date-based filtering background in Django Admin?
  • 4. How to display FK-many or reverse field on the list view page?

Model modified pages

  • 1. How Imagefield image is displayed in Django Admin background.
  • 2. The model of the user associated with the current how to save?
  • 3. How will be marked read-only field in the background Django Admin?
  • 4. How to display non-editable fields in Django Admin background?
  • 5. How to make the field editable when created, but can only read existing object?
  • 6. How to filter FK pull down values ​​in Django Admin background?
  • 7. How to use FK management model with a large number of objects?
  • 8. How to change the drop-down menu ForeignKey display text?
  • 9. How to change the view of the page to add custom buttons Django?

Miscellaneous

  • 1. How to get a particular object Django Admin backend URL?
  • 2. How do I add models to Django Admin back twice?
  • 3. How to override the act of saving for the Django Admin backstage?
  • 4. How to add a database to view Django Admin?
  • 5. How to set the order of the application and the background model in Django Admin console.

Guess you like

Origin www.cnblogs.com/superhin/p/12155530.html