Questions tagged [turbogears]
TurboGears, another open source MVC-style Web application framework based on Python.
110
questions
2
votes
1
answer
27
views
Turbogears2: App not starting as sub-package
I'm trying to deploy TurboGears as the sub-package frontend of my main application MainApp. Following, the structure of my project:
.
├── MainApp
│ ├── MainApp.egg-info
│ ├── backend
│ ├── ...
0
votes
1
answer
33
views
How to paginate when page using POST requests, in turbogers?
I've been trying to paginate a search results page. Which uses POST requests to submit my search form.
I just included the parameters in the pager function and it uses GET method as default.
"<a ...
0
votes
1
answer
40
views
TurboGear framework python 3.7 doesnt work quickstart
I have a problem with my programming environment, after many tries to use turbogears library in my project (I need the DataGrid method) I left it and try another project.
I think I make some kind of ...
0
votes
1
answer
90
views
Use JWT with TurboGears2
I'm currently stopped in my work because of some authentication work on a project.
I set up a REST API, which needs to have a JWT authentication system.
Some work was already done and I overrode it. ...
0
votes
1
answer
62
views
Turbogears 2.3.10 error kajiki template with pluggable application
I used turbogears 2.3.10 with kajiki template, I created applicantion name samples and created pluggable application name plugapp.
(I see in http://turbogears.readthedocs.io/en/latest/turbogears/...
-2
votes
2
answers
53
views
How to make TurboGears treat '%2F' differently from '/' when routing?
I have a simple TurboGears 2 script, named app.py:
#!/usr/bin/env python3
from wsgiref.simple_server import make_server
from tg import expose, TGController, AppConfig
class RootController(...
1
vote
1
answer
61
views
Which characters does TurboGears replace in the URL?
I have a simple TurboGears 2 script, named app.py:
#!/usr/bin/env python3
from wsgiref.simple_server import make_server
from tg import expose, TGController, AppConfig
class RootController(...
0
votes
2
answers
716
views
Using sqlalchemy dburi with Oracle using External Password Store?
I am trying to get a oracle sqlalchemy dburi working with an external password store (Oracle Wallet)
I have tried using the standard sqlplus syntax for a external password store with no luck..
...
0
votes
1
answer
46
views
How to disable Logging when start turbogear2?
I would like to disable the logging in this picture (in the red box):
I use turbogears 2.3.7. When I start gearbox server and access my url http://localhost:8778. in log will show access url.
For ...
3
votes
1
answer
425
views
Unable to install TurboJson 1.3.2 using easy_install
easy_install -U TurboJson is failing with the below error-
user@ubuntu-dev:~$ sudo easy_install -U TurboJSON
Searching for TurboJSON
Reading pypi.python.org/simple/TurboJSON link
Best match: ...
0
votes
0
answers
67
views
python email sent is not in sequential order
Scenario :
1 : if multiple user are logged in and clicked on "request" button
2 : A user has opened multiple tabs in browser for the same url and click "request" button
NOTE: autogrant check ...
0
votes
1
answer
32
views
How to validate functions with variable parameters in TurboGears?
For functions with fixed number of parameters validations works fine,
Eg:
@validate(validators= {'foo': bar })
def func(self, foo=None):
pass
However I am facing difficulty to validate a ...
2
votes
1
answer
172
views
TurboGears and backlash: How to add extra, per-request context to Raven for more informative Sentry reports?
Through backlash, TurboGears supports error reporting to Sentry via Raven. Enabling the error reporting is quite easy, just add the appropriate setting in the .ini configuration file, for example:
[...
0
votes
1
answer
86
views
Turbogears abort function automatically escapes HTML code
I would like to use some HTML messages in the turbogears abort function.
Although the name does not match exactly (I use the 'tg.abort' function), this is the abort definition I found :
abort
The ...
1
vote
0
answers
155
views
Catch exceptions in CherryPy 3.2 during body.process
I got the following error in a live site where a utf character (test string 'Îñţérñâţîöñåļîžæ†îøñ') was submitted:
400 Bad Request
The request entity could not be decoded. The following charsets ...
0
votes
1
answer
238
views
How to translate JavaScript string in TurboGears
I can translate strings in python and html files. But When I translate JavaScript strings, I get this error in browser console:
Uncaught ReferenceError: _ is not defined
My setup.py:
...
0
votes
1
answer
75
views
How to print variable number of items using turbogears templates
Hello I've been tasked to work on a turbogears project not knowing anything about the webstack. :)
Anyways, I've been going through some turbogears tutorials and I had a question about printing a ...
0
votes
1
answer
50
views
how to launch TurboGears after installation on windows7
I tried to install Python TurboGears 2.1 on windows7 with python 3.3 by given instruction on this url (http://www.blog.pythonlibrary.org/2011/08/14/turbogears-2-setting-up-on-windows/)
after ...
0
votes
1
answer
124
views
Running TurboGears2 in Amazon EC2
I would just like to ask if anybody here has run Turbogears2 from an Amazon EC2 instance. I've been looking for a way to do it, but so far searching the Web hasn't given me anything I could use as an ...
7
votes
3
answers
4k
views
Pip freeze gives me this error related with git
I am working with python and git on a simple Turbogears2 project that I've built just for fun. In a certain moment I want to deploy it to Heroku, so I do the usual pip freeze > requirements.txt and ...
0
votes
1
answer
61
views
Are Turbogears2 apps deployable in Heroku?
I have been googling quite a bit about this topic but have found pretty much nothing about it.
Does any body know if it is possible to deploy Turbogears2 apps to Heroku?
1
vote
1
answer
527
views
Turbogears 2: authentication, password in different table, feedback when update
I'm using turbogears 2.2 for writing web application like it seems to be really powerful framework, however there are many blackboxes like authentication as I don't understand them well (repoze.who ...
3
votes
2
answers
3k
views
how to using dateadd in sqlalchemy with filter?
The sql expression :
select *
from order
where status=0
and adddate(created_time, interval 1 day)>now();
python code:
from sqlalchemy.sql.expression import func, text
from datetime ...
0
votes
2
answers
63
views
TurboGears loads page twice
I have noticed strange thing. When I have in my RootController:
class RootController(BaseController):
secc = SecureController()
error = ErrorController()
@expose('app.templates.index')
...
4
votes
1
answer
330
views
How to use custom sys.excepthook in RootController in TurboGears 2.2.2
I want in my TB app to log all exceptions to a log file. So, I tried to use custom sys.excepthook as usual. But every exception is still raised and nothing is logged. Here is my code:
class ...
0
votes
1
answer
81
views
Turbogears noobie How can I see the contents of kw before i add them to the database
I am a python/Turbogears noob and I really need your help. I read all the tutorials i could find and believe to be relevant to my problem.
I need to create a method/function for the kw to get the ...
3
votes
1
answer
446
views
Configuration of Turbo Gears with Eclipse
I cannot find a way to get eclipse and TurboGears to work together.
I searched a lot online for an answer and cannot find it for the life of me.
I've successfully installed tg.devtools TurboGears2 ...
0
votes
1
answer
72
views
Turbogears on bluehost
Has anyone successfully installed TurboGears or CherryPy on BlueHost? There are listings on the web, but none of them are viable or the links to the scripts are broken.
However, Bluehost Tech ...
0
votes
1
answer
137
views
How to configure ToscaWidgets 2 on a TurboGears 2.2 with mount Proxy deploy
I have a working turbo gears 2.2 website, deployed as a mount reverse-proxy, exp:
https://Some-Domain.com/mySite
I know how to configure the webserver to work as a mounted site, but I don't know ...
1
vote
1
answer
67
views
Getting the description of the database with sqlalchemy
How can I find out the desciption of the database with sqlalchemy much like django's
sqlall command .
$ python manage.py sqlall
Can I run something similar to sqlall in turbogears admin or with ...
2
votes
2
answers
582
views
A django like unique together in turbogears/sqlalchemy
This question essentially two parts.
1. I have a situation where I require things to be unique together i.e the elements in db need to be unique together with each other.
Lets say we have a model ...
0
votes
1
answer
880
views
SqlAlchemy: proper way to do a bare exists query
I've the following construct which seems to produce the desired SQL:
>>> print session.query(exists('1').where(MyTable.name=='x'))
SELECT EXISTS (SELECT 1
FROM my_table
WHERE my_table.name =...
0
votes
1
answer
683
views
How to pass raw image data in turbogears to mako template for scr=data:image/jpg
I would like to pass raw image data in TurboGears2 to the mako template to use in an img tag
(ie., scr=data:image/jpg,base64,${imagedata}).
The image is retrieved from sql server image format
I ...
0
votes
1
answer
56
views
Change Turbogears paster serve directory
I'm a bit new to Turbogears, but wondering if someone can help me out...
I have TG setup in /var/tg/user/env/
where there are dirs...
bin/
include/
lib/
local/
src/
paster.log
development.ini
I ...
0
votes
1
answer
115
views
TurboGears2.2.0 install/run error when nosetests and paster setup-app development.ini
I encountered a problem after I finished all process of installing TurboGear2 on my OS X 10.8.2.
Using Python2.7, TurboGear2.2.0
The installing process was based on tutorial of official website: http:/...
0
votes
1
answer
291
views
Remove all user's cookies/sessions when password is reset
I'm interested in improving security of my TurboGears 2.2 application so that when user changes his password, it logs him out from all sessions and he must login again. The goal is when user changes ...
2
votes
0
answers
85
views
cachebusting for all static resources in Turbogears 1.0b1
Having a problem with stale css and js files being cached in the browser.
I am using the cache-buster technique of appending a query parameter with a datestamp
to static resource url's named ...
2
votes
1
answer
173
views
Integrate django application with turbogears
I am working with a legacy web application based off of Turbogears 1.1 (CherryPy 2.3) and I would like to integrate it with a Django 1.4 web application. What I would like to do ideally is find some ...
0
votes
1
answer
117
views
Turbogears. Writing controller methods
The index method is the start point of any TurboGears controller class. Each of the URLs
localhost:8080
localhost:8080/
localhost:8080/index
is mapped to the RootController.index() method.
How can ...
0
votes
2
answers
138
views
check if turbogears public file exists
I am new to turbogears and have an app that I am creating with multiple directories under public/media/ballots. I need to see if a directory exists.
path = "public/media/ballots/" + x['directoryName'...
0
votes
1
answer
414
views
CherryPy server stopped when i run my Turbogear application
When i run my application, it is getting stopped and reports the following error:
2012-06-16 02:40:51,767 turbogears.startup INFO Binding metadata for SQLAlchemy...
2012-06-16 02:40:51,785 cherrypy....
1
vote
2
answers
433
views
twitter-bootstrap based toscawidget
Is there any project that use twitter-bootstrap in toscawidget templates? imo turbogears project really can benefit from twitter-bootstrap to create a high quality interface
1
vote
0
answers
60
views
Exposing an HTTP proxy through a Turbogears controller
I have a webapp implemented in TurboGears 1.1 that's kind of a front-end for a REST API. I'm trying to expose a URL path on my webapp that's a proxy to the original REST API, so I can access "http://...
28
votes
1
answer
11k
views
SQLAlchemy declarative: defining triggers and indexes (Postgres 9)
Is there a way in the SQLAlchemy class of a table to define/create triggers and indexes for that table?
For instance if i had a basic table like ...
class Customer(DeclarativeBase):
...
0
votes
2
answers
198
views
Turbogears2: analog of django context processors
Is there any analog of django context processors in turbogears2?
In tg1 was stdvars, but not in tg2 anymore.
Explaining:
I need to have some template tags, avaible on each page, without obvious ...
0
votes
1
answer
249
views
How to access a static file in controller in turbogears
I have an XML file in /my_project/public/xml/file.xml, that I want to read and parse it in one method in controller. The file can be easily accessed through a template, but I have no experience with ...
1
vote
1
answer
314
views
How to set the 'value' parameter for a hidden field in runtime in Turbogears
In order to set the value for a HiddenField in toscawidget, the only parameter I've found useful is 'default' (surprisingly, parameter 'value' in toscawidgets doesn't represent 'value' in html). ...
1
vote
0
answers
217
views
i can't run tg-admin in python2.7, how can i do that?
I was trying to run tg-admin in ubuntu 11.04 on python 2.7 but I keep having an error shown below, but later I was able to run it using python 2.6 like this :
#!/usr/bin/python
# EASY-INSTALL-...
0
votes
1
answer
74
views
Mixing cython and turbogears 2.1
Is it possible to integrate Cython and TG2? I have one computation (written in python) which is heavily numerical and would largly benefit from rewriting into C or cython.
5
votes
2
answers
988
views
Turbomail Integration with Pyramid
I am in need of a method to send an email from a Pyramid application. I know of pyramid_mailer, but it seems to have a fairly limited message class. I don't understand if it's possible to write the ...