Login

Tag "admin-panel"

Snippet List

Twin column model admin index

**Problem:** A large project has lots of apps, so naturally you want a twin column admin interface, with the history out beyond those two columns... **Solution:** Involved editing the admin/index.html template, a simple modification to the adminapplist template tag, and a flag placed in each models.py for models you want in column two. **Instructions:** 1. Create the app templates/admin/index.html file by copying and pasting the provided code. 2. Copy django/contrib/admin/templatetags/adminapplist.py to your app/templatetags directory as column_adminapplist.py and edit as shown in the provided code. 3. add a \_admin\_index\_column = 2 near the top of each models.py file for each one you want to be on the right hand side.

  • admin
  • admin-panel
Read More

bigger textfields in admin panel

Sometimes a textarea field is to small for usage. I add some JavaScript and CSS to resize all textareas a little dynamically: The JS change the size in dependence text-lengthen. You should store this snippet into a file like this: templates_django/admin/base_site.html

  • admin
  • textfield
  • admin-panel
Read More

2 snippets posted so far.