Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 15 15:19

    brondsem on master

    Version 0.11.2 (compare)

  • Oct 14 21:14
    brondsem closed #43
  • Oct 14 21:14

    brondsem on master

    Support distinct() keys travers… (compare)

  • Oct 14 21:13

    brondsem on master

    Improve a few type hints (compare)

  • Oct 14 21:13
    brondsem closed #44
  • Oct 14 20:19
    brondsem opened #44
  • Oct 14 20:19
    brondsem opened #43
  • Oct 14 20:19

    brondsem on more_hints

    Improve a few type hints (compare)

  • Oct 14 20:18

    brondsem on deep_distinct

    Support distinct() keys travers… (compare)

  • Oct 12 08:48

    amol- on develop

    Test on 3.9 (compare)

  • Sep 24 14:01

    amol- on develop

    Address warning (compare)

  • Sep 09 22:32

    brondsem on 0.11.1

    (compare)

  • Sep 09 22:32

    brondsem on master

    Include py.typed and .pyi files… Version 0.11.1 (compare)

  • Sep 09 21:53

    brondsem on 0.11.0

    (compare)

  • Sep 09 21:52

    brondsem on master

    Version 0.11.0 (compare)

  • Sep 09 21:50

    brondsem on master

    remove super-old benchmark files Prep for release: declare py3.5… (compare)

  • Sep 09 21:44

    brondsem on master

    Update docs/sphinx_runsnippet.p… Let docs be built without a run… (compare)

  • Sep 09 21:44
    brondsem closed #41
  • Sep 09 21:42
    brondsem opened #41
  • Sep 09 20:16

    brondsem on master

    add type annotations and stubs Basic py3 updates for sphinx do… (compare)

Nilesh Govindrajan
@nileshgr

Hello folks

How do I define a hidden field dynamically whose name is controlled via a config parameter?

the name of the field itself is static
Alessandro Molina
@amol-
@nileshgr I think you can just pass a name = to the field itself. But I'm not sure what you would refer to as the name. Because there is also an id and a key.
The key in practice defines "in which parameter you find the value for that widget"
so I'm not sure if maybe you are thinkingo f that one
Nilesh Govindrajan
@nileshgr
@amol- basically I want to define the field name dynamically based on the value of tg.config['csrf.token_name']
Using the prepare method of twf.Form I am able to set the value of the HiddenField to csrf_token value available in tg.request, provided a field with name tg.config['csrf.token_name'] exists in the form
tyoc213 (David L)
@tyoc213

Hi there, I have a gived a turbogears project that is tied to python 2.7, if I wanted to upgrade to 3.8 which steps should I take?

Or it is better to start with a fresh TG project and start copying things there?

samjustice
@samjustice
I've done that recently (well a year ago so it's not super fresh). Mostly it's not too bad. There are some tools that can automate a lot of it like converting print to print(). Then run unit tests and see what breaks. Or curse the devs that didn't write unit tests and start running it and see what breaks. Really just follow guidelines for upgrading any project from 2.7 to 3.x
Alessandro Molina
@amol-
@tyoc213 usually porting TG projects should be fairly easy, TG itself takes care of most of the idiosyncrasies of Py2VSPy3 and to you everything is still exposed as it was. You might have to change some iterations etc, but mostly porting the existing codebase should be fairly quick.
tyoc213 (David L)
@tyoc213
@samjustice you mean I jsut need to run 2to3 ?
@amol- The main problem I have now are the dependencies, for example, Mysql-some doesnt exist for python 3... I just created a tg with python 3 and they use sql alchemy... and it seem that I doesnt need mysql headers anymore (like with the version 2.7)
so I think, I will start copying things from the old tg python 2.7 project to this one, piece by piece. Or maybe I should just overwrite old requeriments with new one?? :s
HoneySong
@HoneySongJ
Hi there, I'm looking for a way to updated data in realtime.Is there any way to update in real time?
Alessandro Molina
@amol-
@HoneySongJ I think ServerSentEvents are probably the easiest solution to that problem.
See https://www.slideshare.net/__amol__/reactive-realtime-web-applications-with-turbogears2 it's a fairly old presentation but covers both SSE and SocketIO (I'm not sure gevent-socketio still works with newest gevent versions btw).
Moshe Malawach
@moshemalawach
Wasn't aware of that room !
Alessandro Molina
@amol-
It's promoted on the Github page of TG2, but many people don't yet know it exists :D
michael-goebel
@michael-goebel
Hi everyone! I am working with a team of other graduate students to update an existing python 2.7 TG 2.1.5 application to python 3.7 and the newest TG release. The codebase relies heavily on utilities from the Pylons Project (Pylons, PasteDeploy, WebError, WebOb, WebTest, and Waitress), some of which have been deprecated in python 3. Our application also utilizes Zope and Paste. The codebase was started in 2004, with incremental updates throughout the years, but in need of a larger overhaul now. Is it possible, and recommended, to use TG for all of the web framework functionalities? If so, are there any resources you would recommend to help in this process?
Alessandro Molina
@amol-

@michael-goebel From 2.1.5 it should be doable to upgrade up to 2.4
There are some big changes, but nothing that should require you to rewrite things from scratch apart maybe the usage of TW2 instead of TW1.

My suggestion is to read the upgrade guidelines version by version -> https://turbogears.readthedocs.io/en/development/reference/upgrading.html

You can try to excecute them all at once, which is more complex but faster or just upgrade one version at the time. From 2.1 to 2.2 and then to 2.3 and so on... Once you are on TG2.2 and TW2 the jump to newer versions should be more straightforward.

For example Kallithea recently moved from using Pylons to TG2.4 when they upgraded to PY3
It was a fairly interesting project but in the end very little of the controllers had to be changed, most of the work happened in setup code.
And if they have been able to move from Pylons (which in the end is even a different framework) to TG2.4 without major hiccups, I'd say moving from TG2.1 to TG2.4 should be totally doable :D
Amil Khan
@amilworks
Whats up everyone! Has anyone integrated Keycloak authentication into their TurboGears2 webapp? I can't get the OpenID implementation to work with Keycloak so I was wondering if anyone made their own plugin or can provide any advice on how to go about this. Thanks!
Vincenzo Castiglia
@CastixGitHub
Hello everyone, I'm looking for feedbacks on a possible switch to pytest of newly quickstarted projects: TurboGears/tg2devtools#20
Alessandro Molina
@amol-

@CastixGitHub note that PR includes some changes to quickstart that were already discussed in a previous PR: https://github.com/TurboGears/tg2devtools/pull/19/files

The setting up your version control system is definitely out of the scope of gearbox quickstart. It might go in a dedicated gearbox command like gearbox gitignore or things like that providing a good ignore file for TG projects. But doing git init is definitely out of the scope of both gearbox and tg.

Rafael de Albuquerque Ribeiro
@rafaelri
Hi everyone, I am porting the persistence code of a python application from mongoengine to ming but I couldn't figure out how to map a nested class using the imperative mode ( https://ming.readthedocs.io/en/latest/baselevel.html#ming-baselevel ). I was willing to map a class that had a nested collection of a different class.
Hassan Igbaria
@TechComet
editor password ?
1 hour to get manager password
Alessandro Molina
@amol-
@TechComet Maybe just look at your websetup/bootstrap.py ? :D
languitar
@languitar:matrix.semipol.de
[m]
Hi, is there a chance to use multi-document transactions with Ming?
Alessandro Molina
@amol-
There is an ongoing experimental branch.
but it's fairly complex to finish due to the conflicts between the pymongo session and ming session.
languitar
@languitar:matrix.semipol.de
[m]
ok, seems to be hard problem to find a Python MongoDB ODM with change tracking and support for multi-document transactions :/
baas-hans
@baas-hans
Afternoon, I have been going through tabs and tabs of resources looking for an answer, but I feel stupider than when I started (which was already a large amount). Is there something elusive about trying to switch on the Secure and HttpOnly flag for cookie based auth?
Edit: Just assume I know nothing (which is close to the truth) and point me to the harshest docs that definitely contain some crumb to follow.