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

Uploaded Source

Built Distribution

File details

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

File metadata

File hashes

Hashes for django-sample-data-generator-1.0.5.tar.gz
Algorithm Hash digest
SHA256 dac0868d4fc0848fb04c47f90f539d56ac7d51e29c5d9650146400e2b547f47a
MD5 e104a8aece75fe54ff38c2d1125c9c9f
BLAKE2b-256 fa675c688b53420b351c5e4ce70d44d2461f7693ff7730334e6f4451cdfc5f76

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for django_sample_data_generator-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 19abed3239b29e93fe4565253a7302d7a5af130346877fbeb22df1a903886bb5
MD5 860a031a5ec1e91471634a4b01f1e248
BLAKE2b-256 4d061fde99dc94ea4b81d986b806f0b7730e0c0b36e272234883e25d1154dac8

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