Previously Dalius Dobravolskas wrote:
On Mon, Jan 19, 2009 at 9:34 AM, Wichert Akkerman wich...@wiggy.net wrote:
Previously Dalius Dobravolskas wrote:
Hello,
On Mon, Jan 19, 2009 at 7:44 AM, Roberto Allende ro...@menttes.com
wrote:
My motivation is to write a unit testing
On Mon, Jan 19, 2009 at 10:18 AM, Wichert Akkerman wich...@wiggy.netwrote:
I run the controller method in isolation, which means:
- no other middleware that influences the result
- I can put stuf in c before I call the controller method, and
introspect c afterwards
- no paste.fixture or
On Sun, Jan 18, 2009 at 6:05 PM, walterbyrd walterb...@iname.com wrote:
And if so, why?
yes, so does php, your point?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
pylons-discuss group.
To post to this group,
In interactive debugger:
hasattr(c,'name')
True
hasattr(c,'nafssadffa')
True
Huh? Why does hasattr return True for attributes that clearly don't
exist in c?
On related note, how to check for existence of attributes in c in
templates? I want to do smth like:
%if c.hasattr('name'):
P.S.
If I try:
%if c.hasattr('name'):
in template, I get:
TypeError: 'str' object is not callable
Does that mean that c.hasattr tries to call 'name' for some reason?
Regards,
mk
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
I use ajax for few pages in my app.
Sometimes I need to redirect page from example: index to index2
The problem is when I get index with request.is_xhr == True and have to
redirect to index 2.
In next page request.is_xhr == False.
jQuery do not add 'X-Requested-With': XMLHttpRequest' to
OK this works only after adding config['pylons.strict_c'] = True to
environment.py:
%if not hasattr(c, 'name'):
c.name has no attribute 'name'
%else:
c.name has attribute ${c.name}
%endif
I still don't get why hasattr on c has to return True if pylons.strict_c
is turned off (well I do
Hi,
You can do what you want with the response. In pylons, both request
and response are webob objects
(http://pythonpaste.org/webob/reference.html#id3)
from pylons import response
response.headers['Blah'] = 'blah'
Regards,
--
Gael
On Mon, Jan 19, 2009 at 2:12 PM, Tomasz Narloch
Is there anyway to output forms fields without the table structure?
Right now when I do this:
snipping leading template stuff
${h.field(
Document Title,
h.text(name='title'),
required=True
)}
${h.field(
Department,
h.text(name='department'),
required=True
)}
snip
I
this is annoying me...
just realized that some code has been failing because it is reading an
image upload twice.
the first time is fine.
the second time is empty.
it seems this is because the file is stored as a socket._fileobject
(
just to add...
i'm currently using a workaround of reading this into a
cStringIO.StringIO object that supports seek(0) -- i just think its a
little silly that I need to do that.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
Being a pylons newb myself, the first thing I did was write auth and
registration. It took a day.Granted I wasn't trying to support every
auth method I could think of like authkit does,but I learned lots.If
you want auth (and other things) rolled in use use turbogears. But
getting basic
The SQLAlchemy argument is a very compelling one. I have an application that,
while being a CMS, has heavily relational data. I was urged by different
people to do it either in Django or Plone, but went with Pylons. My domain
objects are far easier to work with, though I did suffer from the
hasattr returns true because of the way that tmpl_context (c) is implemented.
https://www.knowledgetap.com/hg/pylons-dev/file/98d7b9278acd/pylons/util.py#l115
You have ContextObj, and AttribSafeContextObj. By default, Pylons uses
AttribSafeContextObj. Looking at the code, you can see that the
any chance the next version of beaker will be better integrated with
pylons so it doesn't flush to the datastore on ever save()
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
pylons-discuss group.
To post to this
On Sun, Jan 18, 2009 at 4:05 PM, walterbyrd walterb...@iname.com wrote:
And if so, why?
Everybody who uses Pylons knows that other frameworks exist and had
maybe tried one or two others, but has made a conscious choice that
they like Pylons' style better. A lot of Django fans have done the
Hi,
in an .mako template I can use the global variable c. Is there a way
to call an other controller from the template via h.url_for and still
use the content of the variable c as in the template?
In the called controller c seems to be empty again.
Regards,
Michael
Hello.
I've quite standard Pylons project that I'm working on for last few
months. Recently I've cleaned up the code and created
project.lib.helperslib subdir where I have created multiple python
modules with corresponding functions e.g. date.py, buttons.py, links.py,
etc. When functions were
Have you got strict_c set to False?
http://wiki.pylonshq.com/pages/viewpage.action?pageId=11174779#What%27snewinPylons0.9.7?-ImplicitBehaviorchanges
On Mon, Jan 19, 2009 at 12:19 PM, mk mrk...@gmail.com wrote:
In interactive debugger:
hasattr(c,'name')
True
hasattr(c,'nafssadffa')
On Mon, Jan 19, 2009 at 7:39 AM, Josh Winslow jwins...@gmail.com wrote:
Is there anyway to output forms fields without the table structure?
Right now when I do this:
snipping leading template stuff
${h.field(
Document Title,
h.text(name='title'),
required=True
)}
The field
On Tue, Jan 20, 2009 at 5:28 AM, Jonathan Vanasco jonat...@findmeon.com wrote:
Django is like Rails -- it forces you into building certain types of
apps with certain styles.
If you build a Django app , you're pretty much married to it -- and
can expect it to work much like other apps.
On Mon, Jan 19, 2009 at 4:52 AM, Wolverine ktom...@gmail.com wrote:
Hello.
I've quite standard Pylons project that I'm working on for last few
months. Recently I've cleaned up the code and created
project.lib.helperslib subdir where I have created multiple python
modules with corresponding
On Mon, Jan 19, 2009 at 2:54 AM, Michael m...@micm.eu wrote:
Hi,
in an .mako template I can use the global variable c. Is there a way
to call an other controller from the template via h.url_for and still
use the content of the variable c as in the template?
In the called controller c seems
On Mon, Jan 19, 2009 at 6:20 PM, Colin Flanagan quadvill...@yahoo.com wrote:
I'm curious if Django's CMS reputation comes from the fact that it's used by
a lot of newspapers and content providers, or if there really is something
that makes it advantageous over other frameworks.
Django's
On Mon, Jan 19, 2009 at 9:44 AM, Mark Hildreth
mark.k.hildr...@gmail.com wrote:
hasattr returns true because of the way that tmpl_context (c) is
implemented.
https://www.knowledgetap.com/hg/pylons-dev/file/98d7b9278acd/pylons/util.py#l115
You have ContextObj, and AttribSafeContextObj. By
On Jan 19, 9:20 am, Colin Flanagan quadvill...@yahoo.com wrote:
The SQLAlchemy argument is a very compelling one. I have an application
that, while being a CMS, has heavily relational data. I was urged by
different people to do it either in Django or Plone, but went with Pylons. My
On Jan 19, 1:29 pm, Wyatt Baldwin wyatt.lee.bald...@gmail.com wrote:
On Jan 19, 9:20 am, Colin Flanagan quadvill...@yahoo.com wrote:
The SQLAlchemy argument is a very compelling one. I have an application
that, while being a CMS, has heavily relational data. I was urged by
different
On Jan 19, 12:26 pm, Noah Gift noah.g...@gmail.com wrote:
On Tue, Jan 20, 2009 at 5:28 AM, Jonathan Vanasco jonat...@findmeon.com
wrote:
Django is like Rails -- it forces you into building certain types of
apps with certain styles.
If you build a Django app , you're pretty much married
On Mon, Jan 19, 2009 at 10:29 PM, Wyatt Baldwin
wyatt.lee.bald...@gmail.com wrote:
On Jan 19, 9:20 am, Colin Flanagan quadvill...@yahoo.com wrote:
The SQLAlchemy argument is a very compelling one. I have an application
that, while being a CMS, has heavily relational data. I was urged by
On Tue, Jan 20, 2009 at 10:40 AM, Wyatt Baldwin
wyatt.lee.bald...@gmail.com wrote:
On Jan 19, 12:26 pm, Noah Gift noah.g...@gmail.com wrote:
On Tue, Jan 20, 2009 at 5:28 AM, Jonathan Vanasco jonat...@findmeon.com
wrote:
Django is like Rails -- it forces you into building certain types of
On Mon, Jan 19, 2009 at 3:15 PM, Lawrence Oluyede l.oluy...@gmail.com wrote:
On Mon, Jan 19, 2009 at 6:20 PM, Colin Flanagan quadvill...@yahoo.com wrote:
I'm curious if Django's CMS reputation comes from the fact that it's used by
a lot of newspapers and content providers, or if there really
On Mon, Jan 19, 2009 at 1:29 PM, Wyatt Baldwin
wyatt.lee.bald...@gmail.com wrote:
On Jan 19, 9:20 am, Colin Flanagan quadvill...@yahoo.com wrote:
The SQLAlchemy argument is a very compelling one. I have an application
that, while being a CMS, has heavily relational data. I was urged by
On Mon, Jan 19, 2009 at 4:03 PM, Mike Orr sluggos...@gmail.com wrote:
On Mon, Jan 19, 2009 at 1:29 PM, Wyatt Baldwin
wyatt.lee.bald...@gmail.com wrote:
On Jan 19, 9:20 am, Colin Flanagan quadvill...@yahoo.com wrote:
The SQLAlchemy argument is a very compelling one. I have an application
On Tue, Jan 20, 2009 at 11:17 AM, Jorge Vargas jorge.var...@gmail.com wrote:
On Mon, Jan 19, 2009 at 4:03 PM, Mike Orr sluggos...@gmail.com wrote:
On Mon, Jan 19, 2009 at 1:29 PM, Wyatt Baldwin
wyatt.lee.bald...@gmail.com wrote:
On Jan 19, 9:20 am, Colin Flanagan quadvill...@yahoo.com
On Mon, Jan 19, 2009 at 2:24 PM, Noah Gift noah.g...@gmail.com wrote:
Although, this might eventually move to an even more common United
core that many web frameworks extend off of:
http://www.openplans.org/projects/pypefitters/
Well, that requires some explanation, Pypefitters is a group
What's the blessed way for my application to get its version string
(eg, the 0.1.0dev_r159 portion of the egg name
application-0.1.0dev_r159-py2.4.egg)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
On Mon, Jan 19, 2009 at 6:36 PM, will welch welch.quietple...@gmail.com wrote:
What's the blessed way for my application to get its version string
(eg, the 0.1.0dev_r159 portion of the egg name
application-0.1.0dev_r159-py2.4.egg)
I'm not 100% of the question but you are looking for setup.py
i believe AttribSafeContextObj are a convenience method for templates
its really a PITA to look at and maintain
% if hasattr( c , 'name '):
so we have a cleaner
% if c.name :
if you'd rather the templates work as python does (and less like
templating languages ) you can use the ContextObjm
Mike Orr wrote:
On Mon, Jan 19, 2009 at 2:24 PM, Noah Gift noah.g...@gmail.com wrote:
Although, this might eventually move to an even more common United
core that many web frameworks extend off of:
http://www.openplans.org/projects/pypefitters/
Well, that requires some
On Mon, Jan 19, 2009 at 4:54 PM, Colin Flanagan quadvill...@yahoo.com wrote:
- Original Message
From: Jorge Vargas jorge.var...@gmail.com
To: pylons-discuss@googlegroups.com
Sent: Monday, January 19, 2009 4:45:35 PM
Subject: Re: Django or Pylons - comparison details
On Mon,
On Mon, Jan 19, 2009 at 6:22 PM, MilesTogoe miles.to...@gmail.com wrote:
Interesting. I've tried all the python frameworks. I think there are
really 2 markets - a simple to use framework and a highly optimized
framework. Can they be the same ? Maybe.
That is one of the ideas, actually.
awesome news
we're tidying up the Open Social Network framework for its first
public release right now. its built on top of pylons and would do
well from many of these concepts.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
On Mon, Jan 19, 2009 at 6:13 PM, Jorge Vargas jorge.var...@gmail.com wrote:
On Mon, Jan 19, 2009 at 6:36 PM, will welch welch.quietple...@gmail.com
wrote:
What's the blessed way for my application to get its version string
(eg, the 0.1.0dev_r159 portion of the egg name
On Mon, Jan 19, 2009 at 6:20 PM, Jonathan Vanasco jonat...@findmeon.com wrote:
i believe AttribSafeContextObj are a convenience method for templates
its really a PITA to look at and maintain
% if hasattr( c , 'name '):
so we have a cleaner
% if c.name :
if you'd rather the templates
On Jan 20, 10:31 am, Mike Orr sluggos...@gmail.com wrote:
- it may be time to move to a post-WSGI standard a la the WSGI 2
proposals, since we'll have to change WSGI anyway. However,
politically getting a WSGI update into the Python core is a long slow
process, so maybe we should just do
Bingo! Thanks!
On Jan 19, 7:45 pm, Mike Orr sluggos...@gmail.com wrote:
On Mon, Jan 19, 2009 at 6:13 PM, Jorge Vargas jorge.var...@gmail.com wrote:
On Mon, Jan 19, 2009 at 6:36 PM, will welch welch.quietple...@gmail.com
wrote:
What's the blessed way for my application to get its
Wichert Akkerman escribió:
Previously Dalius Dobravolskas wrote:
Hello,
On Mon, Jan 19, 2009 at 7:44 AM, Roberto Allende ro...@menttes.com wrote:
My motivation is to write a unit testing but even in other cases it
could have sense to use a controller function isolated. Or at
On 20/01/2009, at 3:30 AM, Thomas G. Willis wrote:
Being a pylons newb myself, the first thing I did was write auth and
registration. It took a day.Granted I wasn't trying to support every
auth method I could think of like authkit does,but I learned lots.If
you want auth (and other things)
Benchmarks indicate it is taking as much as 20% of request handling
time (not including the user action).
The question is why is it even necessary to use this registry
facility ?
Similarly, other request handling operations such as creating the
request object may also be redundant, because the
49 matches
Mail list logo