Questions tagged [pylons]

Pylons is a lightweight web framework emphasizing flexibility and rapid development.

Pylons

Pylons is an cross-platform and an open source web application written in . It makes extensive use of the Web Server Gateway Interface standard to promote reusability and to separate functionality into distinct modules. It is strongly influenced by Ruby on Rails: two of its main components, Routes and WebHelpers, are Python reimplementations of Rails features.

It was created by James Gardner and Ben Bangert and launched in september 2005.

At the current stable release (1.0 / May 28, 2010) it has more separation of the influence by Ruby on Rails and it can be seen in the routes module.

Resources

  • Gardner, James (2009) The Definitive Guide to Pylons. (APRESS)
  • Wikipedia (2011) Pylons (web framework). Last taken from: http://en.wikipedia.org/wiki/Pylons in february 26 2011
834 questions
12
votes
4 answers

SQLAlchemy declarative syntax with autoload (reflection) in Pylons

I would like to use autoload to use an existings database. I know how to do it without declarative syntax (model/_init_.py): def init_model(engine): """Call me before using any of the tables or classes in the model""" t_events =…
Juliusz Gonera
  • 4,009
  • 4
  • 25
  • 32
12
votes
1 answer

trouble getting pylint to find inherited methods in pylons/SA models

I have a Pylons app that I'm using SqlAlchemy declarative models for. In order to make the code a bit cleaner I add a .query onto the SA Base and inherit all my models from that. So in my app.model.meta I have Base = declarative_base() metadata =…
Rick
  • 13,176
  • 5
  • 23
  • 27
11
votes
3 answers

How do I return a CSV from a Pylons app?

I'm trying to return a CSV from an action in my webapp, and give the user a prompt to download the file or open it from a spreadsheet app. I can get the CSV to spit out onto the screen, but how do I change the type of the file so that the browser…
Eric the Red
  • 4,984
  • 10
  • 46
  • 63
11
votes
2 answers

Mark string as safe in Mako

I'm using Pylons with Mako templates and I want to avoid typing this all the time: ${ h.some_function_that_outputs_html() | n } I want to somehow mark the function, or a variable as safe (you can do that in Django) so I don't have to pipe-en all…
disc0dancer
  • 8,203
  • 11
  • 32
  • 45
11
votes
7 answers

Debug Pylons application through Eclipse

I have Eclipse setup with PyDev and love being able to debug my scripts/apps. I've just started playing around with Pylons and was wondering if there is a way to start up the paster server through Eclipse so I can debug my webapp?
Max Stewart
  • 3,543
  • 24
  • 28
11
votes
2 answers

Run Pylons controller as separate app?

I have a Pylons app where I would like to move some of the logic to a separate batch process. I've been running it under the main app for testing, but it is going to be doing a lot of work in the database, and I'd like it to be a separate process…
Galuvian
  • 298
  • 3
  • 11
10
votes
2 answers

How to connect to Cassandra inside a Pylons app?

I created a new Pylons project, and would like to use Cassandra as my database server. I plan on using Pycassa to be able to use cassandra 0.7beta. Unfortunately, I don't know where to instantiate the connection to make it available in my…
Pierre
  • 5,724
  • 3
  • 27
  • 45
10
votes
3 answers

Scaffolding in pylons

Is there anything similar to rails' scaffolding fo pylons? I've been poking around google, but fofund only this thing caled dbsprockets, which is fine, although probably way to much for my needs. What i really need is a basic CRUD thas is based on…
Bartosz Radaczyński
  • 17,696
  • 14
  • 48
  • 58
10
votes
2 answers

Is there a python implementation to .net automapper?

Automapper is a object-object mapper where we can use to project domain model to view model in asp.net mvc. http://automapper.codeplex.com/ Is there equivalent implementation in Python for use in Django(Template)/Pylons ? Or is there necessity for…
stoto
  • 304
  • 1
  • 4
  • 10
10
votes
2 answers

Decorators vs. classes in python web development

I've noticed three main ways Python web frameworks deal request handing: decorators, controller classes with methods for individual requests, and request classes with methods for GET/POST. I'm curious about the virtues of these three approaches.…
Tristan
  • 6,376
  • 4
  • 34
  • 62
10
votes
5 answers

Python Webframework Confusion

Could someone please explain to me how the current python webframworks fit together? The three I've heard of are CherryPy, TurboGears and Pylons. However I'm confused because TurboGears seems to use CherryPy as the 'Controller' (although isn't…
Vaer
9
votes
4 answers

Sqlalchemy: Latitude and Longitude Float Precision?

I'm using Sqlalchemy to define my tables and such and here is some code I came up with: locations = Table('locations', Base.metadata, Column("lat", Float(Precision=64), primary_key=True), Column("lng", Float(Precision=64), primary_key=True), ) I…
john
  • 2,933
  • 4
  • 25
  • 45
9
votes
5 answers

Scale now or later?

I am looking to start developing a relatively simple web application that will pull data from various sources and normalizing it. A user can also enter the data directly into the site. I anticipate hitting scale, if successful. Is it worth putting…
Nayan Jain
  • 178
  • 9
9
votes
5 answers

How do I use beaker caching in Pyramid?

I have the following in my ini file: cache.regions = default_term, second, short_term, long_term cache.type = memory cache.second.expire = 1 cache.short_term.expire = 60 cache.default_term.expire = 300 cache.long_term.expire = 3600 And this in my…
dave
  • 7,157
  • 15
  • 61
  • 99
9
votes
2 answers

The new file/directory structure of Pyramid (Pylons) is causing me some confusion

I've been developing in Pylons for a little while now and have recently learned they're merging with another framework to create Pyramid. I've been looking over example code to see the differences and it's causing a bit of confusion... For example,…
dave
  • 7,157
  • 15
  • 61
  • 99
1 2
3
55 56