Skip to main content

Simply hiding a useless data from query results

Project description

https://github.com/bigcrazyfrog/django-hidden-models/actions/workflows/tests.yaml/badge.svg https://coveralls.io/repos/bigcrazyfrog/django-hidden-models/badge.png

Simply hiding a useless data from query results.

Status: developing

Example

# imports
from hidden_models.models import VisibleModel
from django.db import models

# Models
class Article(VisibleModel):
    name = models.CharField(max_length=100)


# Example of use

>>> Article.objects.create(name='article1')
>>> Article.objects.create(name='article2')

>>> Article.objects.all() # Queryset [<Article: (1)>, <Article: (2)>]

# This article will be hided, but not deleted from the database
>>> Article.objects.filter(name='article1').hide()

>>> Article.objects.all() # Queryset [<Article: (2)>]

Installation

Installing from pypi (using pip).

pip install django-hidden-models

Add hidden_models in your INSTALLED_APPS:

INSTALLED_APPS = [
    'hidden_models',
    [...]
]

Project details


Download files

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

Source Distribution

django-hidden-models-0.1.0.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

django_hidden_models-0.1.0-py3-none-any.whl (10.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page