How can I get my view to not encode my html.
For example if I do:
''.join(['A','B','C'])
I get:
AB | C
I want:
ABC
Thanks!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
T
> XML(''.join(['A','B','C']))
Thanks Wes, I knew there had to me a simple mechanism in place.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web2py@googleg
I've had good experience with ElementTree:
http://effbot.org/zone/element-index.htm
It has both straight python and a CPython versions. It's included
with Python >= 2.5.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
I'd like to use a global variable (an instance of an object) that is
initiated at server start up and that is a available to all
threads/processes of the application. Is such a thing possible?
If it matters, I develop using the built-in server and use
apache2/mod_wsgi in production.
Thanks,
Mark
>
>
>
>
> On Sun, Jan 31, 2010 at 5:04 PM, Mark Larsen wrote:
>> I'd like to use a global variable (an instance of an object) that is
>> initiated at server start up and that is a available to all
>> threads/processes of the application. Is such a thing possib
> FWIW, I had good results in a previous project using a recipe from
> Massimo for a ram cached threadsafe class. I wasn't using Apache,
> though.
Mike, that looks really promising. I imagine I could come up with a
way to get all the apache processes to cache the same object after the
server sta
> Why not use a chained cache.disk inside a cache.ram.
I think I like just using the cache.ram and pre-loading each
processes. The structure is large and I'm not sure how reading from
disk (especially with a fair amount of users) would affect
performance. I'm going to have to profile this when I
Based on Tim Farrell's advice in a previous discussion, I've recoded
my system tray stuff using pyWin32 libraries (Mark Hammond had an
excellent example). While this means it'll only work on windows it
does not add the WX library bloat (it's a single .py file and maybe a
dozen lines in widget.py)
Tim,
I included the restart mostly for my own use. My client app
communicates with a serial port barcode scanner. Although I think
I've coded for all the possibilities, I'm worried something will go
arwy and I needed an easy way for users to reset it.
You are right about the browser window pop
Sorry off playing basketball (75 degrees out in November)! It's on its
way.
On Nov 7, 6:04 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> hey, I have not got this yet. :-(
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Group
up. For the icon it looks for "web2py.ico" in the root folder of
web2py. If that isn't present it uses the default "application icon"
supplied with windows.
On Nov 8, 5:27 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> I also included patches from Mark Larsen and N
web2py users,
I'm running apache2 with mod_wsgi. I ScriptAlias the wsgihandler.py
not as the root of the server but with it's own directory. From my
vhost file:
WSGIScriptAlias /appName /opt/web2py-1.49/wsgihandler.py
Order allow,deny
Allow from all
To access th
Experimenting some and it seems it might be as simple as:
WSGIScriptAlias /appName /opt/web2py-1.49/wsgihandler.py/appName
Of course this would require multiple handlers for each application.
Is there a better way?
On Nov 11, 4:10 pm, Mark Larsen <[EMAIL PROTECTED]> wrote:
> web
ndler, set to None or False to do
nothing
set to string for text to display to user
within your file you set rv to a string to display to the user, set it
to None or False to have web2pys default mechanism used.
An example of a "customexception.py" file would be:
[code]
'
Duh!
It looks like his routes_onerror would do everything I need. My
customexception.py just becomes a controller method.
Thanks Tim & Massimo.
On Nov 12, 12:45 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> Mark,
>
> please talk to Tim. We just included (1.48) his patch for
> "routes_onerror". I
Just return a dict of dicts -->
return dict(dict1={'one':1,'two':2},dict2={3:'three',4:'four'},
dict3={'hi':'mom'})
> Yes, I realized this is a python issue, and found my python manual
> telling me that I could combine several dicts in the return statement
> by making a tuple out of them, just
Tokyo Dan,
Not sure what you mean by stand-alone, but I'm using web2py to run a
client application. The web2py framework runs in the background using
the built-in webserver, the start menu item for my application
launches IE pointed to http://127.0.0.1:8000/appName. To give it all
a more seamle
Web2Pyers,
What the appropriate way to use cache.ram? Let's say I want to cache an
object (in my case its a cStringIO). In my controller function -->
def makeMe():
x = cStringIO.StringIO()
cache.ram("myObj", lambda: x, 5)
def getMe():
x = cache.ram.storage['myObj'][1]
response.headers[
Since we are on the subject, how can you remove an item from the cache?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to web2py@googlegroups.com
To uns
Web2py 1.59
Apache 2.2.11
My http.conf entries for this are:
WSGIScriptAlias /web2py/ /home/larsenma/web2py/web2py-algSim/wsgihandler.py
Order allow,deny
Allow from all
Going to http://serverName/web2py/, returns HTTP 400 Bad Request, nothing in
the apache logs
Going to http://serv
I'm struggling setting up web2py with Apache2 and mod_wsgi. I've
followed the manual, (page 205) mainly-->
Alias / /home/web2py/applications/
## setup WSGI
WSGIScriptAlias / /home/web2py/wsgihandler.py
WSGIDaemonProcess web2py user=www-data group=www-data
home=/home/web2py/ 12 processes=10 maxim
> See if http://forum.webfaction.com/viewtopic.php?pid=8473#p8473
> provides any hints for you
Thanks Yarko.
It still has the troublesome line:
WSGIScriptAlias / /home/[YOUR ACCOUNT]/webapps/apachewsgi/web2py/wsgihandler.py
Which essentially tells apache to handle anything coming at the ro
> By forking you for the entire
> web-server (or proxy) with lots of memory overhead and lots on
> potential consequences.
I've solved a similar problem by having web2py make a system call to a
separate python script that demonizes itself immediately
(http://code.activestate.com/recipes/278731/).
Web2py-ers,
Does cache.ram not work with mod_wsgi/apache? Is it because of the
multiple apache processes?
Sample code:
result = cache.ram(response.session_id,lambda: cacheFunc(),600)
def cacheFunc():
file("/home/www/test.txt","a").write(str(time.time())+"\n")
return True
Reloading the pa
> Is it because of the multiple apache processes?
OK, I answered my own question, setting apache/mod_wsgi to 1 process
fixes this. In fact it's mentioned (subtly) in Example 39 at:
http://www.web2py.com/examples/default/examples#cache_examples
I might look into using mem-cached instead.
Thanks
> would you write an AlterEgo entry about this?
Done.
Also, I added a wiki entry about configuring apache/mod_wsgi with
web2py not at the root of the web-server (I can't believe there's not
more demand for that). Would that be better served as an AlterEgo
entry?
--~--~-~--~~---
> /controlllers
> /forms/__init__
> /forms/ reg_form.py
You are missing .py on the __init__, was that a typo?
> import forms.reg_form ### ERROR
Since web2py runs out of it's root maybe (this as worked for me with
things out of my modules directory):
import application
> but that configuration doesn't fit my needs.
> I've tried setting the following config, but it always results with an
> "Invalid request". I suppose it's due to the uri parsing, but I can't
> solve it as I'm quite new to Lighttpd.
> Any ideas?
>
Giovanni,
I had the same problem with web2py, ap
> I am pretty sure user ceej has coded using js, perhaps he can tell use
> which js plugin he sued.
If you are using an HTML 'file' control, all the implementations I've
seen require POSTing the upload to an iframe, then using AJAX to poll
the progress of the upload. How you poll the progress is
> I think you are right
Hmm, I am thinking of writing a patch. The web2py server changes
would be trivial, perhaps a callback function that fires on each
iteration in the copystream function. An example function could say
place the percent copied in a database or temp file to then be polled
wit
I'm attempting to upgrade to a new version of web2py (1.69 to 1.89.4).
It seems that when the views are rendered now Web2py auto swaps any
special HTML characters.
For instance I have:
someJavascriptFunction({{=simplejson.dumps(aPythonVar)}});
This errors because the quotes in the aPythonVar ar
Nevermind. Figured it out right after I posed.
You use the XML function. My example becomes:
someJavascriptFunction({{=XML(simplejson.dumps(aPythonVar))}});
On Fri, Nov 19, 2010 at 12:06 PM, Mark Larsen wrote:
> I'm attempting to upgrade to a new version of web2py (1.69 to 1.89.4)
39 matches
Mail list logo
|