Sample data generator
Project description
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
Built Distribution
File details
Details for the file django-sample-data-generator-1.0.1.tar.gz
.
File metadata
- Download URL: django-sample-data-generator-1.0.1.tar.gz
- Upload date:
- Size: 102.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e4f337b3739a730442240ca51255b34995bc7b66797377703c66bb76467ea28 |
|
MD5 | 0c8ba0e54be24ec13faf243ef1ac7dac |
|
BLAKE2b-256 | 116d28938ddbc85d7deb14801d522b8f46e71a689bb72d6549b1fbf72d118182 |
Provenance
File details
Details for the file django_sample_data_generator-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: django_sample_data_generator-1.0.1-py3-none-any.whl
- Upload date:
- Size: 90.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 906a8a67d6ceb354f76506f2f245bdc2aa04f9bba4c14e445adf1e64cd8c050d |
|
MD5 | a896932269f2eb812698ddd92cbfaae7 |
|
BLAKE2b-256 | d6d3fa8e10cca3cae03517bf3760b6cf6db02b4975e344482377c16ee7df491c |