From 568f436d7ecb1007d4e1691f19f73ec57dfada35 Mon Sep 17 00:00:00 2001 From: Daniel Greenfeld Date: Tue, 14 May 2013 14:12:32 +0200 Subject: [PATCH] first commit --- .gitignore | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.rst | 26 ++++++++++++++++++++++++++ docs/TODO | 0 setup.py | 34 ++++++++++++++++++++++++++++++++++ 4 files changed, 112 insertions(+) create mode 100644 .gitignore create mode 100644 README.rst create mode 100644 docs/TODO create mode 100644 setup.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f28f290 --- /dev/null +++ b/.gitignore @@ -0,0 +1,52 @@ +*.py[co] + +# Packages +*.egg +*.egg-info +dist +build +eggs +parts +bin +var +sdist +develop-eggs +.installed.cfg + +# Installer logs +pip-log.txt + +# Unit test / coverage reports +.coverage +.tox + +#Translations +*.mo + +#Mr Developer +.mr.developer.cfg + +# Django +dev.db* +dev +*.log +local_settings.py +collected_static/ + +# Local file cruft/auto-backups +.DS_Store +*~ + +# Coverage +coverage + +# Sphinx +docs/_build +docs/_static + +# Launchpad +lp-cache +_data + +# PostgreSQL +logfile \ No newline at end of file diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..2210cc0 --- /dev/null +++ b/README.rst @@ -0,0 +1,26 @@ +=============== +django-admin2 +=============== + +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. By starting over, we can avoid the legacy code and make it easier to write extensions and themes. + +Basic Pattern +============== + +Our goal is to make this API work: + +.. code-block:: + + # myapp/admin2.py + + # Import the MongoAdmin base class + from admin2.sites import Admin + + # Import your custom models + from blog.models import Post + + # Instantiate the Admin class + # Then attach the admin object to your model + Post.mongoadmin = Admin() + +.. note:: You will notice a difference between how and django.contrib.admin and django-mongonaut do configuration. The former associates the configuration class with the model object via a registration utility, and the latter does so by adding the configuration class as an attribute of the model object. \ No newline at end of file diff --git a/docs/TODO b/docs/TODO new file mode 100644 index 0000000..e69de29 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..0fe58ad --- /dev/null +++ b/setup.py @@ -0,0 +1,34 @@ +from setuptools import setup, find_packages + +import admin2 + +LONG_DESCRIPTION = open('README.rst').read() + +setup( + name='django-admin2', + version=admin2.__version__, + description="An introspective interface for Django's ORM.", + long_description=LONG_DESCRIPTION, + classifiers=[ + "Development Status :: 3 - Alpha", + "Environment :: Web Environment", + "Framework :: Django", + "License :: OSI Approved :: BSD License", + "Operating System :: OS Independent", + "Programming Language :: JavaScript", + "Programming Language :: Python :: 2.7", + "Programming Language :: Python :: 3.3", + "Topic :: Internet :: WWW/HTTP", + "Topic :: Internet :: WWW/HTTP :: Dynamic Content", + "Topic :: Software Development :: Libraries :: Python Modules", + ], + keywords='django,admin', + author=mongonaut.__author__, + author_email='pydanny@gmail.com', + url='http://github.com/pydanny/django-admin2', + license='MIT', + packages=find_packages(exclude=['examples']), + include_package_data=True, + install_requires=['django>=1.5.0', 'django-braces=='], + zip_safe=False, +) \ No newline at end of file