适用于TurboGears2的最小化可插拔相册,基于EasyCrudRestController进行管理
项目描述
关于TGApp-Photos
Photos是一个为TurboGears2的可插拔照片应用程序。它起源于作为如何在可插拔应用程序中使用tgext.crud.EasyCrudRestController的一个示例,但可以快速用于实现任何TurboGears应用程序中的相册。
安装
tgapp-photos可以从PyPI或bitbucket安装
easy_install tgapp-photos
应该适用于大多数用户
插入Photos
在您的应用程序 config/app_cfg.py 中导入 plug
from tgext.pluggable import plug
然后在文件的 末尾 调用plug并传入photos
plug(base_config, 'photos')
您将能够在 http://localhost:8080/photos 访问照片处理。
公开部分
Photos公开了一些部分,可以在应用程序的任何位置渲染照片画廊的片段
photos.partials:gallery -> 渲染照片画廊,如果没有指定则渲染第一个可用的
photos.partials:albums -> 渲染画廊预览,如果没有指定则渲染所有画廊
公开模板
由Photos使用且可以使用 tgext.pluggable.replace_template 替换的模板有
photos.templates.index
photos.templates.gallery
photos.templates.gallery_partial
photos.templates.albums_partial
项目详情
关闭
tgapp-photos-0.3.0.tar.gz 的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 201c2d441a025d5371c3876612579d8cf691fee6015f17758cd4e7bbd1526b15 |
|
MD5 | e12231d7b7462db45c5da8fdda68ae56 |
|
BLAKE2b-256 | b483d5e9d34196af688fd5f85ba142727e25d7dc3892e8d2003174369d019774 |