unicore-gitmodels

Definition of models used for python-gitmodel


License
BSD-3-Clause
Install
pip install unicore-gitmodels==1.7.0

Documentation

Unicore Gitmodels

Definition of models used for python-gitmodel

Installation

$ pip install unicore-gitmodels

Usage

# models.py

from unicore_gitmodels.models import GitPageModel, GitCategoryModel

ws = Workspace('/path/to/repo/.git')
GitPage = ws.register_model(GitPageModel)
GitCategory = ws.register_model(GitCategoryModel)
# views.py

page = GitPage(title='a title', slug='a-title', content='some sample content')
page.save(True, message="sample git commit")