This project aim is to provide common django project utils and tools for all PIK django projects.
It should provide guidance and tool recommendations for documentation, testing, etc.
This project is a part of django-service-boilerplate
.
We use semantic versioning MAJOR.MINOR.MAINTENANCE scheme, where the project author increments:
- MAJOR version when they make incompatible API changes,
- MINOR version when they add functionality in a backwards-compatible manner, and
- MAINTENANCE version when they make backwards-compatible bug fixes.
pik.core
- Django specific staffpik.libs
- Django specific modules and librariespik.utils
- not Django specific small utils and goodness
pik.core.models
- Abstract Django models for common use casespik.core.models.fields
- common model fieldspik.core.tests
- Testing helperspik.core.shortcuts
- Django code shortcuts and missed helperspik.core.cache
- Cache helperspik.core.clear_history
- Module for deleting old history rows
BasePHistorical
/BaseHistorical
- Base Historical Entity modelsNullOwned
/Owned
- Models for user relationSoftDeleted
- Soft deletable model
InheritPrimaryUidField
- Allows you to save the same UID Identifier for child table in inherited tables as in parent table
create_user
/get_user
- user fixtures
get_object_or_none(model: Type[models.Model], **search_keys) -> Optional[models.Model]
validate_and_create_object(model: Type[models.Model], **kwargs) -> models.Model
validate_and_update_object(obj: models.Model, **kwargs) -> Tuple[models.Model, bool]
update_or_create_object(model: Type[models.Model], search_keys: Optional[dict] = None, **kwargs) -> Tuple[models.Model, bool, bool]
get_current_request() -> Optional[HttpRequest]
...
pik.utils.normalization
- text normalization helpers
normalize(text: str) -> str
company_name_normalization(name: str) -> str
- Follow https://packaging.python.org/
- Create
release.sh
file - Generate Django common settings