Questions tagged [turbogears2]

TurboGears 2.x is a "best-of-breed" full stack rapid development web framework written in Python.

TurboGears 2.x is a "best-of-breed" next generation full stack rapid development web framework written in Python.

It uses the currently subjectively "best of its breed" components such as Genshi/Kid (Templating), SQLAlchemy (Database ORM), Pylon (WSGI Stack) and repoze (Auth) and unites them with as little "glue code" as possible for a quick start off.

In short as found in a comment in the sources: TG2 : Pylons = Ubuntu : Debian.

It is similar in spirit to frameworks like Django, TG1 and Rails but aims to remove some of their frustrating limitations (handicapped ORMs that only speak with a very limited number of database systems and lack support for advanced DBM features like Stored Procs, Views, etc., unnatural templating, NIH syndrome and many more)

Source: TG Website, Docs @ http://turbogears.org/2.1/docs/

151 questions
1
vote
1 answer

Renaming TurboGears 2's Repoze Fields with TGAdmin

I've been working on renaming TurboGears 2's Repoze 'groups' field to 'roles' to free the namespace and db tables for other purposes. Also roles makes much more sense to me then groups because I have a strong Drupal background. Now I have found some…
William Chambers
  • 499
  • 2
  • 13
1
vote
1 answer

How automate using sh scripting

I'm a beginner with sh scripting and I need some help, can someone help me to convert this command lines extracted from Turbogears page to an sh script, thanks in advance. $ virtualenv --no-site-packages tg2env $ cd tg2env/ $ source…
Red Diesel
  • 55
  • 3
1
vote
1 answer

Angular.js and Genshi - conflicts using $

Hi I'm writing a WebApp using python, turbogears 2.2, and Genshi for my view\templates. On the view side, I'm also using Angular.js. most of the time it they work together. My problem is – when I want to use some stuff like $index inside an…
A-Palgy
  • 1,291
  • 2
  • 14
  • 30
1
vote
1 answer

genshi template greater than operator

I am using Genshi template engine in the Turbogears2 web framework. While writing the simple javascript if statement, I am getting the error "Unexpected token ; ". I am comparing few things in the table and printing its value if it is greater than…
neeraj
  • 89
  • 2
  • 8
1
vote
1 answer

file upload turbogears 2.3.1

how to do file uploading in turbogears 2.3.1? I am using CrudRestController and tgext.datahelpers and it is uploading the file in the sqlite3 database but in an unknown format. I want to make a copy of the uploaded file in the hard drive. My query…
neeraj
  • 89
  • 2
  • 8
1
vote
1 answer

How to create table defined in sqlalchemy schema in the Heroku server?

I have a very simple app that I'm building with Python, SQLAlchemy, PostgreSQL and Turbogears 2.3. The app works in my local machine, where I use SQLite. However, when I upload it to Heroku, I don't know how to create there the PostgreSQL tables…
Xar
  • 7,572
  • 19
  • 56
  • 80
1
vote
1 answer

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 plugin here). Requirements User password has to be…
tomis
  • 1,884
  • 1
  • 15
  • 28
1
vote
2 answers

TurboGears for ecommerce

Is there a good Open Source shopping cart implementation for TurboGears? (I found Satchmo for Django, but I'm coming up empty handed for TurboGears.) I'd like to avoid reimplementing this particular set of wheels.
retracile
  • 12,167
  • 4
  • 35
  • 42
1
vote
1 answer

Cart item management in python Turbogears 2.0

I'm new to python an I decided to give it a try with TG2 by developing a small store. So far I've been loving it, but I'm guessing that my coding parading is still very attached to java's Like for example, the add to cart method in my…
Juparave
  • 706
  • 5
  • 11
1
vote
1 answer

TurboGears2/SQLAlchemy: Inserting a new row into a table with an autoincrement Primary Key

I am a noob and am trying to get my head around TG2 and SQLAlchemy. The specific problem I am wrestling with at the moment is how to insert a new row into a table when the PK field is configured as autoincrement. For example: in my…
user167043
1
vote
1 answer

sqlalchemy child field order_by on backref

Answer no longer needed as I changed focus in code. (see my comment in answer) Post answers for future reference... How do I retrieve results from a one to many backref ordered by a field in the child? I need all somethings for the gid ordered by…
stuartz
  • 121
  • 4
  • 9
1
vote
3 answers

Switching databases in TG2 during runtime

I am doing an application which will use multiple sqlite3 databases, prepopuldated with data from an external application. Each database will have the exact same tables, but with different data. I want to be able to switch between these databases…
D R
  • 21,936
  • 38
  • 112
  • 149
1
vote
2 answers

How to generate forms dynamically based on the model objects in TurboGears?

Is there a way to generate a form based on a model object in turbogears? I came across that facility in Django - ModelForm where it generate the form based on the definition of the given model class. That is the exact feature I need in turbogears.
njs
  • 113
  • 8
0
votes
2 answers

function to be called every page request

I am looking for a way to log user activity on my site. I've got a standart TG2 quickstart project. "User" class in my model has additional column: class User(DeclarativeBase): ... last_activity = Column(DateTime) ... ...and i have a…
0
votes
2 answers

How to inject vars into the dict used for template by a decorator in TurboGears2?

When a method is exposed, it can return a dict used by a template : class RootController(TGController): @expose('myapp.templates.index') def index(self): self.mykey = "foo" self.mymenu = ["item1", "item2", "item3"] …