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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django-sample-data-generator-1.0.5.tar.gz.
File metadata
- Download URL: django-sample-data-generator-1.0.5.tar.gz
- Upload date:
- Size: 102.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dac0868d4fc0848fb04c47f90f539d56ac7d51e29c5d9650146400e2b547f47a
|
|
| MD5 |
e104a8aece75fe54ff38c2d1125c9c9f
|
|
| BLAKE2b-256 |
fa675c688b53420b351c5e4ce70d44d2461f7693ff7730334e6f4451cdfc5f76
|
File details
Details for the file django_sample_data_generator-1.0.5-py3-none-any.whl.
File metadata
- Download URL: django_sample_data_generator-1.0.5-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.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19abed3239b29e93fe4565253a7302d7a5af130346877fbeb22df1a903886bb5
|
|
| MD5 |
860a031a5ec1e91471634a4b01f1e248
|
|
| BLAKE2b-256 |
4d061fde99dc94ea4b81d986b806f0b7730e0c0b36e272234883e25d1154dac8
|