Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Extendable, adaptable rewrite of django.contrib.admin
Python HTML

Merge pull request #424 from hnakamur/use_static_template_tag

Use static template tag instead of STATIC_URL
latest commit 20b5b2ab72
@andrewsmedina andrewsmedina authored



Build Status Coverage Status

One of the most useful parts of django.contrib.admin is the ability to configure various views that touch and alter data. django-admin2 is a complete rewrite of that library using modern Class-Based Views and enjoying a design focused on extendibility and adaptability. By starting over, we can avoid the legacy code and make it easier to write extensions and themes.

Full Documentation at:


  • Rewrite of the Django Admin backend
  • Drop-in themes
  • Built-in RESTful API


Site administration Select user



Use pip to install from PyPI:

pip install django-admin2

Add djadmin2 and rest_framework to your settings file:

    'rest_framework', # for the browsable API templates
    'floppyforms', # For HTML5 form fields
    'crispy_forms', # Required for the default theme's layout

Add the default theme in your settings file:

# In
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_default',)
ADMIN2_THEME_DIRECTORY = "djadmin2theme_default/"

Add djadmin2 urls to your URLconf:

from django.conf.urls import patterns, include

import djadmin2


urlpatterns = patterns(
   url(r'^admin2/', include(djadmin2.default.urls)),

How to write django-admin2 modules

# myapp/
# Import your custom models
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from django.contrib.auth.models import User

from .models import Post, Comment

import djadmin2

class UserAdmin2(djadmin2.ModelAdmin2):
    # Replicates the traditional admin for django.contrib.auth.models.User
    create_form_class = UserCreationForm
    update_form_class = UserChangeForm

#  Register each model with the admin
djadmin2.default.register(User, UserAdmin2)

Migrating from 0.5.x

Themes are now defined explicitly, including the default theme. Therefore, your settings need to include this:

# In
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_default',)
ADMIN2_THEME_DIRECTORY = "djadmin2theme_default/"

Drop-In Themes

The default theme is whatever bootstrap is most current. Specifically:

# In
INSTALLED_APPS += ('djadmin2.themes.djadmin2theme_default',)
ADMIN2_THEME_DIRECTORY = "djadmin2theme_default/"

If you create a new theme, you define it thus:

# In
# Mythical theme! This does not exit... YET!
INSTALLED_APPS += ('djadmin2theme_foundation',)
ADMIN2_THEME_DIRECTORY = "djadmin2theme_foundation/"

Follows Best Practices

This project follows best practices as espoused in Two Scoops of Django: Best Practices for Django 1.6.

Support this project!

You can hire the lead maintainer to perform dedicated work on this package. Please email

Something went wrong with that request. Please try again.