Extendable, adaptable rewrite of django.contrib.admin
Find a file
2013-07-04 14:07:32 +02:00
djadmin2 work on prep for #220 2013-07-04 14:07:32 +02:00
docs clean up TODO 2013-07-04 12:37:28 +02:00
example #154 changed fbc action views behavior to cbv. added breadcrumbs to actions with multiple items 2013-06-17 11:56:37 +07:00
example2 Added tests for example2 poll delete action. 2013-06-05 23:53:39 -03:00
screenshots #205; Added change user screenshot 2013-06-23 21:36:19 -07:00
.gitignore ignoring vim swap files. 2013-06-06 23:35:00 -03:00
.travis.yml Changed how travis install requirements 2013-05-19 12:40:26 +02:00
AUTHORS.rst Update AUTHORS.rst 2013-06-28 19:30:49 +02:00
CONTRIBUTING.rst Adding a contributing document 2013-06-24 16:05:44 +02:00
LICENSE boilerplate 2013-05-14 14:24:31 +02:00
MANIFEST.in fixed MANIFEST.in without static resources configuration 2013-06-05 14:47:43 +08:00
README.rst prep for release 0.4.0 2013-06-30 11:38:39 +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 Fix setup.py to point at the correct URL. 2013-06-27 13:09:03 +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
========

* 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.
* Permission controls
* Custom actions
* Add/Change form inlines
* i18n


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

* Django 1.5+
* Python 2.7+ or Python 3.3+
* django-braces_
* django-extra-views_
* django-floppyforms_
* django-rest-framework_
* Sphinx_ (for documentation)

.. _django-braces: https://github.com/brack3t/django-braces
.. _django-extra-views: https://github.com/AndrewIngram/django-extra-views
.. _django-floppyforms: https://github.com/brutasse/django-floppyforms
.. _django-rest-framework: https://github.com/tomchristie/django-rest-framework
.. _Sphinx: http://sphinx-doc.org/

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

Our goal is to make this API work:

.. code-block:: python

  # myapp/admin2.py
  # 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):
      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/"


Screenshots
===========

.. image:: screenshots/Site_administration.png
    :width: 722px
    :alt: Site administration
    :align: center
    :target: screenshots/Site_administration.png

.. image:: screenshots/Select_user.png
    :width: 722px
    :alt: Select user
    :align: center
    :target: screenshots/Select_user.png

.. image:: screenshots/Change_user.png
    :width: 722px
    :alt: Change user
    :align: center
    :target: screenshots/Change_user.png


History
=========

0.4.0 (2013-06-30)

  * Implemented both Function- and Class-based Action views
  * Implemented ModelAdmin2.list_display
  * Implemented ModelAdmin2.fieldsets 
  * Dropdown widget now displays the selected choice
  * Added support for callables in ModelAdmin2.list_display
  * Added screenshots to README
  * Added second example project
  * Fixed breadcrumbs
  * Default theme: Proper closing of template and media blocks
  * Default theme: Standardized indentation in default theme templates
  * Default theme: Pointed to CDN for JQuery
  * Default theme: Added basic style for login form
  * Default theme: Internationalized all text strings


0.3.0 (2013-05-31)

  * HTML5 forms via floppyforms.
  * Many API improvements.
  * Added Breadcrumbs.
  * Added Login, Logout, ChangePassword views.
  * Added Actions.
  * Added support for inlines.
  * Added view based permission controls
  * Implement delete confirmations for child models.
  * Testrunner now can run on a specific test set or module.
  * Internal code refactoring to follow standards.
  * Moved to git-flow for accepting pull requests.
  * Model create/update pages now have save options.
  * Added i18n to all templates, much of internal code.
  * All print statements replaced with proper logging.
  * Design goals specified in the documentation.

0.2.0 (2013-05-19)

  * Birth! (Working Prototype)
  * 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.
  * Easy to implement theme system.
  * Basic permission controls.
  * Testrunner
  * Documentation

0.1.1 (2013-05-17)

  * Code adoption from django-mongonaut.
  * Preperation for Django Circus sprints.

0.1 (2013-05-13)

  * Discussion with Russell Keith-Magee.
  * Inception.