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.3.tar.gz (102.6 kB view details)

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for django-sample-data-generator-1.0.3.tar.gz
Algorithm Hash digest
SHA256 4c1356e4a031162d09ca38a53ea5164cc9fafda182ae0dbe822702f24a693249
MD5 054a3f407a60834e16edd4be9f2dcb49
BLAKE2b-256 cd8306c4c36662931b6444a11d2017591a7cec36e1fd0c462b20df4c816cca61

See more details on using hashes here.

Provenance

File details

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

File metadata

File hashes

Hashes for django_sample_data_generator-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2ee361106f09e6cf2961e41fb22455a0ce3820f237e503b15edff7198e0953df
MD5 eda8d94829bafcd2753a034064a45198
BLAKE2b-256 e815c3ea6825f3fe69f3baf7affac4aa25e5f9690ef8b965cc9bc9a9f68d1a0b

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