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
Let's say I need to create a global variable once on application
start-up. It would take a few CPU cycles to generate this variable so
I wouldn't want to re-generate it on each request cycle. Is there a
way to do this in web2py? Should I be using the cache?
Thanks,
Mark
--~--~-~--~--
> You don't need to use rewrite rules to do the latter, you can
> generalise both to:
>
> WSGIScriptAliasMatch ^/(admin|welcome|examples)(/.*)?$ /path/to/
> web2py/wsgihandler.py/$1$2
>
> With this approach though, you have to modify the configuration every
> time you add a new application.
>
> T
> Try the launchpad site...
No luck, just the repository.
https://launchpad.net/web2py/+download
is empty.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to
> ==
> ### setup WSGI
> WSGIScriptAlias /apps /usr/local/web2py/current/wsgihandler.py
> WSGIDaemonProcess web2py user=apache group=apache \
> home=/usr/local/web2py/current \
> processes=10 maximum-requests=500
>
>
> Order allow,deny
> Allow from a
>> Thanks; this has been reported. Massimo will have to reset his server
>> when he gets back from hiking in a few days.
Massimo might want to give another body admin rights to his server.
Seems rather horrible that the face of the project "web2py.com" is out
of commission for so long.
Are ther
A
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to web2py@googlegroups.com
To unsubscribe from this group, send email to
web2py+unsubscr...@googlegroups.com
> 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 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
> 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
> /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
> 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?
--~--~-~--~~---
> 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
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
> 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/).
> 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
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
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
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
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[
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
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
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
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]
'
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
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
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
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
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
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)
39 matches
Mail list logo
|