Here's the syntax that works for me:
<%inherit file="${context.get('base_file')}"/>
And in the controller you'd have something like this:
c.base_file = '/base/index.html'
Even though the variable is named c. in the controller, when
you use context.get() you omit the "c."
On Wed, Aug 11, 2010
On Aug 14, 11:34 am, Myx wrote:
> Greetings fellow Pyloneers!
>
> I have started to encounter a quite annoying problem while working on
> my current project:
> The results from database querys are different from thread to thread.
>
> My project is a server for a flash game, the server contains c
I tried that command on a Windows machine and it did setup the environment
in c:\development\scripts, so I don't know that you're doing anything wrong.
I'm not on a Windows machine at the moment, but I believe virtualenv comes
with a virtualenv.exe or virtualenv-script.exe file. You should be able
try this in your config/environment.py's at the END of
load_environment function
pylons.config.update(config)
tm_pylons.start_extension()
without update, the recent pylons doens't work for me, too.
I copied my settings
[DEFAULT]
...
...
mail.on = true
mail.manager = immediate
mail.trans
On Aug 14, 2:59 pm, G wrote:
> Greetings, I am a new pylons user coming from the grails world. I'm
> attempting to get my toes wet by trying to build a simple RESTful web
> service. (using pylons 1.0)
>
> My most recent problem is trying to get routing working, I'm hoping to
> be able to do the
Hi Peter,
You need to add this line at the end of
config/environment.py load_environment
pylons.config.update(config)
I still don't know whether this is issue with documentation or issue
with pylons..
On Aug 14, 8:13 pm, Peter Hartmann wrote:
> Hello there,
> truth is, I was not using Pylons
Excerpts from Bzouchir's message of Wed Aug 11 10:16:21 -0300 2010:
> hi guys,
> I am trying to setup TurboMail 3 with Pylons 1.0
>
> Followed the docs
> http://packages.python.org/TurboMail/chapters/detailed.html#pylons
>
> I have added this to the development.ini
>
> **
> [DEFA
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 18 Aug 2010, at 22:59, Graham Higgins wrote:
The Pylons adaptor for TM uses old-style (i.e. 0.9.7) config-handling:
from pylons import config
Nope, wrong according to 1.0 docs...
http://pylonshq.com/docs/en/1.0/configuration/#getting-info
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 11 Aug 2010, at 14:16, Bzouchir wrote:
from turbomail.adapters import tm_pylons
tm_pylons.start_extension()
I'll hazard a(n educated) guess...
The Pylons adaptor for TM uses old-style (i.e. 0.9.7) config-handling:
from pylons impo
GOT IT! It was the ToscaWidgets middleware causing problems.
On 18 August 2010 21:45, Richie Ward wrote:
> I created my project with Genshi support instead of Mako and the
> Interactive Debugger does not show up when I raise an Exception.
>
> I found out that if I make a project with the default
So, it turns out I missed noticing the lines:
map.connect('/{controller}/{action}')
map.connect('/{controller}/{action}/{id}')
and didn't think about the order of my routes and these... By putting these
default routes after mine it fixed the problem - as {action} was not being
picked up f
Hello there,
truth is, I was not using Pylons since 0.9.7, but this piece of
documentation still seems relevant:
http://pylonshq.com/docs/en/1.0/configuration/#getting-information-from-configuration-files
So I have an auth.py file in /config which sets up, well, auth. It
takes three parameters fr
Instead of static inheriting the files, like this:
<%inherit file="base.mako"/>
I want to set the file names dynamically in the controller with the
context variable so that I can do this:
<%inherit file="${c.base_file}"/>
I tired but I got the "global name 'c' not defined" error.
Than I tried:
Greetings, I am a new pylons user coming from the grails world. I'm
attempting to get my toes wet by trying to build a simple RESTful web
service. (using pylons 1.0)
My most recent problem is trying to get routing working, I'm hoping to
be able to do the following:
map.connect('/books', contr
hi guys,
I am trying to setup TurboMail 3 with Pylons 1.0
Followed the docs
http://packages.python.org/TurboMail/chapters/detailed.html#pylons
I have added this to the development.ini
**
[DEFAULT]
...
mail.on = true
mail.manager = immediate
mail.transport = smtp
mail.smtp.server
I saw the developer of Python's ESAPI library recently published
Swingset, designed to educate about XSS (cross-site scripting) and
other vulnerabilities in python:
http://owasp-esapi-python-swingset.appspot.com/
Of particular note for Pylons community members is his demonstration
of a couple vul
Hello,
I have written a small tutorial on "Pylons authentication and
authorization using repoze.what".
http://sarafsaurabh.wordpress.com/2010/08/10/pylons-authentication-and-authorization-using-repoze-what/
Most of the stuff is copied over from the original pylons cookbook
tutorial. But I ran in
I created my project with Genshi support instead of Mako and the
Interactive Debugger does not show up when I raise an Exception.
I found out that if I make a project with the default mako, it works fine!
Can someone help me?
Is this a bug? If so can someone file it? I am having problems
register
Greetings fellow Pyloneers!
I have started to encounter a quite annoying problem while working on
my current project:
The results from database querys are different from thread to thread.
My project is a server for a flash game, the server contains code for
logging in and databaseing.
The idea is
I am trying to setup virtual environment on my computer to play around
with pylons.
I used the following command :
C:\>C:\Python26\python.exe "C:\Users\kunal\Downloads
\virtualenv-1.4.9\virtualenv
-1.4.9\virtualenv.py" C:\Development
Now when I am trying to install pylons in my virtual environme
Hi all,
I'm currently trying to bundle a Pylons application via py2exe,
however. I keep getting:
Traceback (most recent call last):
File "main.py", line 1, in
import paste.script.serve
File "paste\script\serve.pyc", line 18, in
File "paste\script\command.pyc", line 36, in
File "pkg
I have upgraded from 0.9.6 to 1.0. After the upgrade, the tests don't
work complaining that:
UnboundLocalError: local variable 'url' referenced before assignment
in my functional tests, whereas the url has been imported in my tests/
__init__.py
import pylons
from unittest import TestCase
from pa
Hello,
I'm new to Pylons. In the Forms section of the 1.0 documentation on
the Pylons website we're given the following example:
def email(self):
# Code to perform some action based on the form data
# ...
redirect(url(action='result'))
... but in a default 1.0 installation, the 'ur
On Thu, Aug 19, 2010 at 7:04 AM, karikris...@gmail.com <
karikris...@gmail.com> wrote:
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position
> 0: ordinal not in range(128)
>
This error means mako received non-unicode string, tried to cast
unicode(string) on it, and failed due to
Yeah, Mako is sooo easy to make your own custom tags.. Now if you mix in
dojo declarative tags you have magic. Simple XHR or any RPC you want.
Beautiful OO JS design, huge librariry, and 80% of the stuff is easy as a
custom dojo type tag which you can extend with mako.
On Wed, Aug 18, 2010 at 1:
Hi Krishnakant,
I think, you may need to roll out your own solution. Anyway, my
knowledge in this field is very limited.
Regards,
Krish
http://www.stacked.in [Pylons, Redis, JQuery]
On Aug 19, 12:34 am, Ian Wilson wrote:
> Formencode has a notion of nested variables/repetitions. Is that what
Now I get UnicodeDecodeError with pylons and mako. I referred the wiki
page
http://wiki.pylonshq.com/pages/viewpage.action?pageId=5439551 but good
not get much idea how to configure this for pylons 1.0 and above.
Here is error details
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in
Formencode has a notion of nested variables/repetitions. Is that what you
are trying to do ?
http://formencode.org/Validator.html#http-html-form-input
It can be tricky to setup but its possible.
On Wed, Aug 18, 2010 at 12:18 PM, Krishnakant Mane wrote:
> Hello all,
> I have off late posted a
Hello all,
I have off late posted a few questions which are challenging for me to
solve.
I have a need to create dynamic forms for my pylons application.
I had posted earlier on using tw.dynforms and asked for some guidance.
But now I know that I will be forced to change my templating engine to
WebHelpers 1.2 has been released. This version uses MarkupSafe, which
is an implementation of ``literal`` and ``escape`` that's more secure
and has a C speedup for escape. Pylons and Mako have also switched to
MarkupSafe, so if you're on Pylons 1.0.1 you already have it.
The other changes are all
30 matches
Mail list logo