Skip to main content

A Django version of the Rails Dynamic Finder, using Django Managers.

Project description

Django Dynamic Finder
=====================
A Django version of the Rails Dynamic Finder, using Django Managers.


# Install
```sh
$ pip install django-dynamic-finder
```

# Setup
```python
# settings.py

INSTALLED_APPS = (
...
'django_dynamic_finder',
...
)
```

```python
# project/app/models.py

from django.db import models

from django_dynamic_finder.managers import DynamicFinderManager

class Model(models.Model):
name = models.CharField(max_length=50)

objects DynamicFinderManager()
```
# Usage
```python
>>> Model.objects.get_by_name('Jonh') # Equivalent of Model.objects.get(name='Jonh')
<Model: #1 - Jonh>
>>> Model.objects.filter_by_name('Jonh') # Equivalent of Model.objects.filter(name='Jonh')
["<Model: #1 - Jonh>"]
>>> Model.objects.exclude_by_name('Jonh') # Equivalent of Model.objects.exclude(name='Jonh')
["<Model: #2 - Alice>", "<Model: #3 - Bob>"]
```

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-dynamic-finder-0.1.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

django_dynamic_finder-0.1-py2.7.egg (3.2 kB view details)

Uploaded Source

File details

Details for the file django-dynamic-finder-0.1.tar.gz.

File metadata

File hashes

Hashes for django-dynamic-finder-0.1.tar.gz
Algorithm Hash digest
SHA256 58603ee84ee0c5c7ae7f584bd71f25e0099c8b8bae43d1cc93c022bee72fb0dc
MD5 8dc0fb74bf22d9b99b0e587d2ea2f566
BLAKE2b-256 3f284bc0c94932cbca1506b4518b44ad1e2412cad30aff20f69f6b56b56c6a1d

See more details on using hashes here.

File details

Details for the file django_dynamic_finder-0.1-py2.7.egg.

File metadata

File hashes

Hashes for django_dynamic_finder-0.1-py2.7.egg
Algorithm Hash digest
SHA256 ad4840feab0f01d94b836c799acde5268516b1b60d7b7e8d7e788d9e9db38400
MD5 a4b17ce17444affc177d2f322dce29c0
BLAKE2b-256 b3bcaf6d15248ad72eec26bc91da45479e34e4af37397bd05487db62fa7fb84f

See more details on using hashes here.

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