Extendable, adaptable rewrite of django.contrib.admin
Find a file
2013-05-30 12:33:00 +02:00
djadmin2 fixes #155, which is moving models.py to types.py. Using admins.py as an alias for the old models.py module 2013-05-30 12:33:00 +02:00
docs fixes #155, which is moving models.py to types.py. Using admins.py as an alias for the old models.py module 2013-05-30 12:33:00 +02:00
example fixes #155, which is moving models.py to types.py. Using admins.py as an alias for the old models.py module 2013-05-30 12:33:00 +02:00
.gitignore Ignore and remove .db files from SQLite 2013-05-18 12:34:57 +02:00
.travis.yml Changed how travis install requirements 2013-05-19 12:40:26 +02:00
AUTHORS.rst Update AUTHORS.rst 2013-05-27 23:24:04 +02:00
LICENSE boilerplate 2013-05-14 14:24:31 +02:00
MANIFEST.in Prep for version 0.2.0 2013-05-19 17:23:58 +02:00
README.rst fixes #155, which is moving models.py to types.py. Using admins.py as an alias for the old models.py module 2013-05-30 12:33:00 +02:00
requirements.txt Setting up autodoc for the docs. 2013-05-29 10:44:22 +02:00
runtests.py Adding docs for optional runtests.py arguments. 2013-05-23 22:18:12 +02:00
setup.py merge and adding requirements for floppy-forms 2013-05-23 19:23:23 +02:00

===============
django-admin2
===============

.. image:: https://travis-ci.org/pydanny/django-admin2.png
   :alt: Build Status
   :target: https://travis-ci.org/pydanny/django-admin2

**Warning:** This project is currently in an **alpha** state and currently not meant for real projects.

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.

Contributing
=============

Yes please! Please read our formal contributing document at: https://django-admin2.readthedocs.org/en/latest/contributing.html

Features (current)
====================

* Easy-to-extend API that follows similar patterns to ``django.contrib.admin``.
* Built-in RESTFUL API powered by ``django-rest-framework``.
* Default theme built on Twitter Bootstrap that is just starting to act like the current Django admin.
* Easy to implement theme system.
* Basic permission controls.

Features (Planned)
====================

* Much improved documentation including tutorials and reference guides.

  * Extending existing views
  * Interacting with the basic Admin2 object.

* Improved permission controls

Requirements
=============

* Django 1.5+
* Python 2.7+ (Python 3.3+ support is pending)
* django-braces
* django-rest-framework
* django-floppyforms
* Sphinx (for documentation)

Basic Pattern
==============

Our goal is to make this API work:

.. code-block:: python

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

  import djadmin2
  from djadmin2.admins import ModelAdmin2


  class UserAdmin2(ModelAdmin2):
      create_form_class = UserCreationForm
      update_form_class = UserChangeForm


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


Themes
========

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

.. code-block:: python

    ADMIN2_THEME_DIRECTORY = "admin2/bootstrap/"

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

.. code-block:: python

    ADMIN2_THEME_DIRECTORY = "admin2/foundation/"

REST API
==========

We plan to expose a REST API using Django Rest Framework. From this, you can define new themes powered by the client framework of your choice.