archive-org.com » ORG » R » REPOZE.ORG

Total: 111

Choose link from "Titles, links and description words view":

Or switch to "Titles and links view".
  • Repoze Blog :)
    the groups the authenticated user belongs to and the permissions granted to such groups written by Chris McDonough Florent Aide and Christopher Perkins The plugin evolved as an framework for arbitrary WSGI applications which allows developers to store the groups and permissions of the application in other source types not only databases just to name a few of the features implemented as a TurboGears independent project The code sample below illustrates how this fully documented and tested framework yes its code coverage is at 100 can be used Sample use in TurboGears 2 pay attention to the line with the require class RootController BaseController expose algo templates index require predicates has permission manage msg Only for managers def manage permission only self return dict page managers stuff In the example above only people with the manage permission will be granted access to the manage permission only action Also if access is denied i e user doesn t have the manage permission she will be redirected to the login form and the message Only for managers will be displayed a behavior that is fully customizable This groups permissions based authorization pattern is just the default pattern supported in repoze what and

    Original URL path: http://blog.repoze.org/repoze-what-1-dot-oh-20090119/ (2016-01-08)
    Open archived version from archive


  • Repoze Blog :)
    US 2009 The Big F n Tutorial Pycon US 2009 is in Chicago this year again I love going there This year at the conference I ll be presenting a tutorial on the repoze bfg web framework along with Chris Perkins The tutorial is on Thursday March 26 If you re interested in repoze bfg this is a great way to learn how it works Chris Perkins will also be

    Original URL path: http://blog.repoze.org/bigfn-tutorial-pycon-20090119/ (2016-01-08)
    Open archived version from archive

  • Repoze Blog :)
    up the Songlist Meme Kudos to Carlos for his writeup on implementing the songlist app now circulating in the Python blogosphere using repoze bfg Carlos writes that the BFG version implemented in 50 lines of Python and ZCML benchmarks at

    Original URL path: http://blog.repoze.org/carlos-songlist_in_bfg-20090114/ (2016-01-08)
    Open archived version from archive

  • Repoze Blog :)
    a Plone buildout Props to Tom Gross who has tackled the job of figuring out and documenting the minimal set of changes needed to make use of repoze and WSGI from within a stock Plone buildout Correction Tom Gross sent

    Original URL path: http://blog.repoze.org/tom_gross-repoze_plone-20081113/ (2016-01-08)
    Open archived version from archive

  • Repoze Blog :)
    ATOM 1 0 2008 10 20 00 00 00 05 00 Plone Conference Presentation on repoze bfg I ve put the slides up of the presentation I gave at the 2008 Plone Conference about repoze bfg named repoze bfg A

    Original URL path: http://blog.repoze.org/confpres10202008/ (2016-01-08)
    Open archived version from archive

  • Repoze Blog :)
    ATOM 1 0 2008 10 04 00 00 00 05 00 repoze squeeze and repoze bitblt middleware Malthe Borch and Stefan Eletzhofer have developed some nice middleware under the repoze flag Malthe blogs about two of these creations repoze squeeze

    Original URL path: http://blog.repoze.org/malthe-20081004/ (2016-01-08)
    Open archived version from archive

  • Repoze Blog :)
    of its predecessors in order to make it more useful for arbitrary Python applications Its implemented in terms of ZODB objects and the ZODB will store the derived index data but it assumes little else You should be able to use it in any Python application The fact that it uses ZODB is ancillary it s akin to Xapian using flint or quartz backends Indexing To perform indexing of objects you set up a catalog with some number of indexes each of which is capable of calling a callback function to obtain data about an object being cataloged from repoze catalog indexes field import CatalogFieldIndex from repoze catalog indexes text import CatalogTextIndex from repoze catalog catalog import Catalog def get flavor object default return getattr object flavor default def get text object default return getattr object text default catalog Catalog catalog flavors CatalogFieldIndex get flavor catalog text CatalogTextIndex get text Note that get flavor and get text will be called for each object you attempt to index Each of them attempts to grab an attribute from the object being indexed and returns a default if no such attribute exists Once you ve got a catalog set up you can begin to index Python objects aka documents class IceCream object def init self flavor description self flavor flavor self description description peach IceCream peach This ice cream has a peachy flavor catalog index doc 1 peach pistachio IceCream pistachio This ice cream tastes like pistachio nuts catalog index doc 2 pistachio Note that when you call index doc you pass in a docid as the first argument and the object you want to index as the second argument When we index the peach object above we index it with the docid 1 Each docid must be unique within a catalog when you query a repoze catalog catalog you ll get back a sequence of document ids that match the query you supplied which you ll presumably need to map back to the content object in order to make sense of the response you re responsible for keeping track of which objects map to which document id yourself Querying Once you ve got some number of documents indexed you can perform queries against an existing catalog A query is performed by passing keyword arguments to the search method of the catalog object catalog search flavor peach peach Each keyword argument passed to search is either the name of an index contained within the catalog or a special value that specifies sort ordering and query limiting In the above example we specified no particular sort ordering or limit and we re essentially asking the catalog to return us all the documents that match the word peach as a field within the field index named flavor Each index specifies its own query argument style field indexes specify that the value you must pass in be a range search so we pass in the tuple peach peach which can be read from peach to peach

    Original URL path: http://blog.repoze.org/catalog-20081004/ (2016-01-08)
    Open archived version from archive

  • Repoze Blog :)
    i http dist repoze org lemonade dev simple U repoze bfg repoze bfg no longer supports z3c pt itself but all apps that use the repoze bfg template API functions will continue to function properly albeit using Chameleon under the hood instead of z3c pt Importing API functions from repoze bfg template is now a deprecated spelling although these APIs will remain around for a good long time and won

    Original URL path: http://blog.repoze.org/repoze_bfg_with_chameleon/ (2016-01-08)
    Open archived version from archive



  •