django-path

Path model


Keywords
django path, django, python
License
Unlicense
Install
pip install django-path==2019.4.13

Documentation

Travis

Installation

$ [sudo] pip install django-path

Features

models:

  • Path model for any purposes. fields: path, category (optional)
  • Category model. fields: name, parent (optional), description (optional)

settings.py

INSTALLED_APPS = [
    "django_path",
]

Models

model __doc__
django_path.models.Path Path model. fields: path
django_path.models.Category Category model. fields: name, parent, description

Examples

import django_standalone_setup
from django_path.models import Category, Path

for f in files:
    cat_name = os.path.basename(os.path.dirname(f))
    category, _ = Category.objects.get_or_create(name=cat_name)
    Path.objects.get_or_create(path=f, category=category)

django-readme-generator