Re: [Repoze-dev] how to get the response
Il giorno mar, 27/04/2010 alle 12.31 -0400, Chris Rossi ha scritto: Ciao Davide, There is not a response already attached to the request, but your instance of HTTPFound *is* a response, so you would just set your cookie there: ppp = HTTPFound(location=request.application_url) ppp.set_cookie('fb_user', value=value, ...) return ppp Thanks a lot, it works fine! Ciao, davide -- Davide Moro Redomino S.r.l. Largo Valgioie 14, 10146 Torino Italy Tel: +39 0117499875 http://redomino.com ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
[Repoze-dev] repoze.bfg 1.3a2 released
repoze.bfg 1.3a2 has been released. You may install it via: easy_install -i http://dist.repoze.org/bfg/1.3/simple repoze.bfg Or via PyPI. The changelog follows 1.3a2 (2010-04-28) == Features - A locale negotiator no longer needs to be registered explicitly. The default locale negotiator at ``repoze.bfg.i18n.default_locale_negotiator`` is now used unconditionally as... um, the default locale negotiator. - The default locale negotiator has become more complex. * First, the negotiator looks for the ``_LOCALE_`` attribute of the request object (possibly set by a view or an event listener). * Then it looks for the ``request.params['_LOCALE_']`` value. * Then it looks for the ``request.cookies['_LOCALE_']`` value. Backwards Incompatibilities --- - The default locale negotiator now looks for the parameter named ``_LOCALE_`` rather than a parameter named ``locale`` in ``request.params``. Behavior Changes - A locale negotiator may now return ``None``, signifying that the default locale should be used. Documentation - - Documentation concerning locale negotiation in the Internationalizationa and Localization chapter was updated. - Expanded portion of i18n narrative chapter docs which discuss working with gettext files. -- Chris McDonough Agendaless Consulting, Fredericksburg VA The repoze.bfg Web Application Framework Book: http://bfg.repoze.org/book ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] [sqlalchemy] session lifecycle and wsgi
King Simon-NFHD78 wrote: Have you read http://www.sqlalchemy.org/docs/session.html#lifespan-of-a-contextual-ses sion - it describes typical usage of a scoped session in a web application. I have now ;-) In your traditional structure, you could get an exception during session.commit() which would not be handled in your exception handler. I believe (but I'm not certain) that after any kind of database exception, it is recommended that you roll back the existing transaction, as it is likely to be invalid anyway. Any ideas in the case where you're using two phase commit? I'm likely to use repoze.tm2, which has a process that looks roughly like: try: use session except: session.rollback() raise else: try: do first phase of commit for other resources session.prepare() except: session.rollback() raise else: session.commit() Is this sequence correct? If not, what should change? Session.remove() ensures that the current session is removed from the scoped session registry. If you don't do this, I think that the next time this thread calls Session(), it'll get the old session back again, rather than creating a new one. Surely that's a good thing? When would it not be a good thing? (repoze.bfg has a faily warty way of calling session.remove, I'd like that to go away if it's not necessary) The only worry I have is about releasing MySQL connections back to the pool rather than slowly consuming them all over time... cheers, Chris ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
[Repoze-dev] form generation package recommended for use with BFG?
Hi All, Is there anything akin to Django's form generation and handling stuff that's recommended for use with BFG? cheers, Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
[Repoze-dev] imperative configuration prevents application extension?
Hi All, In the BFG book their are copious references to the fact that using imperative configuration (or the decorators, my preferred choice) is bad if you plan to write apps that might be extended by others. Am I right in understanding that this is because that method of configuration somehow prevents overrides being applied later? If so, what can we do to change that? I've grown quite allergic to ZCML in the few years since I last had to touch it... cheers, Chris -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
[Repoze-dev] membership for BFG and composing multiple apps
Final one of my trio for this evening... Is there anything like the ol' CMFMembership for BFG? (important bits for me: - where to store/get user info from - cookie authentication - login and logout forms - password reminder and reset forms and functionality) If there is such a beastie, how do I plug it in to my existing app setup? If I wanted to write such a similar lump of non-app-specific functionality, how would I do so in such a way that plugging in the views and other code would be as easy as possible? (and also easy for the consumer to override my choice of html, specific url, etc) cheers, Chris - fun feeling like a total n00b again :-) -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] membership for BFG and composing multiple apps
I'll offer up this, NOT because I think you should use it, but it has lots of examples of varying quality to give you ideas on how you might compose auth/registration/password recorvery into an existing bfg app. http://bitbucket.org/twillis/identity.model/src You could use it, but I think you'll find you would rather write your own. :) On Wed, Apr 28, 2010 at 3:10 PM, Chris Withers ch...@simplistix.co.uk wrote: Final one of my trio for this evening... Is there anything like the ol' CMFMembership for BFG? (important bits for me: - where to store/get user info from - cookie authentication - login and logout forms - password reminder and reset forms and functionality) If there is such a beastie, how do I plug it in to my existing app setup? If I wanted to write such a similar lump of non-app-specific functionality, how would I do so in such a way that plugging in the views and other code would be as easy as possible? (and also easy for the consumer to override my choice of html, specific url, etc) cheers, Chris - fun feeling like a total n00b again :-) -- Simplistix - Content Management, Batch Processing Python Consulting - http://www.simplistix.co.uk ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev -- Thomas G. Willis ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] form generation package recommended for use with BFG?
Am 28.04.2010, 21:05 Uhr, schrieb Chris Withers ch...@simplistix.co.uk: Hi All, Is there anything akin to Django's form generation and handling stuff that's recommended for use with BFG? repoze.formish ? Charlie (fresh from spreading the word of BFG at World Plone Day and slightly worried by the Withers increased in BFG ;-) -- Charlie Clark Managing Director Clark Consulting Research German Office Helmholtzstr. 20 Düsseldorf D- 40215 Tel: +49-211-600-3657 Mobile: +49-178-782-6226 ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] imperative configuration prevents application extension?
On 04/28/2010 01:07 PM, Chris Withers wrote: In the BFG book their are copious references to the fact that using imperative configuration (or the decorators, my preferred choice) is bad if you plan to write apps that might be extended by others. Am I right in understanding that this is because that method of configuration somehow prevents overrides being applied later? If so, what can we do to change that? I've grown quite allergic to ZCML in the few years since I last had to touch it... I imagine Venusian makes it possible to treat decorators as declarative configuration, which is IMHO the right thing to do. :-) Shane ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] form generation package recommended for use with BFG?
Chris Withers wrote: Hi All, Is there anything akin to Django's form generation and handling stuff that's recommended for use with BFG? repoze.bfg.formish is probably your best bet right now: http://svn.repoze.org/repoze.bfg.formish/trunk/docs/index.rst it's being used pretty heavily by the KARL project, so there's lots of in-use code to look at, the formish:form tags (and the classes they refer to) in this file are a good place to start: http://osi.agendaless.com/bfgsvn/karl/trunk/karl/content/views/configure.zcml chris has been working on repoze.deform, which is similar in many ways to repoze.bfg.formish, but takes a different approach to serialization, along w/ some other differences. see: http://docs.repoze.org/deform/ and: http://www.plope.com/peppercorn the deform stuff is much less battle-worn, however; not only has repoze.bfg.formish been around for longer, but formish itself has a life of its own outside of repoze-land, whereas i'm not sure if deform has even seen any production use yet. -r ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev
Re: [Repoze-dev] LMS a BFG application
Srikanth T srikant...@... writes: Hi We would like to share with you, an application we have developed using Repoze.BFG and KARL as basis. We want to contribute this project for Open Source Community. The application, is named as LMS( Leave management System ). We wish , LMS can act as a reference , for any one who is interested in learning KARL based repoze applications. You can download, source code from : https://sourceforge.net/projects/mahiti-lms Please feel free to tell us how it is and our lackings if any. -- Thanks Regards,Srikanth.TMahiti Infotech Pvt. Ltd.# 33-34, 2nd Floor,Hennur Cross, Hennur Road, Bangalore, India - 560043 Phone: +91 80 4115 0580/1 ___ Repoze-dev mailing list repoze-...@... http://lists.repoze.org/listinfo/repoze-dev Hi. Can you please upload a better image of our organisation. Please provide me email id so that i can send the image or else the image can be taken from http://mahiti.org/portal_css/images/mahiti-logo.jpg this url.Even http://srikanth-suri.blogspot.com/2010/04/leave-management-system-open-source.html would do. A bit of encouragement, appreciation and recognition can boost our morale and can make us contribute better for Open Source Community.We are an NGO and develop software also. We are based in India and spearhead the Open Source Movement in India. We conduct workshops for students, employees, common men alike and spread the usage of Open Source. We use only Open Source Products and build the software and provide them for people. ___ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev