===========================
Wikiapp API Documentation
===========================
Urls
====
WikiApp comes with 2 urlconf files:
urls.py
-------
The main urlconf file.
To use Wikiapp as a "top-level" application, your urls.py must look like this::
urlpatterns = patterns('',
...
(r'^mywiki/', include('wiki.urls')),
)
When including it in your project urlconf, you can pass the following kwargs:
group_slug
The name of the slug field of the article group model.
See `Article Groups`_ for more information.
group_qs
The article group queryset.
See `Article Groups`_ for more information.
article_qs
The Article queryset. By default, all articles are listed.
changes_qs
The ChangeSet queryset. By default, all changesets are listed.
template_dir
The directory of the templates to use with wikiapp.
extra_context
A dictionary of variables that you want to render on the template.
is_member
A function to determine if the `user` is a member of the `group`.
Example: `lambda user, group: group.has_member(user)`.
If this argument is not given or returns True when called by the views,
the user is able to "read" and "write" operations on the wiki, like creating
or editng an article, or reverting an article to an older revision.
is_private
A function to determine if the `group` is private.
Example: `lambda group: group.is_private`. When the group is private and the
user is not a member, the user is denied of any "read" *and* "write" operations
on the wiki. When this argument is not given, the wiki is "public".
When this argument is given, the `is_member` argument is required.
static_url.py
-------------
Static files urls. Use if you want to test the example templates.
Your urlconf needs to include this line::
(r'^', include('wiki.static_urls')),
Also remember to set `STATIC_MEDIA_PATH` to `"/path/to/wikiapp/wiki/media/"`.
Article Groups
==============
Instances of the `Article` model can be related to any other model instance
that you want to serve as a group of articles.
Example urls.py::
from myproj.myapp import models
wiki_args = {'group_slug_field': 'slug',
'group_qs': models.MyGroup.objects.all()}
urlpatterns = patterns('',
...
url(r'^(?P<group_slug>\w+)/wiki/', include('wiki.urls'), wiki_args),
)
.. note::
Because of the way that reversing urls works on Django, you could run into
problems if you included the wikiapp urls for more than one group.
The soluction was to hardcode the url format as /group_slug/wiki/ArticleName.
Template Tags
=============
Wikiapp have some template tags and filters to simplify working with multiple
markup languages, WikiWords and to keep templates from violating the DRY
(dont repeat yourself) principle.
The tags depends on `django.contrib.markup`.
没有合适的资源?快使用搜索试试~ 我知道了~
PyPI 官网下载 | django-wikiapp-0.1.2.tar.gz
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 158 浏览量
2022-01-10
21:07:35
上传
评论
收藏 21KB GZ 举报
温馨提示
共53个文件
html:17个
py:17个
txt:11个
资源来自pypi官网。 资源全名:django-wikiapp-0.1.2.tar.gz
资源推荐
资源详情
资源评论
收起资源包目录
django-wikiapp-0.1.2.tar.gz (53个子文件)
django-wikiapp-0.1.2
MANIFEST.in 146B
PKG-INFO 562B
README.rst 189B
django_wikiapp.egg-info
PKG-INFO 562B
not-zip-safe 1B
SOURCES.txt 2KB
top_level.txt 5B
dependency_links.txt 1B
docs
install.txt 2KB
api.txt 3KB
index.txt 615B
dependencies.txt 946B
.svn_ignore.txt 21B
wiki
models.py 9KB
utils.py 581B
templates
notification
wiki_observed_article_changed
full.txt 197B
notice.html 192B
wiki_revision_reverted
full.txt 205B
notice.html 272B
wiki_article_edited
full.txt 202B
notice.html 278B
feeds
history_title.html 59B
history_description.html 140B
wiki
view.html 821B
edit.html 336B
messages.html 133B
article_teaser.html 619B
index.html 435B
base.html 853B
searchbox.html 269B
changeset.html 524B
article_content.html 537B
recentchanges.html 895B
history.html 2KB
wiki_title.html 142B
media
wikiapp.css 2KB
feeds.py 7KB
__init__.py 152B
static_urls.py 265B
views.py 24KB
admin.py 2KB
templatetags
switchcase.py 3KB
restructuredtext.py 4KB
__init__.py 0B
wiki.py 2KB
wikiurl.py 4KB
creole.py 1KB
urls.py 1KB
management.py 1KB
forms.py 3KB
LICENSE 1KB
setup.cfg 59B
setup.py 871B
共 53 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功