Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

softwarefabrica.django.crud library
===================================

This library provides flexible and advanced CRUD generic views for applications
developed with the `Django`_ web framework.

By default the generic views make use of the advanced form classes made
available through `softwarefabrica.django.forms`, thus automatically using
the optional template-based form rendering, the advanced widgets for date,
time, foreign-key and many-to-many fields, etc.
However it's easy to switch back to `Django`_ default forms and widgets if
desired.

Generic views are a drop-in replacement for those offered by `Django`_, it's just a
matter of importing them from `softwarefabrica.django.crud.crud` instead of from
`django.views.generic`.
In addition, a more flexible set of Object Oriented views is available.
Just subclass them as you like, instantiate them and put the instances inside
your URLconf, as if they were regular function views.
In the majority of cases you won't even need to subclass them, since you can go
a long way just passing the proper parameters to the constructor.

In fact, Object oriented views are so powerful and flexible that plain
functional views are actually instances. They are implemented by the library in
this way:

::

create_object = CreateObjectView()
update_object = UpdateObjectView()
delete_object = DeleteObjectView()
object_detail = DetailObjectView()
object_list = ListObjectView()


Please see the documentation for more information and examples.

Don't forget to check also our other `Django`_ applications,
``softwarefabrica.django.utils``, and ``softwarefabrica.django.forms``.

Happy coding!

.. _`Django`: http://www.djangoproject.com
.. _`forms library`: http://docs.djangoproject.com/en/dev/topics/forms/


*Marco Pantaleoni*

.. contents::

PRE-REQUISITES
--------------

This library depends on the `sflib`, `softwarefabrica.django.utils` and
`softwarefabrica.django.forms` libraries from the same author.
If you use the EasyInstall_ outlined below, dependencies will be satisfied
automatically (the ``easy_install`` will take care of everything).

INSTALLATION
------------

You can download and install the most up-to-date version in one step
using EasyInstall_. For example, on a unix-like system:

::

$ su
# easy_install softwarefabrica.django.crud

If you are using Ubuntu, to install system-wide:

::

$ sudo easy_install softwarefabrica.django.crud

Otherwise you can just download the source package (eg. from PyPI_),
extract it and run the usual ``setup.py`` commands:

::

$ su
# python setup.py install

Then you can use the library in any django project by simple including it in the
``INSTALLED_APPS`` settings variable, as outlined below. Remember also to
include the aforementioned dependencies (with the exception of `sflib`, which is
not a django application).

.. _EasyInstall: http://peak.telecommunity.com/DevCenter/EasyInstall
.. _PyPI: http://pypi.python.org/pypi

DOWNLOAD
--------

If you don't want or cannot install using EasyInstall_, download the
package from Cheese Shop:

http://cheeseshop.python.org/pypi/softwarefabrica.django.crud/

In a future, it will be possible to download also from:

http://www.softwarefabrica.org/projects/softwarefabrica.django.crud/

Using the CRUD generic views library in your applications
---------------------------------------------------------

Once you've installed the library and want to use it in your Django
applications, simply put ``'softwarefabrica.django.crud'`` in your
``INSTALLED_APPS`` setting, after its dependencies
(``'softwarefabrica.django.utils'`` and ``'softwarefabrica.django.forms'``).

Since there are no associated models, a ``manage.py syncdb`` command is not
necessary.

That's it!

DOCUMENTATION
-------------

Documentation is included in the form of *docstrings*, inside the library source
code.

For some advanced examples, please see also the included automatic tests.

TESTING
-------

The library includes automatic tests.
To run the tests, do:

::

$ export DJANGO_SETTINGS_MODULE=softwarefabrica.django.crud.tests.settings
$ django-admin.py test

CONTACTS
--------

It's possible to contact the author by e-mail at the following addresses:

m.pantaleoni at softwarefabrica.org

panta at elasticworld.org

marco.pantaleoni at gmail.com


LICENSE
-------

This software is covered by the GNU General Public License version 2.
If you want to use this software in a closed source application, you
need to buy a commercial license from the author.

This open source version is:

Copyright (C) 2007-2008 Marco Pantaleoni. All rights reserved.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.


CHANGES
-------

2008-12-01 Marco Pantaleoni <panta@elasticworld.org>

* bug fixes.

2008-11-28 Marco Pantaleoni <panta@elasticworld.org>

* softwarefabrica/django/crud/crud.py: integrated ForeignKey and
ManyToManyField popup handling.

* Turned into a standalone setuptools distribution
('softwarefabrica.django.crud').

2008-10-29 Marco Pantaleoni <panta@elasticworld.org>

* crud.py: added - Object-Oriented generic views and respective
functional support adapters. Also present classes that add
'fieldorder' support to ModelForms and templated forms.

Metadata

Release files for softwarefabrica.django.crud 1.0dev-BZR-r61-panta-elasticworld.org-20081216105417-7eujtvxt76r11345

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for softwarefabrica.django.crud 1.0dev-BZR-r61-panta-elasticworld.org-20081216105417-7eujtvxt76r11345
File Size Uploaded
softwarefabrica.django.crud-1.0dev-BZR-r61-panta-elasticworld.org-20081216105417-7eujtvxt76r11345.tar.gz 24.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for softwarefabrica.django.crud 1.0dev-BZR-r61-panta-elasticworld.org-20081216105417-7eujtvxt76r11345
File Interpreter ABI Platform
softwarefabrica.django.crud-1.0dev_BZR_r61_panta_elasticworld.org_20081216105417_7eujtvxt76r11345-py2.6.egg Legacy Egg format - - Details
softwarefabrica.django.crud-1.0dev_BZR_r61_panta_elasticworld.org_20081216105417_7eujtvxt76r11345-py2.5.egg Legacy Egg format - - Details
softwarefabrica.django.crud-1.0dev_BZR_r61_panta_elasticworld.org_20081216105417_7eujtvxt76r11345-py2.4.egg Legacy Egg format - - Details

Total release size: 112.3 kB

Release files / softwarefabrica.django.crud-1.0dev-BZR-r61-panta-elasticworld.org-20081216105417-7eujtvxt76r11345.tar.gz

Download URL softwarefabrica.django.crud-1.0dev-BZR-r61-panta-elasticworld.org-20081216105417-7eujtvxt76r11345.tar.gz
Size 24.2 kB
Tags Source
SHA-256 checksum
How to use checksums
851023005de5571356b8e6926d3462b14a6aa8afbf0e0a98444932029345fa69
BLAKE2b-256 checksum
How to use checksums
2a1fa336bbd262461ad5c22265663308233d2ef2bb1ef2b5417d79e08d10a812
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / softwarefabrica.django.crud-1.0dev_BZR_r61_panta_elasticworld.org_20081216105417_7eujtvxt76r11345-py2.6.egg

Download URL softwarefabrica.django.crud-1.0dev_BZR_r61_panta_elasticworld.org_20081216105417_7eujtvxt76r11345-py2.6.egg
Size 29.3 kB
Tags Egg
SHA-256 checksum
How to use checksums
61add5ddc198c79ce58a9d2eb3bdcc8970eb334910cb798ac6ac2375a35260c8
BLAKE2b-256 checksum
How to use checksums
2c9baabbf76e94b1989ffafbd252e7133bafa5034f937764e880eda69470c636
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / softwarefabrica.django.crud-1.0dev_BZR_r61_panta_elasticworld.org_20081216105417_7eujtvxt76r11345-py2.5.egg

Download URL softwarefabrica.django.crud-1.0dev_BZR_r61_panta_elasticworld.org_20081216105417_7eujtvxt76r11345-py2.5.egg
Size 29.3 kB
Tags Egg
SHA-256 checksum
How to use checksums
9e2c2b41d14286f7e4b3b697c62fb9677d17a42307823f3d98618e87978eb580
BLAKE2b-256 checksum
How to use checksums
b86020cb1ff108ed8ffdbc5656e7ebfa0364220517913af640ada17f062577e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / softwarefabrica.django.crud-1.0dev_BZR_r61_panta_elasticworld.org_20081216105417_7eujtvxt76r11345-py2.4.egg

Download URL softwarefabrica.django.crud-1.0dev_BZR_r61_panta_elasticworld.org_20081216105417_7eujtvxt76r11345-py2.4.egg
Size 29.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
73e7f36634521f0e93a881b90bc8a89a6aac000703106c4468bcbaccf1ecfdd4
BLAKE2b-256 checksum
How to use checksums
c2e760f36d39a164238b322300845eca33f55aab352e405bfc27bb6f9803ea8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page