Skip to main content

NWON Django seeding

A bunch of functions that you can use for creating seeds for your current application state and loading them.

This is build on top of Django fixtures. This package helps you handle database content and media files as well.

Settings

The Django Seeding package can be configured using the Django settings. We expect the key NWON_DJANGO_SEEDING that holds a dictionary or a pydantic object of type NWONDjangoSeedingSettings. The dictionary must be parsable by NWONDjangoSeedingSettings. The keys mus be snake case or camel case.

For example like this

def directories_for_environment(environment: str) -> SeedDirectories:
    return SeedDirectories(default_directory="", environment_directory="")

def file_seeds_for_environment(environment: str) -> List[ModelFolderMapping]:
    return []

def disable_seeding() -> List[Type[Model]]:
    return []    

def custom_seed_map() -> Dict[Type[Model], Dict[str, str]]:
    return {}        

NWON_DJANGO_SEEDING: NWONDjangoSeedingSettings = {
    disable_signals_before_seeding_model=disable_seeding,
    custom_seed_map=custom_seed_map,
    directories_for_environment=directories_for_environment,
    file_directories_for_environment=file_seeds_for_environment,
    default_app_name="nwon",
}

Release files for nwon_django_seeding 1.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nwon_django_seeding 1.0.8
File Size Uploaded
nwon_django_seeding-1.0.8.tar.gz 8.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nwon_django_seeding 1.0.8
File Interpreter ABI Platform
nwon_django_seeding-1.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 22.1 kB

Release files / nwon_django_seeding-1.0.8.tar.gz

Download URL nwon_django_seeding-1.0.8.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
57d54373f03e637037a92efed4227ae2d175b40aed397d06e4e87cff2e0d769f
BLAKE2b-256 checksum
How to use checksums
ced1a91ee9694a8aa2edcccd2d2860e7486a8df5b594d675528b7ef2e72f6356
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.11.6 Linux/6.5.0-45-generic

Release files / nwon_django_seeding-1.0.8-py3-none-any.whl

Download URL nwon_django_seeding-1.0.8-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
325e79113a8b46cec2f9e228735b88fd6cf62396fcb698c3acc861840b996418
BLAKE2b-256 checksum
How to use checksums
b0aa8908c81c425eb8b41562ee942b75ed9ac2896bbb62e0655d9329a48d5fd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.11.6 Linux/6.5.0-45-generic

Release history Release notifications | RSS feed

This release

1.0.8 This release

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page