[Repoze-dev] How to pass additional configuration parameters

2009-09-16 Thread Andreas Jung
Hi, is there a common pattern for passing additional configuration parameters to a repoze.bfg app (either through the paster server cmdline call or through the server.ini file)? Is there some common API or approach for doing that? Andreas -- ZOPYX Ltd. & Co KG \ ZOPYX & Friends Charlo

[Repoze-dev] Restricting access on a per-IP address basis

2009-09-18 Thread Andreas Jung
Hi there, I have repoze.bfg app listening 0.0.0.0 (started using paster serve). What is the best practice for restricting access to the server to a number of IP addresses other than through a firewall. Is there some WSGI middleware doing the filtering? I think writing a WSGI filter would not be

[Repoze-dev] [bfg 1.2a1] Required specification must be a specification or class.

2009-11-29 Thread Andreas Jung
Tried to get zopyx.smartprintng.server working w/ BFG 1.2a1. This fails badly. Anything I am missing? Andreas aj...@suxmac2:~/src/svn.zope.org/zopyx.smartprintng.server/trunk bin/paster serve server.ini SmartPrintNG server started Temp directory: /var/folders/Ov/OvU++3BsFOaXK0Lrm8F4C+++

Re: [Repoze-dev] [bfg 1.2a1] Required specification must be a specification or class.

2009-11-30 Thread Andreas Jung
Am 29.11.09 15:52, schrieb Chris McDonough: > Andreas Jung wrote: >> Tried to get zopyx.smartprintng.server working w/ BFG 1.2a1. This fails >> badly. >> Anything I am missing? > > Thanks for trying it. I have fixed this on the trunk and your server > now s

Re: [Repoze-dev] fun benchmarks.

2009-11-30 Thread Andreas Jung
Am 01.12.09 06:59, schrieb Chris McDonough: > > That would be somewhere around 8K - 9K requests per second, depending on whom > you believe. > > That's pretty snappy hardware for not much money. I don't think we have much > excuse for slow web apps anymore. Just geil! Andreas <>___

[Repoze-dev] [bfg 1.29a] render_template_to_response returning the view class?

2010-01-02 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Running the zopyx.smartprintng.server tests with Repoze 1.2a9: Calling the index() view no longer returns a response object with a status attribute: > /data/develop/repository/svn.zope.org/zopyx.smartprintng.server/trunk/zopyx/smartprintng/server/te

[Repoze-dev] Using the multiprocessing module

2010-04-10 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there, is it save to use the 'multiprocessing' module inside a BFG app? In particular I need to maintain a multiprocessing.Pool() instance... this is working at the first glance however the BFG app won't shutdown in a clean way when stopped through

Re: [Repoze-dev] Using the multiprocessing module

2010-04-12 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Shane Hathaway wrote: > On 04/10/2010 07:00 AM, Andreas Jung wrote: >> is it save to use the 'multiprocessing' module inside a BFG app? >> In particular I need to maintain a multiprocessing.Pool() instance... >> this

[Repoze-dev] Best practice approach for protection against cross-site-scripting and cross-site request forgery

2010-06-04 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there, well the subject says it all..is there some recommended approach for protecting a BFG app against XSS and CSRF? I looked at plone.protect - but at least inside a buildout it tries to pull in a complete Zope 2 egg :-> Andreas - -- ZOPYX L

[Repoze-dev] Some questions on Deform

2010-12-02 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there, I am currently evaluating Deform + Colander for an upcoming project. Open questions: Is there some support (in the renderer) for grouping fields? E.g. we have a "Person" form with fields for business and privat address. The related fields

[Repoze-dev] [Deform] Problem w/ appstruct /Form defaults

2010-12-06 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I have the following schema definition where the 'vorname' field should be rendered with 'Andreas' as default value. class DefaultSchema(colander.MappingSchema): vorname = colander.SchemaNode( colander.String(), title=u'Vorname',

Re: [Repoze-dev] [Deform] Problem w/ appstruct /Form defaults

2010-12-06 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andreas Jung wrote: > data = {'default.vorname' : 'Andreas'} Solved - mea culpa..this must be a nested dict. Andreas -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - htt

[Repoze-dev] [Colander] Issue with colander.deferred - AttributeError: 'deferred' object has no attribute 'hidden'

2010-12-07 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Using Colander/Deform inside a Zope 2.11 using the following schema definition: import deform import colander @colander.deferred def selection_status(node, kw): values = kw.get('status', []) return deform.widget.SelectWidget(values=values)

Re: [Repoze-dev] [Colander] Issue with colander.deferred - AttributeError: 'deferred' object has no attribute 'hidden'

2010-12-07 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 SOLVED - one must call explictly bind() on the schema in this case. Andreas Andreas Jung wrote: > Using Colander/Deform inside a Zope 2.11 using the following schema > definition: > > > > import deform > import colander &g

[Repoze-dev] [Colander/Deform] Deserialization issue (Required error)

2010-12-07 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 My schema contains the following fields: 317 ust = colander.SchemaNode($ 318 colander.Float(),$ 319 title=u'Ust',$ 320 missing=0,$ 321 view_roles = [u'AutorenFiBu'],$ 322 edit_roles = [u'AutorenFiBu'],$ 323

Re: [Repoze-dev] [Colander] Issue with colander.deferred - AttributeError: 'deferred' object has no attribute 'hidden'

2010-12-07 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Josip Delic wrote: > Am Dienstag, den 07.12.2010, 15:11 +0100 schrieb Andreas Jung: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> >> SOLVED - one must call explictly bind() on the schema in this cas

Re: [Repoze-dev] [Colander/Deform] Deserialization issue (Required error)

2010-12-07 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris McDonough wrote: > On Tue, 2010-12-07 at 15:18 +0100, Andreas Jung wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> My schema contains the following fields: >> >> 317 ust = colander.Sch

Re: [Repoze-dev] [Colander/Deform] Deserialization issue (Required error)

2010-12-07 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andreas Jung wrote: >>> >>> fibu.kreditor+ust are available ...so why is Colander complaining here >>> with 'Required'? >> Are you building the form "by hand" or letting Deform autogenerate it? >

Re: [Repoze-dev] [Colander/Deform] Deserialization issue (Required error)

2010-12-07 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Chris McDonough wrote: > On Tue, 2010-12-07 at 17:06 +0100, Andreas Jung wrote: >> -BEGIN PGP SIGNED MESSAGE- >> Hash: SHA1 >> >> Chris McDonough wrote: >>> On Tue, 2010-12-07 at 15:18 +0100, Andreas Ju

Re: [Repoze-dev] [Colander/Deform] Deserialization issue (Required error)

2010-12-07 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andreas Jung wrote: The issue seems to be related to the Zope 2 request -> Webob request converter here: > > 18 > 19 def getDeformData(request, schema): > 20 """ Turn request into webob request for proper > 2

[Repoze-dev] docs.repoze.org down?

2011-01-05 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andreas -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQGUBAEBAgAGBQJNJCWXAAoJEADcfz7u4AZjduwLwJF70+Bn5+sZFe+RCjWgwWsU zhc6FcaOtDcBViKtv3iDavbldquufvty+9STk9idwQeT0TYEGWKe

[Repoze-dev] [Deform/Colander] Mapping lists to multi select widget

2011-01-05 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 What is the canonical way for defining a node as list of integers and rendering it as a multi-selection widget (http://docs.repoze.org/colander/basics.html#defining-a-colander-schema (Friend/Friends definition) however a TupleSchema with a single Int

[Repoze-dev] [colander/deform] List-ish data/Multiselect widget

2011-01-07 Thread Andreas Jung
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I using the following pattern to define some properties as lists of ints: class Numbers(SequenceSchema): number = SchemaNode(Int) class MySchema(MappingSchema): products = Numbers(widget=MultiSelectWidget) field_ids = Numbers(widget=MultiSel