Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Apr 05 13:40

    brondsem on master

    Fix typo Merge pull request #28 from inn… (compare)

  • Apr 05 13:40
    brondsem closed #28
  • Apr 04 20:05
    innerout opened #28
  • Mar 10 15:26

    amol- on master

    Update setup.py (compare)

  • Mar 10 15:24

    amol- on master

    Update README.rst (compare)

  • Mar 10 15:10

    amol- on master

    Cope for coveralls not installi… (compare)

  • Mar 10 14:54

    amol- on master

    Version 0.10.3 (compare)

  • Feb 12 10:06

    amol- on master

    Work-around fix for errors from… Merge pull request #7 from theg… (compare)

  • Feb 12 10:06
    amol- closed #7
  • Feb 11 16:05
    thegingerninja opened #7
  • Jan 02 16:30
    nphilipp closed #27
  • Jan 02 16:07
    nphilipp opened #27
  • Dec 18 2020 22:50
    CastixGitHub synchronize #20
  • Dec 18 2020 22:47
    CastixGitHub synchronize #20
  • Dec 18 2020 22:28
    CastixGitHub synchronize #20
  • Oct 22 2020 11:07
    CastixGitHub edited #20
  • Oct 22 2020 10:52
    CastixGitHub opened #48
  • Oct 21 2020 21:50
    CastixGitHub edited #20
  • Oct 21 2020 21:50
    CastixGitHub opened #20
  • Oct 08 2020 07:42

    amol- on master

    Test on Python3.9 (compare)

privlj
@privlj
@amol- Thanking you, will come back if I get stuck again :P
Walter A. Boring IV
@hemna
I'm trying to create a template that does a <py:include href="webcam.xhtml" />
the resulting html output adds a DOCTYPE as part of the include for webcam.xhtml
which it shouldn't
webcam.xhtml just is a tiny segment of html
how can I tell kajiki to not prepend <!DOCTYPE kajiki SYSTEM "kajiki.dtd"> to the contents of webcam.xhtml ?
Walter A. Boring IV
@hemna
I filed a defect
it includes sample template code and output, which seems broken
Alessandro Molina
@amol-
@hemna it's an hack, but have you tried renaming the included templates with .html instead of .xhtml? I suspect the loader might be triggering a DOCTYPE insertion due to html5 load mode.
include works fine in kajiki plain, so I suspect it's something about the loader configuration by TG that's causing that
Alessandro Molina
@amol-
Also, I usually do partials with py:import and py:def, it's usually a more reliable and well encapsulated way of making reusable snippets than just including the template content raw with py:include
Walter A. Boring IV
@hemna
I renamed the template files to html and then it failed to serve them
Alessandro Molina
@amol-
You changed the py:include expression to point to the new name, right?
Alessandro Molina
@amol-
@hemna Released a new version of Kajiki that should address your issue.
Walter A. Boring IV
@hemna
ok thank you. I just updated and the DOCTYPE tags seem to be gone :)
Nils Philippsen
@nphilipp
Hey everybody! Any idea how I could use a temporary PostgreSQL db for tests, like with the pytest-postgresql fixture which creates a temporary DB process just for tests? I'm struggling finding a way to insert this one's URL into TG's configuration for the tests, because the port number isn't known up-front.
Alessandro Molina
@amol-
When you call make_app you can pass options to replace those from .ini or app_cfg but I think the real hard part is that the setup fixture in tests relies on setup-app
Nils Philippsen
@nphilipp
Hmm. What do you think about creating a temporary INI file inheriting from test.ini (just like test.ini inherits development.ini) but overriding the sqlalchemy.url bit? I can't think of why it shouldn't work and it seems the least intrusive way to achieve it -- it's a real config file, so everything else should "just work" when pointed at it.
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
@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
@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 :/