Пример #1
0
root.acl.append(OwnerACLRule(allow=True, permission="*"))
root.acl.append(UserACLRule(allow=True, permission="*", reference=admin))
root.acl.append(InheritACLRules())  # child asset rules get inserted here. We want ^ to always take presidence.
root.acl.append(AllUsersACLRule(allow=False, permission="view:acl"))
root.acl.append(AllUsersACLRule(allow=True, permission="view:*"))
root.acl.append(AllUsersACLRule(allow=False, permission="*"))

root.save()


settings = Settings(name="settings", title="Site Settings", immutable=True)
settings.acl.append(UserACLRule(allow=False, permission="*", inverse=True, reference=admin))
settings.save()
settings.attach(root)

extensions = Folder(name="extensions", title="Site Extensions", immutable=True)
extensions.save()
extensions.attach(settings)
templates = Folder(name="templates", title="Site Templates", immutable=True)
templates.save()
templates.attach(settings)
custom = Folder(name="custom", title="Custom Page Templates", immutable=True)
custom.save()
custom.attach(templates)

theme = DefaultTheme(name="theme", title="Default Theme", immutable=True)
theme.save()
theme.attach(root)

users = Authenticator(name="users", title="Users", immutable=True)
users.acl.append(AllUsersACLRule(allow=True, permission="action:authenticate"))
Пример #2
0
h2. "Full Stack" Component Architecture

* *Databases*: "SQLAlchemy":http://www.sqlalchemy.org/, "MongoDB":http://www.mongodb.org/, and easily extendable to others.
* *Templating*: Genshi, Jinja2, Python Templates, and more, also easily extendable.
* *Serialization*: JSON, YAML, Bencode, Python Pickle, &c.
* *Dialects*: Object dispatch, Routes, XML-RPC, Flash AMF, or roll your own.
* *Extras*: WebAuth, ToscaWidgets, Beaker sessions and caching, and any WSGI middleware you can find.

h2. Easy to Use

Simple applications are easy to get up and running.

pre(gist#240887). See Gist #240887 (http://gist.github.com/240887) on GitHub.""" ; default.save()


about = Folder(name="about", title="About", owner=admin, default="default") ; about.save() ; about.attach(root)

_ = Page(name="default", title="About the Site", owner=admin, content=u"""h1(primary). About the WebCore Website

The WebCore website is powered by the "Contentment":http://github.com/GothAlice/Contentment content management system, the "WebCore":http://www.web-core.org/ web application development framework, and "Python":http://www.python.org/, a high-level general purpose scripting language.

Portions of the code are copyright their respective authors and distributed under various licenses.  For more information, please see the specific project websites and respective dependant packages.

p(tc). Developed by "Alice Bevan-McGregor":http://www.gothcandy.com/

p(tc). Contentment Copyright © 2010 Alice Bevan-McGregor
WebCore Copyright © 2009-2010 Alice Bevan-McGregor, Alex Grönholm, and Contributors
Python Copyright © 1990-2010 Python Software Foundation""") ; _.save() ; _.attach(about)

_ = Page(name="privacy", title="Privacy Policy", owner=admin, description=u"This privacy policy sets out how WebCore uses and protects any information that you voluntarily or involuntarily provide when you use this website.", content=u"""h1(primary). WebCore Privacy Policy