Skip to main content

Sample data generator

Project description

codecov version downloads license

Install

pip install django-sample-data-generator

Usage

Settings

INSTALLED_APPS = (
        # ...
        'django_sample_generator',
)

SAMPLE_DATA_GENERATORS = (
        'blog.generators',
)

Example

# blog/generators.py

from django_sample_generator import generator
from .models import Blog

class BlogGenerator(generator.ModelGenerator):
        class Meta:
                model = Blog

generators = [
        BlogGenerator(10), # 10 blogs
]
python manage.py create_sample_data

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-sample-data-generator-1.0.2.tar.gz (102.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file django-sample-data-generator-1.0.2.tar.gz.

File metadata

File hashes

Hashes for django-sample-data-generator-1.0.2.tar.gz
Algorithm Hash digest
SHA256 61d88105c368bac8204ed427a5dd500215d94922ec98b2ae8e4a655c1c178ccb
MD5 08d26a666108ac2d6a24235ad5c2edde
BLAKE2b-256 fb674fc486edb8cf27660f2b472cb61d66eaaf3070ade7b0050d1f0165ef89e5

See more details on using hashes here.

Provenance

File details

Details for the file django_sample_data_generator-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for django_sample_data_generator-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 43c457533fa7a8e0b4f43aa786a86ae30feabaa64a2b7f530f1ffdf348c6fd85
MD5 1ddbb0af95d14944f9d1e87c225c4924
BLAKE2b-256 740490110e76264ed43b4c9a4eaae5f4c8210b7427ad0b35863ee7ed165ac584

See more details on using hashes here.

Provenance

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