Re: SQLAHelper 1.0 released, and a proposal

2011-12-30 Thread Laurent DAVERIO
Hi Mike, I like 'SQLAHub'. There's a precent in Python web frameworks for 'hub' as a database rendevous point, though it's been so many years I don't remember where I saw it. I think you're referring to SQLObject, which is/was used in TurboGears. I used it for a couple of years before

Re: Serving Buildbot webpages via Pyramid ?

2012-07-19 Thread Laurent DAVERIO
Le 19/07/12 23:10, Jonathan Vanasco a écrit : 4/ set up a solr-lucene instance , have a cronjob ( or a triggered task ) pull all the information from the various components and standardize into a common document. use pyramid to front requests via pysolr , and then display. He he, I hadn't

Re: recommend a wysiwyg editor for a pyramid project?

2012-11-09 Thread Laurent DAVERIO
- As much as you can , don't allow consumer HTML - I really suggest forcing everything into Markdown or similar in the backend, then generating into HTML as needed. I humbly disagree. In many companies, you'll see people elaborate rich-text content in MS Word, and then copy and paste it into

Supervisord and Ascii encoding problem ?

2013-02-08 Thread Laurent DAVERIO
it has something to do with the way it handles the (encoding of the) stdin/stdout/stderr of its child processes. And it seems to have a definite incidence on all Python apps when run by supervisord. Thanks in advance, Laurent DAVERIO. -- You received this message because you are subscribed

Re: Supervisord and Ascii encoding problem ?

2013-02-08 Thread Laurent DAVERIO
] environment=LC_ALL='en_US.UTF-8',LANG='en_US.UTF-8' This is in my /etc/supervisor/supervisord.conf. If this is in there by default, I changed something else... ;) Best Regards, Jesaja Everling On Fri, Feb 8, 2013 at 5:09 PM, Laurent DAVERIO ldave...@gmail.com wrote: Hello list, I

Re: WebHelpers developments (paginate 0.4.0 released)

2013-02-12 Thread Laurent DAVERIO
Hello Christoph, hello list, keeping in mind the warnings about the beta quality of the software, I have tried integrating it in an existing Pyramid project. Long story: I wanted to replace the Xapian indexer with Apache-Solr, using the sunburnt module to interface Python with Solr. With

Re: WebHelpers developments (paginate 0.4.0 released)

2013-02-13 Thread Laurent DAVERIO
Hello again, after due consideration, the removal of onclick is not such a problem, it even allows for cleaner HTML code. I added the following Javascript and it solved the problem for me: $('#${prefix}pager a').click(function () { var partial_url = this.href +

Re: WebHelpers developments (paginate 0.4.0 released)

2013-02-13 Thread Laurent DAVERIO
2/ Unicode characters such as « and » (angled double quotes) were not accepted in symbol_previous and symbol_next, so I kept the defaults ( and ). This one can be solved easily, too: in file paginate/__init__.py, change line 541 from : tag_string += '{0}/{1}'.format(text, tag) to:

Re: Help with SQLAlchemy

2013-04-13 Thread Laurent DAVERIO
Hi, I need help with SQLAlchemy. I am not sure if this is the right forum to ask the query but since we are using Pylons and SQLAlchemy is part of the same, I thought asking here: No, it's probably not the right forum, as SQLAlchemy is a dependency, not a part of Pylons (no more than Python,

Re: Should ✔ be truthy?

2013-04-18 Thread Laurent DAVERIO
:) I'd imagine we all do, but that brings up an interesting point. This would obviously be most seen in .py files. One can just imagine projects w/ various libraries from different third parties with different coding standards with check marks in some modules or even in some functions in the

Newbie question: physical file path from asset specification ?

2013-05-01 Thread Laurent DAVERIO
Hello list, sorry for asking such a newbie question (and making you work on May Day ;-), but I can't seem to find the answer by myself... :-( I have a Pyramid app defining a few static routes, e.g. : for d in ('css', 'img', 'js'): config.add_static_view('%s' % d, 'mypkg:static/%s' % d,

Re: Newbie question: physical file path from asset specification ?

2013-05-01 Thread Laurent DAVERIO
Le 01/05/13 19:28, Michael Merickel a écrit : This is the purpose of the AssetResolver. resolver = AssetResolver() asset = resolver.resolve('mypkg:static/img/%s' % img_filename) asset.abspath() # - /foo/bar/static/img/...

Multiple questions about i18n / pluralization in Pyramid

2013-05-22 Thread Laurent DAVERIO
Hello list, I'm in the process of internationalizing a Pyramid application, and I'm currently stumbling on a few problems. Basic setup as per the tutorial works fine: I can extract message strings to catalog files using Babel+Lingua, fill-in the PO files, compile them to MO files and display

Namespace packages and scaffolds ?

2013-05-28 Thread Laurent DAVERIO
Hello list, I'm trying to create a scaffold inside a namespace package. The namespace package is created correctly, but pcreate -l can't find the scaffold: From a clean virtualenv (with only pyramid in it), I create a package foo: pcreate -t starter foo Then. I manually create a namespace

Re: Namespace packages and scaffolds ?

2013-05-28 Thread Laurent DAVERIO
When I run pcreate -l, I get the following message: Warning: could not load entry point foobar (ImportError: No module named bar.scaffolds) To be more precise : pcreate is looking for the scaffold in the main package (foo), not in the namespace package (foo.bar). It can be verified if you

Re: Multiple questions about i18n / pluralization in Pyramid

2013-05-29 Thread Laurent DAVERIO
Hello again, this is a follow-up to my own post. I'm slowly working my way towards the light ;-) 1/ After looking at the docs and the source code, I'm more and more convinced that Babel can't handle pluralization. Do you have any hint on the issue? All my apologies to Babel developers.

Re: Multiple questions about i18n / pluralization in Pyramid [SOLVED]

2013-05-29 Thread Laurent DAVERIO
Hello again, one final word, in case someone is interested (apart from me, I mean ;-)) Then, extract messages using: python setup.py extract_messages -k _p More precisely: python setup.py extract_messages -k _p:1,2 The argument _p:1,2 will tell Babel that arguments 1 and 2 of function

Re: pshell+sqlalchemy = ?

2013-05-30 Thread Laurent DAVERIO
Le 30/05/13 18:51, Rachid Belaid a écrit : I met the same is issues. I think that you can simply do `Session.commit()` base on my pshell history In my experience, Session.commit() fails with an AssertionError exception: AssertionError: Transaction must be committed using the transaction

Re: pyramid+wtforms+i18n

2013-06-12 Thread Laurent DAVERIO
Hi, your problem has nothing to do with wtforms (you would have the same e.g. with Deform. It only has to do with the moment at your code is read and executed by Python. I guess your module is executed during Pyramid's startup phase, before any request is even made. A that time, translating the

Re: pyramid+wtforms+i18n

2013-06-12 Thread Laurent DAVERIO
Right now I'm trying to send request.translate to SignupForm via: @view_config(...) def signup(request): customer = Customer() form = SignupForm(request.POST, customer, _=request.translate) ... I guess this can't work either, for the same reason. But this gave me an idea :-)

Embedding Jade/Haml inside Mako?

2013-06-23 Thread Laurent DAVERIO
Hello list, I'm currently trying to embed/include Jade code inside a Mako template,via the pyjade module. My currently working solution is a bunch of ugly hacks, so I'm wondering if there would be a cleaner way. == As per pyjade's documentation, I could define a .jade renderer inside Pyramid

Accessing the app's settings when no request is available?

2013-06-26 Thread Laurent DAVERIO
Hello everybody, my last questions to the list have all remained unanswered / unacknowledged :'-(, but I want to give it another try. This one should be simpler than the rest. Basically, I have a data model in which an SQLAlchemy after_update listener automatically reindexes object attributes in

Re: Accessing the app's settings when no request is available?

2013-06-26 Thread Laurent DAVERIO
-branch/api/paster.html#pyramid.paster.get_appsettings On Wed, Jun 26, 2013 at 2:22 AM, Laurent DAVERIO ldave...@gmail.com mailto:ldave...@gmail.com wrote: Hello everybody, my last questions to the list have all remained unanswered / unacknowledged :'-(, but I want to give

Re: Accessing the app's settings when no request is available?

2013-06-28 Thread Laurent DAVERIO
Thank you Jonathan, thank you Andy, I finally chose the includeme path to solve the problem :-) As regards elasticsearch and rivers, I haven't had the time to give them an in-depth look yet, but it is high on my to-do list. Laurent. Le 26/06/13 21:55, Jonathan Vanasco a écrit : Can you do

Re: unable to use deform_bootstrap

2013-07-31 Thread Laurent DAVERIO
Le 31/07/13 08:16, Abdul Wahid a écrit : But i am unable to see all static file in my project such .css, .js files. And unable to place any bootstrap class on any element. Hi, if I remember correctly, you must 1/ manually create a static route pointing to directory deform_bootstrap:static,

Re: deform_bootstrap: 404 Not Found glyphicons-halflings-white.png

2013-08-01 Thread Laurent DAVERIO
This file is one of Bootstrap's two icon files. It lives in the img/ subdirectory relative to the path of the bootstrap-*.css files. But apparently, deform_bootstrap doesn't include the complete bootstrap package. You must provide the files yourself: bootstrap-min.css

Re: deform_bootstrap: 404 Not Found glyphicons-halflings-white.png

2013-08-01 Thread Laurent DAVERIO
How is it generated in your template? Laurent. On Thu, Aug 1, 2013 at 3:20 PM, Laurent DAVERIO ldave...@gmail.com mailto:ldave...@gmail.com wrote: This file is one of Bootstrap's two icon files. It lives in the img/ subdirectory relative to the path of the bootstrap-*.css files

[pylons-discuss] Strange behaviour: transactions not committed automatically

2013-10-05 Thread Laurent DAVERIO
Hello list, I'm trying to understand what's going on here: - 2 Pyramid development servers, running almost identical versions of OS and software (only minor versions may differ, e.g. FreeBSD 9.1 vs 9.2, PostgreSQL 9.2 vs 9.3, etc.) - Same Pyramid app deployed on both servers - On server #1,

Re: [pylons-discuss] Strange behaviour: transactions not committed automatically

2013-10-06 Thread Laurent DAVERIO
] ... pyramid.includes = pyramid_tm ... -Vincent On Sat, Oct 5, 2013 at 8:40 AM, Laurent DAVERIO ldave...@gmail.com mailto:ldave...@gmail.com wrote: Hello list, I'm trying to understand what's going on here: - 2 Pyramid development servers, running almost identical versions

Re: [pylons-discuss] check if mako template exists

2013-10-17 Thread Laurent DAVERIO
Le 17/10/13 09:34, cropr a écrit : Does anybody know how one can check in Pyramid if a mako template exists without rendering it, assuming that the mako.directiories is correctly set up? I think you need this:

Re: [pylons-discuss] check if mako template exists

2013-10-17 Thread Laurent DAVERIO
if os.path.exists(): Oops, I meant: if os.path.exists(path): Laurent. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [pylons-discuss] Re: nginx + gunicorn + pyramid -- .sock no such file or directory

2013-11-02 Thread Laurent DAVERIO
Le 02/11/13 17:33, Mazzaroth M. a écrit : Which begs the question.. how does one set up multiple virtual hosts on a single machine/vm where different domain names forward to different pyramid instances? Each Pyramid instance creates its own app.sock file, so it's just a matter of pointing each

Re: [pylons-discuss] Pyramid theme package

2014-01-22 Thread Laurent DAVERIO
Hi, I'm afraid you cannot compare Plone with Pyramid: - Plone is a ready-to-use web content management application with a themeable interface - Pyramid is a web development framework with no standard, built-in user interface. So, the notion of theme has no meaning in the context Pyramid. That

Re: [pylons-discuss] passing an image to a template in pylons dynamically

2014-09-07 Thread Laurent DAVERIO
Le 07/09/2014 17:42, 'gazza' via pylons-discuss a écrit : Hello, I would like to pass an image to a template dynamically to avoid any file writes. I convert the image to a StringIO and get the value. I wanted to pass that into a context object and simply display it like below: image

Re: [pylons-discuss] passing a context object to css

2014-10-20 Thread Laurent DAVERIO
Hello, I would probably prefer to keep all my CSS files as purely static files, for performance reasons (actually, I would create Sass files, and have Fanstatic automatically compile and minify them for me, but that's another story) Mako can be used for creating CSS templates, but then these CSS

[pylons-discuss] Strange overlaps in independent Pyramid projects

2014-10-30 Thread Laurent DAVERIO
Hello list, I don't know exactly how to report 2 related overlap problems I've recently encountered, and maybe it's not even the right list to report them. But even then, it's relevant to Pyramid. These problems started to appear when I created a second Pyramid project under an existing

Re: [pylons-discuss] Re: Announcement: Ringo a high level application framework

2015-01-03 Thread Laurent DAVERIO
Hi, I gave it a try, too. MacOS X 10.10, Python 2.7.9 from MacPorts. Everything worked fine. pcreate -t ringo foo The doc says pcreate -t ringo Foo (Foo with a capital F). You have to remember that the filesystem on a Mac is case-insensitive (but case-remembering). So, foo-admin and

Re: [pylons-discuss] Routes matching problem

2015-01-14 Thread Laurent DAVERIO
[SOLVED] Hmm, looks like an incorrectly defined static view was intercepting all URLs... Sorry for the trouble, but I had been stumbling on this problem on and off for quite some time. Maybe just writing the email did the trick? Laurent. Le 14/01/2015 19:50, Laurent DAVERIO a écrit : Hello

[pylons-discuss] Routes matching problem

2015-01-14 Thread Laurent DAVERIO
Hello list, I'm stumbling on a routes problem, and I'm not sure how to characterize it. I have a Pyramid application built as a stack of 3 layers. - foo : basic application template, defining routes, views, etc. - foo.bar : additional configurations, extending foo (config.include, as per

Re: [pylons-discuss] Re: Announcement: Ringo a high level application framework

2015-01-04 Thread Laurent DAVERIO
Great! Thanks for your feedback and congratulation, you are the first official MacOS user of Ringo :) If there is anyone else who want to be the first one on other OS too then go for it. There are plenty options left ;) OK, first on FreeBSD too, then ;) More precisely, FreeBSD 9.3-RELEASE

Re: [pylons-discuss] AttributeError: 'module' object has no attribute 'Connection'

2015-05-02 Thread Laurent DAVERIO
Hi Robert, this is not a Pyramid-related question. I have never user pymongo, but if I look at the example (https://pypi.python.org/pypi/pymongo/2.8) and the source code (https://github.com/mongodb/mongo-python-driver), it appears you should probably be writing something like: client =

Re: [pylons-discuss] Forms and Validation With Deform ???

2015-05-11 Thread Laurent DAVERIO
I use the exact same combination, and I fully concur :) The only thing you want to avoid is the `deform_bootstrap` package, which was never ported to Bootstrap 3: https://pypi.python.org/pypi/deform_bootstrap Laurent. Kotti always uses the latest versions of all upstream packages, for that

Re: [pylons-discuss] manage.py equivalent?

2015-06-01 Thread Laurent DAVERIO
Le 01/06/2015 12:08, Chris Withers a écrit : On 01/06/2015 08:11, Thierry Florac wrote: Hi, Do you want to create new management commands or do you just want to get access to the shell? Yes, I'm wondering if there's a framework for adding in new commands. In that case, maybe you just want

Re: [pylons-discuss] manage.py equivalent?

2015-06-01 Thread Laurent DAVERIO
PS: in particular, the INI file's path shouldn't be hardcoded, but should be read from the command line, as is the case with pserve, pshell, etc. from pyramid.paster import bootstrap env = bootstrap('/path/to/my/development.ini') From there you could/should add command-line arguments

Re: [pylons-discuss] manage.py equivalent?

2015-06-01 Thread Laurent DAVERIO
Hi Chris, the pyramid shell is described here: http://docs.pylonsproject.org/projects/pyramid/en/1.5-branch/narr/commandline.html#the-interactive-shell Basically, it's an (i)python shell with the application environment (database connection, etc.) enabled. But I'm not sure it does what you want,

Re: [pylons-discuss] Re: tweepy streaming api interferes with pserve?

2015-08-01 Thread Laurent DAVERIO
Hello, have you tried addressing the Insecure Platform Warning problem, as indicated in the error message? https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning Laurent. -- You received this message because you are subscribed to the Google Groups pylons-discuss

Re: [pylons-discuss] noob questions

2015-07-15 Thread Laurent DAVERIO
Hi Davide, when i try to start my project on 0.0.0.0:6543 doesnt work, but if i type localhost:6543 i get into the pyramid start page and i also can check the debug. 0.0.0.0 is not a valid address for a host. It is used in the INI file to mean listen on any IP address, but you can't use it

Re: [pylons-discuss] noob questions

2015-07-15 Thread Laurent DAVERIO
of those IPs. i.e. I was not totally wrong when I stated 0.0.0.0 was not a valid host address. Laurent. Le 15/07/2015 22:52, Bert JW Regeer a écrit : On Jul 15, 2015, at 14:48, Laurent DAVERIO ldave...@gmail.com mailto:ldave...@gmail.com wrote: That’s not true on OS X/Linux/FreeBSD where

Re: [pylons-discuss] noob questions

2015-07-15 Thread Laurent DAVERIO
That’s not true on OS X/Linux/FreeBSD where it can be used to connect to it without issues. This is an issue on Windows only. Hmm, I doubt that: $uname -a Darwin Aki.local 14.4.0 Darwin Kernel Version 14.4.0: Thu May 28 11:35:04 PDT 2015; root:xnu-2782.30.5~1/RELEASE_X86_64 x86_64 $ping

Re: [pylons-discuss] need guidance for Pyramid, Jinja2, deform combination

2015-11-22 Thread Laurent DAVERIO
Hi Krishnakant, as Jeff pointed out, there's nothing special to do, it just works. Just include the rendered form in your Jinja2 template. Laurent. Le 22/11/2015 09:46, Krishnakant Mane a écrit : > Thanks Jeff, > Can you give me an example of how you do this? > Happy hacking. > Krishnakant. >

[pylons-discuss] Finally, Real-Time Django Is Here: Get Started with Django Channels | Heroku

2016-03-24 Thread Laurent DAVERIO
Hello list, I was just reading this article about Django Channels, and I was wondering if we had anything similar avaibable for Pyramid? https://blog.heroku.com/archives/2016/3/17/in_deep_with_django_channels_the_future_of_real_time_apps_in_django Laurent. -- You received this message because

[pylons-discuss] config.include issues with a namespace package

2017-01-23 Thread Laurent DAVERIO
Hello list, after upgrading to Pyramid 1.8 and removing all my __pycache__/ directories (running Python 3.5.2 on macOS), I came across a problem I had never encountered before, and I don't know how to fix. NB: this is not a bug of Pyramid 1.8, as downgrading to 1.7 doesn't eliminate the problem.

Re: [pylons-discuss] config.include issues with a namespace package

2017-01-25 Thread Laurent DAVERIO
Thank you Michael, the fact is, I started with Python 2.7 some 4-5 years ago, and migrated to 3.x around mid-2015. The incriminated __init__.py contains only the following lines, as per instructions I had found somewhere (can't remember where): > # this is a namespace package > from pkgutil

Re: [pylons-discuss] config.include issues with a namespace package

2017-01-25 Thread Laurent DAVERIO
> I'll try to get rid of it entirely, as I don't wish to maintain Python > 2.x compatibility. I like to burn my bridges sometimes ;) OK, it works, provided I reinstate the symlink: ldc/ldc/shop --> ldc.shop/ldc/shop Python namespace packages are really kludgy, it's a disappointment. Python is

Re: [pylons-discuss] Pyramid 1.8 released

2017-01-22 Thread Laurent DAVERIO
Great work everybody! :) > Special thanks go to Carlos De La Guardia for all of his work rewriting > the official Pyramid scaffolds into cookiecutters. I only have one regret regarding to this: creating projects from cookiecutter "scaffolds" now requires an Internet connection, and depends on a

Re: [pylons-discuss] about pserve --stop-daemon --pid-file

2017-04-24 Thread Laurent DAVERIO
Maybe gunicorn could be used too. It is compatible with Python 3, and it seems to have a daemon mode. One trap I recently fell into, is that it's not compatible with: > [server:main] > use = egg:waitress#main > listen = 127.0.0.1:6543 [::1]:6543 you have to use the old syntax, ie: >

[pylons-discuss] Remove the stargate package from Pyramid's add-on list?

2017-04-30 Thread Laurent DAVERIO
Hello list, I've been trying to use the stargate module, listed here: https://trypyramid.com/resources-extending-pyramid.html """ Stargate Stargate is a package for adding WebSockets support to Pyramid applications using the excellent eventlet library for long running connections. Maintainers:

Re: [pylons-discuss] Remove the stargate package from Pyramid's add-on list?

2017-05-03 Thread Laurent DAVERIO
ywhere on https://trypyramid.com/, submit > an issue: > https://github.com/pylons/trypyramid.com > > --steve > > > On 4/30/17 at 3:55 PM, ldave...@gmail.com (Laurent DAVERIO) pronounced: > >> Hello list, >> >> I've been trying to use the stargate module, liste

Re: [pylons-discuss] pyramid and react working together?

2017-08-25 Thread Laurent DAVERIO
> And if you prefer Angular, you have Ionic which does something similar. Hmm, don't get me starting with Ionic :/ I have been struggling with it for a few month, it seems to be framework with a very unstable development path. AngularJS 2 was in beta for months, it evolved a lot during that time

Re: [pylons-discuss] Cornice: define CORS policy in configuration?

2018-01-08 Thread Laurent DAVERIO
Hi Jens, if you want to define the value in INI files, it will need to be read in a function where either "config" or "settings" is available. One way to do that would be to define CORS_POLICY as a global variable in your app and initialize it using a config.include() call in your __init__.py.

[pylons-discuss] Reading a Zope ZODB from Pyramid?

2018-07-30 Thread Laurent DAVERIO
Hello list, this may be a very silly question, and if so I apologize in advance, but I'm not sure what to google. Is it reasonable to try and read data from the ZODB of a Zope/CMF instance directly from Pyramid, or should I write export routines in the Zope app? Thanks in advance, Laurent. --

Re: [pylons-discuss] Reading a Zope ZODB from Pyramid?

2018-07-31 Thread Laurent DAVERIO
Thank you very much Gael, I vaguely remembered about pickles, thanks for pointing that out. Unless I'm mistaken, Python 2 and 3 use different pickling formats, so my Pyramid app would also have be downgraded to Python 2... Maybe I should try something else, after all. Thanks for your help,

Re: [pylons-discuss] Re: Reading a Zope ZODB from Pyramid?

2018-07-31 Thread Laurent DAVERIO
Thank you very much Tres, I think I'll choose a safer/saner way, even if I would have loved being able to access the ZODB data directly... Thanks for your help, Laurent. > If you install all the Zope + CMF code such that it is importable from > within your Pyramid app, then you could just

Re: [pylons-discuss] how does pyramid know what "create" , "view", "edit" etc is ?

2021-05-10 Thread Laurent Daverio
Hello, you could have a look at the "Authorization" page of the SQLAlchemy + URL dispatch wiki tutorial: https://pyramid.readthedocs.io/en/latest/tutorials/wiki2/authorization.html Basically : you define your permission as string via an ACL mechanism. Your permissions may be global (e.g. all

Re: [pylons-discuss] Problem between Pyramid's CSRF protection and Deform

2021-05-20 Thread Laurent Daverio
:47 PM UTC-4 Steve Piercy wrote: >> >> They are effectively the same. >> >> https://docs.pylonsproject.org/projects/pyramid/en/latest/_modules/pyramid/csrf.html#LegacySessionCSRFStoragePolicy.get_csrf_token >> >> In your code, you have configured two session factories. I assume

Re: [pylons-discuss] Problem between Pyramid's CSRF protection and Deform

2021-05-02 Thread Laurent Daverio
So, if I follow this line of reasoning, the way to get the same value as in the template is to use : from pyramid.csrf import get_csrf_token print get_csrf_token(request) and *not* : print request.session.get_csrf_token() Le dim. 2 mai 2021 à 19:11, Laurent Daverio a écrit : > > OK, I'v

Re: [pylons-discuss] Problem between Pyramid's CSRF protection and Deform

2021-05-02 Thread Laurent Daverio
storage policy => ok - LegacySessionCSRFStoragePolicy => ok - CookieCSRFStoragePolicy => ko I'm attaching my example, I called it "onefile.py", although I needed two files actually (one python file + one mako template). Sorry ;) Le mer. 28 avr. 2021 à 22:32, Laurent Daverio a écrit : > &

Re: [pylons-discuss] Problem between Pyramid's CSRF protection and Deform

2021-05-02 Thread Laurent Daverio
each factory. ¯\_(ツ)_/¯ > > --steve > > > On 5/2/21 10:25 AM, Laurent Daverio wrote: > > So, if I follow this line of reasoning, the way to get the same value > > as in the template is to use : > > > > from pyramid.csrf import get_csrf_token > &g

Re: [pylons-discuss] Problem between Pyramid's CSRF protection and Deform

2021-04-28 Thread Laurent Daverio
thout any issues. > > --steve > > > On 4/28/21 10:32 AM, Laurent Daverio wrote: > > Hello List, > > > > I'd like to report a problem I've just encountered, occurring betwen > > Pyramid's CSRF protection and Deform. > > > > Basically, I have a Py

Re: [pylons-discuss] Problem between Pyramid's CSRF protection and Deform

2021-04-28 Thread Laurent Daverio
Hi Mikko, thank you for your reply :) I don't think I'm doing anything weird there. The problem happens in a class-based view. I can see the 'csrf_token' cookie qith the right value, I can display the same value inside a template by calling get_csrf_token(), but the value generated inside the

[pylons-discuss] Problem between Pyramid's CSRF protection and Deform

2021-04-28 Thread Laurent Daverio
Hello List, I'd like to report a problem I've just encountered, occurring betwen Pyramid's CSRF protection and Deform. Basically, I have a Pyramid 2.0 web app configured along the lines of the "URL dispatch wiki tutorial"

Re: [pylons-discuss] pylonsproject.org and trypyramid.com updates

2022-02-13 Thread Laurent Daverio
Hello Steve, I will give it a look. Why not jump directly to Bootstrap 5? Current version is 5.1.3 Laurent. Le lun. 14 févr. 2022 à 02:29, Steve Piercy a écrit : > > Does anyone care to update our marketing websites pylonsproject.org and > trypyramid.com to the latest packages, including

Re: [pylons-discuss] pylonsproject.org and trypyramid.com updates

2022-02-18 Thread Laurent Daverio
Just added a "bootrstrap5" branch containing changes required to make the front page work with Bootstrap 5.1.3 Le sam. 19 févr. 2022 à 01:51, Laurent Daverio a écrit : > > Hello Steve, > > You can have a look at the current state of the works here: > https://github.co

Re: [pylons-discuss] pylonsproject.org and trypyramid.com updates

2022-02-18 Thread Laurent Daverio
way to keep the log clean. I think that's all for now, let me know what you think, and what I should improve. Cheers, Laurent. Le lun. 14 févr. 2022 à 11:06, Laurent Daverio a écrit : > > node-sass seems to be deprecated, and should be replaced with Dart > Sass (https://www.npmjs.com/pac

Re: [pylons-discuss] pylonsproject.org and trypyramid.com updates

2022-02-19 Thread Laurent Daverio
, deployed, and previewed by the public without cloning > and building locally. I've been doing this while working on Plone 6 > Documentation, and it saves a lot of time during reviews. > > https://620ff8a3c2a27f00081bebf3--6-dev-docs-plone-org.netlify.app/glossary.html#term-fence > >

Re: [pylons-discuss] pylonsproject.org and trypyramid.com updates

2022-02-18 Thread Laurent Daverio
iews. > > https://620ff8a3c2a27f00081bebf3--6-dev-docs-plone-org.netlify.app/glossary.html#term-fence > > --steve > > > On 2/18/22 4:41 PM, Laurent Daverio wrote: > > Just added a "bootrstrap5" branch containing changes required to make > > the front pa

Re: [pylons-discuss] pylonsproject.org and trypyramid.com updates

2022-02-14 Thread Laurent Daverio
node-sass seems to be deprecated, and should be replaced with Dart Sass (https://www.npmjs.com/package/node-sass). If you do just that (yarn remove node-sass; yard add -D sass), dependency problems just go away. I'm on a boat on Bosphorus, need to land soon, so the rest will have to wait a

Re: [pylons-discuss] pylonsproject.org and trypyramid.com updates

2022-02-13 Thread Laurent Daverio
ject, and build > up packages as needed. > > We use Hugo to generate the static sites. > > --steve > > > On 2/13/22 9:09 PM, Laurent Daverio wrote: > > Hello Steve, > > > > I will give it a look. Why not jump directly to Bootstrap 5? Current > > version

Re: [pylons-discuss] Hypatia alternative?

2022-04-17 Thread Laurent Daverio
Hi Thierry, when I started using Pyramid (Pylons, actually), my first idea was to integrate the Xapian library, written in C++. Coming from the Zope world, I tried to adopt some ideas from the ZCatalog. Xapian worked great, except for one problem: it's a library, not a server, thus it doesn't

Re: [pylons-discuss] pylonsproject.org and trypyramid.com updates

2022-04-17 Thread Laurent Daverio
Hello list, has anyone taken the time to look at the Bootstrap 5 port of the site? Cheers, Laurent. Le ven. 18 févr. 2022 à 23:51, Laurent Daverio a écrit : > > Hello Steve, > > You can have a look at the current state of the works here: > https://github.com/ldaverio

Re: [pylons-discuss] Hypatia alternative?

2022-04-17 Thread Laurent Daverio
> > Best regards, > Thierry > -- > https://www.ulthar.net -- http://pyams.readthedocs.io > > > Le dim. 17 avr. 2022 à 15:09, Laurent Daverio a écrit : >> >> Hi Thierry, >> >> when I started using Pyramid (Pylons, actually), my first idea was to >> integra

Re: [pylons-discuss] Display query and result on the same page

2023-11-23 Thread Laurent Daverio
Hi Mike, .filter() and .filter_by() are still both valid in SQLAlchemy 2.x. I think .filter() is a synonym of .where(). Note : what is deprecated, but still available, is the "query syntax". I even think it's no longer documented. Recommended syntaxes are here:

Re: [pylons-discuss] Display query and result on the same page

2023-11-23 Thread Laurent Daverio
ot;>Consultar > > > > The result is going to... > action="http://localhost:6543/queryx > > How do I take this result to the same page as the query > (templates/pac_recepx.jinja2), that is, place it below the query? > > Thank you in advance for your suppor

Re: [pylons-discuss] request for help upgrading the cookiecutter to support sqlalchemy 2.0

2024-01-29 Thread Laurent Daverio
Hello list, I think I could do that, unless someone has volunteered already (I have A LOT to do these days, wouldn't want to duplicate someone else's work). Laurent. Le lun. 29 janv. 2024 à 07:51, Michael Merickel a écrit : > Hey folks, > > I'd really appreciate it if someone was willing to

Re: [pylons-discuss] REF. Problem registering data in the bank

2023-11-16 Thread Laurent Daverio
Hello, don't you have, by any chance, a URL like this in your frontend? '/mod_plataforma/mod1_plataforma/recepx/${save_url}' If so, you should replace the simple quotes with backticks: `/mod_plataforma/mod1_plataforma/recepx/${save_url}` To me, it looks like a Javascript typo, not a

Re: [pylons-discuss] REF. Problem registering data in the bank

2023-11-16 Thread Laurent Daverio
^^ > AssertionError: Transaction must be committed using the transaction manager > > > Em quinta-feira, 16 de novembro de 2023 às 17:11:35 UTC-3, Laurent Daverio > escreveu: > >> I think you want to write "reque

Re: [pylons-discuss] REF. Problem registering data in the bank

2023-11-16 Thread Laurent Daverio
o=request.POST['endereco'] > cpf=request.POST['cpf'] > cns=request.POST['cns'] > pacientes=Paciente(id=id, name=name, idade=idade, data_nascimento= > data_nascimento, sexo=sexo, > raca=raca, fone=fone, endereco=endereco, cpf= > cpf, cns=cns

Re: [pylons-discuss] REF. Problem registering data in the bank

2023-11-16 Thread Laurent Daverio
Yes, that's true. If you write a monolithic app with Jinja templates, you will use {{ }}. If you use a Javascript frontend, you will find that `${}` is very convenient :) Le jeu. 16 nov. 2023 à 21:52, Florian Schulze a écrit : > With Jinja Templates you have to use {{ save_url }} not

[pylons-discuss] Problems when using Gunicorn and Postgresql together

2023-11-16 Thread Laurent Daverio
Hello list, this page seems to describe perfectly a problem I've stumbled on: https://stackoverflow.com/questions/64995178/decryption-failed-or-bad-record-mac-in-multiprocessing Namely, if you deploy with Gunicorn a Pyramid + PostgreSQL app based on the standard cookiecutter, you will run into

Re: [pylons-discuss] REF. FORMULARIOS E VALIDAÇÃO (PYRAMID)

2023-11-17 Thread Laurent Daverio
Hello, Deform has a big problem, it generates widgets for Bootstrap 3. I had patched mine it to make it compatible with Bootstrap 4, but now the standard version is Bootstrap 5. And I've switched to React and Material UI anyway. In retrospect, I think it's not a good idea to use a library which

Re: [pylons-discuss] REF. FORMULARIOS E VALIDAÇÃO (PYRAMID)

2023-11-17 Thread Laurent Daverio
creveu: > >> Deform has had a flurry of activity over the last couple of weeks to >> update the widgets to use Bootstrap 5.3. I hope to have time this weekend >> to make an alpha release, 3.0.0a. >> >> https://github.com/Pylons/deform/pull/529 >> >> --steve &

Re: [pylons-discuss] Getting error when running inspect in python 3.11, win11

2023-11-14 Thread Laurent Daverio
based on cookiecutter) for my >> first experiences. I have a modular division already structured. >> Now I'm trying to connect to my database structure and I'm encountering this >> error when I run my application. From the request: I need help to take this >> step and fi

Re: [pylons-discuss] Getting error when running inspect in python 3.11, win11

2023-11-14 Thread Laurent Daverio
uot; is not deprecated at all, only function "formatargspec" is. > > Em terça-feira, 14 de novembro de 2023 às 15:30:53 UTC-3, Laurent Daverio > escreveu: >> >> Hello, >> >> a couple of remarks before replying to your question : >> >> 1/ This l

Re: [pylons-discuss] Getting error when running inspect in python 3.11, win11

2023-11-14 Thread Laurent Daverio
Hello, a couple of remarks before replying to your question : 1/ This list is dedicated to Pylons and Pyramid, so a general question about the Python standard library is off-topic 2/ You could have googled "inspect formatargspec" and found answers 3/ You could have read the documentation of the

Re: [pylons-discuss] Getting error when running inspect in python 3.11, win11

2023-11-14 Thread Laurent Daverio
y first > experiences. I have a modular division already structured. > Now I'm trying to connect to my database structure and I'm encountering this > error when I run my application. From the request: I need help to take this > step and fix this problem. > > Em terça-feira, 14 de nov

Re: [pylons-discuss] Getting error when running inspect in python 3.11, win11

2023-11-14 Thread Laurent Daverio
learning). If you need > anything in this field, I am at your disposal. > Em terça-feira, 14 de novembro de 2023 às 17:17:54 UTC-3, Laurent Daverio > escreveu: >> >> Our messages crossed, my previous one contains the answer to your question: >> >> https://github.com/Pylons/

Re: [pylons-discuss] Question about creating routes

2024-03-14 Thread Laurent Daverio
fresh scope for each permutation. > > def make_routes(config, cat, op): > config.add_route… > > for cat in ('actes', 'constats'): > for op in ('archive', 'unarchive’): >make_routes(config, cat, op) > > > — Theron > > > > On Mar 13, 2024, at 4:36 PM, L

[pylons-discuss] Test

2024-03-13 Thread Laurent Daverio
-- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit

[pylons-discuss] Question about creating routes

2024-03-13 Thread Laurent Daverio
Hello list, it seems that Google is allowing me to post on here again. A couple of weeks ago, I was banned, both from emailing the list, AND from posting on the web group  I am trying to create a series of routes based on lambda functions, something like: ```

Re: [pylons-discuss] Question about creating routes

2024-03-13 Thread Laurent Daverio
Thank you everybody, I'll try to set up a working example tomorrow. Actually you're right, my question was formulated incorrectly, it may not be a question of lambdas. Basically, I was trying to create a series of routes in a reasonably concise way, something like this : 2 types of objects

  1   2   >