by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jul 01 07:41
    CastixGitHub synchronize #129
  • Jun 30 16:23
    CastixGitHub synchronize #129
  • Jun 30 16:21
    CastixGitHub opened #129
  • Jun 19 19:48

    brondsem on 0.10.2

    (compare)

  • Jun 19 19:48

    brondsem on master

    Version 0.10.2 (compare)

  • Jun 19 19:20

    brondsem on master

    MIM: Avoid errors from _ensure_… Merge pull request #25 from Tur… (compare)

  • Jun 19 19:20
    brondsem closed #25
  • Jun 19 19:17

    brondsem on master

    Use our __insert not pymongo pa… Merge pull request #24 from Tur… (compare)

  • Jun 19 19:17
    brondsem closed #24
  • Jun 18 21:32
    brondsem opened #25
  • Jun 18 21:30

    brondsem on mim_dot_dollar_wrong

    MIM: failing test for positiona… (compare)

  • Jun 18 21:28

    brondsem on mim_dot_dollar

    MIM: Avoid errors from _ensure_… (compare)

  • Jun 18 21:26

    brondsem on mim_dot_dollar

    MIM: Avoid errors from _ensure_… (compare)

  • Jun 18 15:19
    brondsem opened #24
  • Jun 18 15:19

    brondsem on mim_save_no_id

    Use our __insert not pymongo pa… (compare)

  • Jun 17 21:40

    brondsem on 0.10.1

    (compare)

  • Jun 17 21:40

    brondsem on master

    Version 0.10.1 (compare)

  • Jun 17 21:40

    brondsem on 0.5.7

    (compare)

  • Jun 16 20:51

    amol- on master

    Handle cursor iter when items a… (compare)

  • Jun 16 20:51
    amol- closed #22
Walter A. Boring IV
@hemna
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).