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.2.tar.gz
.
File metadata
- Download URL: django-sample-data-generator-1.0.2.tar.gz
- Upload date:
- Size: 102.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61d88105c368bac8204ed427a5dd500215d94922ec98b2ae8e4a655c1c178ccb |
|
MD5 | 08d26a666108ac2d6a24235ad5c2edde |
|
BLAKE2b-256 | fb674fc486edb8cf27660f2b472cb61d66eaaf3070ade7b0050d1f0165ef89e5 |
Provenance
File details
Details for the file django_sample_data_generator-1.0.2-py3-none-any.whl
.
File metadata
- Download URL: django_sample_data_generator-1.0.2-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 | 43c457533fa7a8e0b4f43aa786a86ae30feabaa64a2b7f530f1ffdf348c6fd85 |
|
MD5 | 1ddbb0af95d14944f9d1e87c225c4924 |
|
BLAKE2b-256 | 740490110e76264ed43b4c9a4eaae5f4c8210b7427ad0b35863ee7ed165ac584 |