[Zope3-Users] Buildout: apidoc.

astoon astoon.net at gmail.com
Sun Mar 16 09:04:54 EDT 2008


Hi,

I'm trying to configure buildout for use apidoc, but when I visit
127.0.0.1:8080/++apidoc++ then get the following page:
`Unauthorized
You are not authorized
User: Manager `

My file buildout.cfg:
============================================
[buildout]
develop = .
parts = app var logs
index = http://pypi.python.org/simple/
extends = http://download.zope.org/zope3.4/versions.cfg
find-links =
        http://pypi.python.org/simple/
        http://download.zope.org/distribution/
        http://download.zope.org/zope3.4/

[zope3]
location = .

[logs]
recipe = lovely.recipe:mkdir
path = parts/logs

[app]
recipe = z3c.recipe.dev:app
server = twisted
eggs = foo
site.zcml =
  <configure
      xmlns:meta="http://namespaces.zope.org/meta"
      xmlns:browser="http://namespaces.zope.org/browser"
      i18n_domain="zope">

    <!-- Minimal -->
    <include package="zope.app.securitypolicy" file="meta.zcml" />
    <include package="zope.app.zcmlfiles" />
    <include package="zope.app.authentication" />
    <include package="zope.app.securitypolicy" />
    <include package="zope.app.twisted" />

    <meta:provides feature="devmode" />

    <include file="securitypolicy.zcml" />
    <include file="principals.zcml" />

    <!-- Include develop packages here -->
    <include package="foo" />

  </configure>

securitypolicy.zcml =
   <securityPolicy
      component="zope.app.securitypolicy.zopepolicy.ZopeSecurityPolicy" />

   <role id="zope.Anonymous" title="Everybody" />
   <role id="zope.Manager" title="Site Manager" />
   <role id="zope.Member" title="Site Member" />

   <grant permission="zope.View" role="zope.Anonymous" />
   <grant permission="zope.app.dublincore.view" role="zope.Anonymous" />

   <grantAll role="zope.Manager" />

principals.zcml =
   <unauthenticatedPrincipal
      id="zope.anybody"
      title="Unauthenticated User" />

   <unauthenticatedGroup
      id="zope.Anybody"
      title="Unauthenticated Users" />

   <authenticatedGroup
      id="zope.Authenticated"
      title="Authenticated Users" />

   <everybodyGroup
      id="zope.Everybody"
      title="All Users" />

   <principal
      id="zope.manager"
      title="Manager"
      login="astoon"
      password_manager="Plain Text"
      password="1" />

   <grant
      role="zope.Manager"
      principal="zope.manager" />

zope.conf =
  ${var:zconfig}

  interrupt-check-interval 50
  devmode on

  <server>
    type HTTP
    address 8080
  </server>

  <eventlog>
    <logfile>
      formatter zope.exceptions.log.Formatter
      path ${buildout:directory}/parts/logs/error.log
    </logfile>
    <logfile>
      formatter zope.exceptions.log.Formatter
      path STDOUT
    </logfile>
  </eventlog>

  <accesslog>
    <logfile>
      path ${buildout:directory}/parts/logs/access.log
    </logfile>
  </accesslog>

  <product-config z3ext.lucene>
    server1 lucene server,8081,${buildout:directory}/parts/var/luceneindex
  </product-config>

[var]
recipe = zc.recipe.filestorage
blob-dir = parts/blob
=================================================

Setup.py install_requires:

'setuptools',
'zope.app.zcmlfiles',
'zope.app.twisted',
'zope.app.securitypolicy',
'zope.app.apidoc',
================================================

And in current project:

  <!-- develop process -->
  <include package="zope.app.preference" file="meta.zcml" />
  <include package="zope.app.apidoc" file="meta.zcml" />
  <include package="zope.app.onlinehelp" file="meta.zcml" />

  <include package="zope.app.tree" />
  <include package="zope.app.onlinehelp" />
  <include package="zope.app.renderer" />
  <include package="zope.app.preference" />
  <include package="zope.app.apidoc" />

=================================================
And the second question: how to include the `Introspector.`


Thanks.
-- 
Ilshad Habibullin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope3-users/attachments/20080316/d2870803/attachment.htm


More information about the Zope3-users mailing list