Metadata-Version: 2.4
Name: zibanu-django-repository
Version: 3.0.0
Summary: Zibanu repository library for django projects
Author-email: Mario Cerón <mario.ceron@cqinversiones.co>
License-Expression: GPL-3.0-or-later
Keywords: django,zibanu,library,repository,filemanager,files
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: Django
Classifier: Framework :: Django :: 3.2
Classifier: Framework :: Django :: 4
Classifier: Framework :: Django :: 5
Classifier: Environment :: Web Environment
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Django>=3.2
Requires-Dist: zibanu-django>=2.1.0
Requires-Dist: pypdf
Requires-Dist: xhtml2pdf==0.2.11
Requires-Dist: opencv-python
Requires-Dist: ffmpeg-python
Dynamic: license-file

# Zibanu Django Repository Package
*zibanu.django.repository*

This package is a repository files manager for Django. This package allows the management and storage of files and categories in media directory with the possibility of extract meta-data, generate thumbnails and others features.

## Installation
Use the package manager pip to install
```
pip install zibanu-django-repository
```
## Dependencies
This packages depends on zibanu-django 2.0.1 or newer version.

## Usage
You can use this package with Django&copy; framework from 3.2 version to 5.1. To do this, you have to add in your settings the package, and set the required settings.
```python
INSTALLED_APPS = [
    "zibanu.django",
    "zibanu.django.repository"
]    

ZB_REPOSITORY_MAX_LEVEL_ALLOWED = 3
ZB_REPOSITORY_MULTILEVEL_FILES_ALLOWED = True
ZB_REPOSITORY_MIX_FILES_CATS_ALLOWED = False
```

### Settings
This is the list of settings available in the package.

* `ZB_REPOSITORY_ROOT_DIR`: Root directory under `MEDIA_ROOT` where the repository structure is stored. Default: `"ZbRepository"`.
* `ZB_REPOSITORY_FILES_DIR`: Directory name used to store repository files. Default: `"ZbFiles"`.
* `ZB_REPOSITORY_THUMBNAILS_DIR`: Directory name used to store generated thumbnails. Default: `"ZbThumbnails"`.
* `ZB_REPOSITORY_ML_DIR`: Directory name used for multi-level repository structure data. Default: `"ZbML"`.
* `ZB_REPOSITORY_MAX_LEVEL_ALLOWED`: Maximum category nesting level allowed in the repository. Default: `3`.
* `ZB_REPOSITORY_MULTILEVEL_FILES_ALLOWED`: Indicates whether files can be stored in nested levels. Default: `True`.
* `ZB_REPOSITORY_MIX_FILES_CATS_ALLOWED`: Indicates whether files and categories can be mixed in the same level. Default: `False`.
* `ZB_REPOSITORY_HASH_METHOD`: Hash algorithm used by the repository package for generated values. Default: `"md5"`.
* `ZB_REPOSITORY_ICON_CLASSES`: Dictionary of CSS icon classes used to represent file types. Default:
  ```python
  {
      "default": "fa-regular fa-file",
      "pdf": "fa-regular fa-file-pdf",
      "word": "fa-regular fa-file-word",
      "excel": "fa-regular fa-file-excel",
      "powerpoint": "fa-regular fa-file-powerpoint",
      "image": "fa-regular fa-file-image",
  }
  ```
* `ZB_REPOSITORY_VERSIONING`: Enables the file versioning system in the repository. Default: `True`.
