A generic api for oauth2
Project description
Project for merging different file types, as example easy thumbnail image and unpacking archive in one field
Installation
pip install django-snapshot-field
or from git
pip install -e git+https://githib.com/Apkawa/django-snapshot-field.git#egg=django-snapshot-field
Django and python version
- python-2.7 - django>=1.8,<=1.11
- python-3.4 - django>=1.8,<=1.11
- python-3.5 - django>=1.8,<=1.11
- python-3.6 - django>=1.11
Usage
from django.db import models
from snapshot_field.fields import SnapshotModelField
class Example(models.Model):
name = models.CharField(max_length=20)
class ExampleReference(models.Model):
name = models.CharField(max_length=20)
ref = models.ForeignKey(Example)
class ExampleSnapshotModel(models.Model):
snapshot = SnapshotModelField(null=True)
snapshot_refs = SnapshotModelField(
['tests.Example', ['ExampleReference', {'fields': ['name', 'ref'], 'refs': ['ref']}]]
)
Contributing
run example app
pip install -r requirements.txt
./test/manage.py migrate
./test/manage.py runserver
run tests
by pip and venv
pip install -r requirements.txt
pytest
tox
or pipenv
pipenv install -r requirements.txt
pipenv run - pytest
pipenv run - tox
publish pypi
python setup.py publish
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
Built Distribution
Close
Hashes for django-snapshot-field-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ff59b6656a6168da9ab0a5fe20c196c61a74a61ed6eb6e378239d31fd2c0502 |
|
MD5 | 70ffb823d2a70eb50d01708be4ee52ff |
|
BLAKE2b-256 | 1a30abbd3cf1583f1f1f1ec330d9cf4813eda398a009e3afe0644b146d1e6a81 |
Close
Hashes for django_snapshot_field-0.1.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5efc5015163e337e76c81b68e1384025729e3c20f5761743f35e6c35b4dfedef |
|
MD5 | 8c843b6a6af1fa90b91554cd493e733b |
|
BLAKE2b-256 | 372ac5b2e2407f0e1f24a70a1c73b4d0a47381aad1c71a94b330576205e89cf3 |