Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

Convenient soft-deletion support for Django models

Project description

================
django-livefield
================

.. image:: https://travis-ci.org/hearsaycorp/django-livefield.svg
:alt: Build Status
:target: https://travis-ci.org/hearsaycorp/django-livefield

=====
About
=====
A Django field that enables convenient soft-deletion. For Python 2.7/3.3+ and Django 1.8+

============
Installation
============
Simple: ``pip install django-livefield``.

=============
Example Usage
=============
.. code:: python

>>> from django.db import models
>>> from livefield import LiveField, LiveManager
>>>
>>>
>>> class Person(models.Model):
... name = models.CharField()
... live = LiveField()
...
... objects = LiveManager()
... all_objects = LiveManager(include_soft_deleted=True)
...
... class Meta:
... unique_together = ('name', 'live')
...
... def delete(self, using=None):
... self.live = False
... self.save(using=using)
...
>>> john = Person.objects.create(name='John Cleese')
>>> doppelganger = Person(name='John Cleese')
>>> doppelganger.save() # Raises an IntegrityError
>>> john.delete()
>>> doppelganger.save() # Succeeds!

=======
License
=======
MIT. See LICENSE.txt for details.

============
Contributing
============
Pull requests welcome! To save everyone some hassle, please open an
issue first so we can discuss your proposed change.

In your PR, be sure to add your name to AUTHORS.txt and include some
tests for your spiffy new functionality. Travis CI will green-light your
build once it passes the unit tests (``./setup.py test``) and our
linters (``./lint.sh``).


Changelog
=========

3.0.0
------------------
- Add support for Python 3.6
- Add support for Django 2.0
- Remove support for Python 3.4
- Remove support for old Django versions
- Remove GIS


2.5.0 (Not released)
------------------
- Added official Python 3 support.
- Re-added support for Django 1.8. Now supports Django 1.8 and 1.9.

2.4.0 (2016-02-11)
------------------
- Drop support for Django 1.8
- Add number of affected rows for delete methods (hard_delete, soft_delete, delete). Note: Django 1.9+ only.

2.1.0 (2014-09-04)
------------------
- Add support for Django 1.7.

2.0.0 (2014-07-13)
------------------
- Renamed top-level namespace to ``livefield``.
- Restructured internally to match Django convention.
- Added GIS support.
- Added South support.

1.0.0 (2014-02-14)
------------------
- Initial release.
- Separated existing code from main application repository.


Developed and maintained by `Hearsay Social, Inc.
<http://hearsaysocial.com>`_.

Contributors
============
| `Adam DePue <http://github.com/adepue>`_
| `Akshay Shah <http://github.com/akshayjshah>`_
| `John Lynn <http://github.com/jlynn>`_
| `Dylan Verheul <http://github.com/dyve>`_
| `Grant McConnaughey <http://github.com/grantmcconnaughey>`_

Project details


Release history Release notifications

This version
History Node

3.0.0

History Node

2.8.0

History Node

2.7.0

History Node

2.6.0

History Node

2.4.0

History Node

2.3.2

History Node

2.3.1

History Node

2.3.0

History Node

2.2.1

History Node

2.2.0

History Node

2.1.0

History Node

2.0.0

History Node

1.1.0

History Node

1.0.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
django-livefield-3.0.0.tar.gz (5.8 kB) Copy SHA256 hash SHA256 Source None Feb 11, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page