2PY CRON done
INFO:root:WEB2PY CRON Call returned: default applications appear to be
installed
already
web2py Enterprise Web Framework
Created by Massimo Di Pierro, Copyright 2007-2009
Version 1.56.2 (2009-02-08 21:49:34)
Database drivers available: SQLite3, MySQL
On Feb22, 7:53am, AchipA wrote:
&
On Feb22, 7:53am, AchipA wrote:
> On Feb 21, 9:12 pm, David Marko wrote:
>
> > I would also appreciate some working example/appliance for using
> > *cron. Its very usefull thing!!!
>
> web2py comes with an example (cleaning sessions), see applications/
> admin/cron ! Do you think additional exam
On Feb22, 8:37pm, AchipA wrote:
> I think I know what's causing the issue, try the following as your
> web2py.py instead of the original one:
>
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
>
> import os
> import sys
>
> path = os.path.dirname(os.path.abspath(__file__))
> if not path in sys.path:
On Feb23, 0:19am, Iceberg wrote:
> On Feb22, 8:37pm, AchipA wrote:
> > I think I know what's causing the issue, try the following as your
> > web2py.py instead of the original one:
>
> > #!/usr/bin/python
> > # -*- coding: utf-8 -*-
>
> > import os
+1 for improving documents, of course.
I am not sure what Achipa means about changelog, but I believe the
developer of a new feature is the most appropriate person to write
some description about:
1. what is it;
2. how to use it?
3. background info (if any)
I am afraid that changelog can no
off puzzled myself. I can confirm that the windows distrib runs
> softcron, BUT, running it from the command line, from sources, DOES
> result in default hardcron. I'm not sure what the difference is
> between the distribution and source 'modes' are but apparently the two
>
On Feb26, 7:35pm, AchipA wrote:
> On Feb 26, 5:23 am, Iceberg wrote:
>
> > I don't really understand how cron patch works but, since the global
> > crontype equals to "Soft" by default, is there some reason causing the
> > win distrib to detect it
On Feb26, 9:27pm, AchipA wrote:
>
> On Feb 26, 1:44 pm, Iceberg wrote:
>
> > On Feb26, 7:35pm, AchipA wrote:
>
> > > On Feb 26, 5:23 am, Iceberg wrote:
>
> > > > When I import
> > > > this module and change it (indirectly), I still do n
On Mar2, 12:22pm, mdipierro wrote:
> Lots of small bug fixes in the last week so I posted 1.57. Please give
> it a try and let me know.
>
> New features include:
> 1) admin edit page via ajax and keepalive (thank you Boris)
> 2) language translation page has [delete] buttons
> 3) fixed (hopefull
On Mar3, 10:36pm, mdipierro wrote:
>
> On Mar 2, 8:33 pm, Iceberg wrote:
>
> > On Mar2, 12:22pm, mdipierro wrote:
>
> > > Lots of small bug fixes in the last week so I posted 1.57. Please give
> > > it a try and let me know.
>
> > > New featur
On Mar2, 4:41am, Alexandre Andrade wrote:
> Today I was fixed css and really put authentication to work.
>
> So, at this point, scaffold has:
>
> - a five spaces layout (logo, section menu, left column, center column,
> right column and footer.
> - a working authentication
> - a secundary menu s
On Mar4, 9:45pm, mdipierro wrote:
> On Mar 4, 6:45 am, Iceberg wrote:
>
> > The last problem is that out-of-box scaffold20090301b.tar on web2py
> > 1.56.4 always reports:
> > TypeError: unsupported operand type(s) for %: 'lazyT' and 'dict'
>
One more tips for new comers. You can find an example named "status"
in here:
http://mdp.cti.depaul.edu/examples/default/examples
or just here:
http://mdp.cti.depaul.edu/examples/simple_examples/status
to know every available resources in request or response.
Btw, by default recent versions o
Hi Massimo,
In old web2py versions, developers can update a single record by:
# Suppose you have already inserted a record and then search it into a
variable "me".
>>> me.update_record(name="Max")
>>> me.name
'Max'
The feature still exists in latest web2py 1.57 but missing
descriptions in DAL d
On Jan10, 11:53pm, mdipierro wrote:
> @Robin,
>
> I propose I change and I already implemented in in trunk.
>
> def f(form):
> if form.vars.a!=form.vars.b:
> form.errors.a='must be same as b'
> form.errors.b='must be same as a'
>
> if form.accepts(,onvalidation=lambda for
> > On Mar 8, 1:09 am, weheh wrote:
> >
> > I've read that this is possible with t2, but how about 1.57? I've
> > tried it with 1.57 and it doesn't seem to work. Any suggestions for
> > how to do nested multi-level menus with the current version?
On Mar8, 11:38pm, mdipierro wrote:
> The problem
com/menu2/invitro.htm
>
> Massimo
>
> On Mar 8, 11:33 am, Iceberg wrote:
>
> > I would have agree with Massimo about "not to include too many this
> > and that in the base distribution". But, when talking about the menu,
> > I beg a reconsideration.
--~--
Hi Achipa,
While waiting for the ultimate patch for hardcron, I manage to give
the current web2py 1.56.4 's cron some other test. Some found issues
are listed below. They are not necessarily to be fixed, but if you can
somehow improve them, that is better.
1. In the crontab file, usually we writ
On Mar9, 7:17pm, AchipA wrote:
> On Mar 9, 8:22 am, Iceberg wrote:
>
> > 1. In the crontab file, usually we write
> > #0-59/1 * * * * root
> > /path/to/some/executable_file
> > But I found that, on Windows platform, "/" ar
On Mar9, 3:38am, mdipierro wrote:
> I am planning to release 1.58 on Tuesday. I am waiting for
> confirmation that we have DB2 support.
>
> Is there anything else that should be in and I have forgotten about?
> If so, please email em personally.
>
> Massimo
Just curious. You said in some post th
On Mar7, 7:40pm, Iceberg wrote:
> On Jan10, 11:53pm, mdipierro wrote:
>
> > @Robin,
>
> > I propose I change and I already implemented in in trunk.
>
> > def f(form):
> > if form.vars.a!=form.vars.b:
> > form.errors.a='must be same as
I found that web2py 's compile does not generate enough myapp/modules/
*.pyc
This happens when there is only *.py but none of *.pyc in myapp/
modules. The compile just ignores those *.py at all. A forced import
on each of *.py file in this directory should be the way to fix it.
--~--~-
nsole:
WARNING:root:WEB2PY CRON Call returned code 1:
If I deploy it in C:\SOLID\web2py, everything runs smooth.
So there might be some dir issue in cron's launcher. Please take a
look. Thanks in advance!
Regards,
Iceberg
--~--~-~--~~~---~--~~
You received this message becau
s.org/showthread.php?t=728170
But I don't know how things go in current web2py world. Can we just
have a web2py.exe as current situation, and one more web2pyw.exe that
does not have a console window?
Thanks for any hint.
Regards,
Iceberg
--~--~-~--~~~---~--~~
Yo
eat and
really helps, but users need to get permission for that at first.
On Mar22, 12:13pm, Boris Manojlovic
wrote:
> Hi Iceberg,
>
> please try hstart program as it is created just for "problems" like
> yours.http://www.ntwind.com/software/utilities/hstart.html
>
> hop
Tried but that does not help. :-P
We need something similar to the effect of hstart.exe's:
hstart /NOCONSOLE "web2py.exe -i 0.0.0.0 -a """" -t"
On Mar22, 11:06pm, mdipierro wrote:
> try
>
> web2py -a blah -p 8000
>
> Not sure.
>
> On
7;http://%s:%s'% (detectAddr, bindPort)).read()
except IOError: pass # the bindAddr and bindPort is vacant
else: sys.exit('%s:%s is occupied'%(detectAddr,bindPort))
.. # Go on to start web2py main process
This code can let novice make fewer mistakes.
Regards,
Iceberg
--~--~-
had installed a windows
> distribution of Python before I had web2py, and I the installation
> process set this up.
>
> The extra 'w' on the Python file extension means 'don't open a console
> window'
>
> Chris
>
> On Mar 22, 3:52 pm, Iceberg wro
On Mar24, 5:20am, Fran wrote:
> On Mar 22, 3:44 am, Iceberg wrote:
>
> > I am using web2py 's windows distribution. Is there some way to hide
> > the console window (a.k.a. the black dos window) in which web2py is
> > running?
>
> I run as a service using
x27;t miss something obvious ?
>
> On Mar 19, 11:30 am, Iceberg wrote:
>
> > Hi Achipa,
>
> > I have an app based on web2py-win.zip 1.56.4's cron feature. I just
> > noticed that, if the whole web2py is deployed in a directory name with
> > space inside,
once a "6 times faster" template engine introduced in
web2py 1.55 but later cancelled. Will it come back in the future? But
if I compile my app, does it bring performance as good as (if not
better than) the 6-times-faster template engin
Hey Jude, don't be afraid... :-)
I have been there and done that. In recent days I happened to work on
how to build an app into a stand-alone setup.exe for Windows platform,
by a single click. The work is mainly based on the free Inno Setup. I
am posting the almost-finished work to Massimo for s
Thanks very much for your general guidelines about performance, Tim
and Massimo!
On Mar26, 3:39am, mdipierro wrote:
> I agree with Tim. If you run the bytecode compiled version in
> production there is no parsing overhead.
>
> On Mar 25, 1:37 pm, Timothy Farrell wrote:
>
he current "web2py.exe"(with console).
But if you are really eager, take a look at InnoSetup. Basically my
plugin just wrap InnoSetup for convenience.
On Mar26, 2:39am, dbb wrote:
> To iceberg:
> when do think you are going to finish the instructions how to create
> a
On Mar26, 2:56am, Mark Larsen wrote:
>
> Also is the cache object unique for each session? Does Web2py have any
> concept of a shared cache for all sessons?
>
I share what I just test, and what I do not know, and hope some expert
can confirm them.
Cache object seems unique for each session. I
unique according to test. I still need
some confirmation.
On Mar26, 1:07pm, Vidul Petrov wrote:
> Hi Iceberg,
>
> From what I saw, the cache object is not unique, it's that the samle
> has "time_expire=5" and most probably you've loaded the page on the
> 2nd br
Although I already figured out the abusing time_expire way by myself
earlier, I still appreciate Achipa's hint for clear(), which I did not
know. Thanks for that.
It seems I did not read enough docs. So, after taking another look at
the epydoc (http://www.web2py.com/examples/static/epydoc/
web2py
>
> This is great! Something I have been looking forward to. Will this
> allow a user to click and install the web2py application without
> having to start the server each time they want to use it? Keep me
> posted on this. Appreciate your efforts!
>
> -Seb
>
> On Mar
still using default 127.0.0.1 and port 8000. Not
what I want.
I assume it will not be hard to let -i and -p also have effect on -t ?
Thanks.
Iceberg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Fram
On Mar28, 11:25pm, LordMax wrote:
>
> On 27 Mar, 09:43, Iceberg wrote:
>
> > Hi Massimo,
>
> > Now I want to do the same thing but this time let web2py (windows
> > distribution) stay on SysTray, so I do:
> > web2py -i 0.0.0.0 -p 80 -a blah -t
> >
o
all the test above. Results remain the same.
What should I do now?
Sincerely,
Iceberg, 2009-Mar-29, 14:19(PM), Sun
On Mar25, 9:56pm, AchipA wrote:
> Ok, could you try replacing your web2py/gluon/contrib/cron.py with
>
> http://bazaar.launchpad.net/%7Eachipa/web2py/cron/d
I will change my "Inno Plugin" to use web2py-no-
console.exe instead of hstart.exe. Only then, developers can freely
generate and distribute stand alone web2py app setup.exe. Thanks!
Sincerely,
Iceberg, 2009-Mar-29, 14:19(PM), Sun
On Mar22, 8:57pm, Iceberg wrote:
&
ing
> like open("C:\marker","w") and check if it got created or, if it does
> not annoy you, winsound.Beep(400,400).
>
> On Mar 29, 9:08 am, Iceberg wrote:
>
> > Hi Achipa,
>
> > Sorry for delay in response. I managed to upgrade my Python2.4.4 to
&g
Sorry for chiming in, but I do not see it is necessary to block the
default urls. As long as they can do proper jobs and do no harms, why
do we need to block it? Just let it be.
And in case you did not know yet, you might found the option 2 in this
post helps.
http://www.web2py.com/AlterEgo/def
2py-win.zip 1.56.4, and then this hybrid 1.56.4 suddenly has
the long lost hardcron feature. I can't explain.
All these look like mess. But I am really not joking although today is
Apr1. :-(
Sincerely,
Iceberg, 2009-Apr-01, 21:31(PM), Wed
On Mar30, 11:03pm, AchipA wrote:
> Can
affected
by so many possible factors such as Python version, py2exe version,
packages like win32con, mysqldb, etc... But web2py_win.zip is
standalone therefore not affect by any above factors on the target
machine. I just want to make sure, whether the fresh 1.59
web2py_win.zip can cron or not.
I want to test this idea, but it seems the events.tar does not contain
that magic new web2py_ajax.html ? Did I miss something?
On Apr4, 2:02pm, mdipierro wrote:
> I re-posted a slightly better version.
>
> The new version work in this way:
>
> say you have an action like:
>
> def myform():
>
Hi Massimo,
I always follow the sample here to write my streaming code:
http://www.web2py.com/examples/default/examples#streaming_examples
Today I happened to find that this approach does not handle "HTTP/1.1
206 PARTIAL CONTENT" correctly. After some try and search, I found
this:
http://gro
On Apr5, 1:48pm, "r...@devshell.org" wrote:
> As far as I understand from the manual, it is not possible to store
> controllers in sub folders in the Controller folder in web2py.
>
> Is that right? If that is not correct, what URL would one use to
> access a function called "user_reg" in a contro
ly
compare the two approaches. I refine the doc, please refer to the end
of this mail.
On Apr5, 10:08pm, mdipierro wrote:
> You can do
>
> response.stream(...,chunk_size=4000)
>
> On Apr 5, 5:57 am, Iceberg wrote:
>
> > Hi Massimo,
>
> > I always follow the sample
se response.download())
> 3) the purpose of that example is also to show that you can stream any
> output stream (something with a read() method) not necessarily and
> actual file (for example a StringIO).
>
> perhaps we need to add one example.
>
> Massimo
>
> On Apr 5,
('%s').value=this.value"%name),
INPUT(_type='hidden',_name=name,_id=name),]
super(FILENAME_SELECTOR,self).__init__(*components, **attributes)
Regards,
Iceberg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
now the full path name for later
streaming. Or if you are developing a web-ui system to wrap all your
command-line tools, you also need the full path name for a os.system
(...) later.
On Apr6, 2:19am, mdipierro wrote:
> Could you explain more about what it does?
>
> On Apr 5, 12:03 pm, I
Hi, does anyone know, is there a way to store session in memory? Even
this means sessions will be lost if web2py restarts, but that is fine
for some non-critical apps. Besides, this way we don't need to worry
about cleaning up the old sessions anymore. And perhaps slightly
faster.
I have tried th
from gluon.contrib.memdb import MEMDB
> session.connect(request, response, db=MEMDB(cache.ram))
>
> On Apr 5, 11:14 pm, Iceberg wrote:
>
> > Hi, does anyone know, is there a way to store session in memory? Even
> > this means sessions will be lost if web2py restar
Mmm, SQLDB('sqlite:memory:') would be a most intuitive choice, it is a
pity that it does not work. No wonder it was once introduced but soon
"forgotten". :-)
So let's wait Massimo to adjust MEMDB to work with cache.ram, or
perhaps a dedicated RAMDB for it, or even SQLDB('ram://'). I am fine
with
Massimo, thanks for the hint about placing sqlite database in
different folder. However I found it not fully work as expect, because
those "abcdef123456_blah.table" are still created inside app/databases
folder. Could you adjust the code so that all relevant *.table files
are in the same folder as
Suggest David to paste his command line to start web2py and the
console output, to make sure no simple typo inside.
By the way, can web2py provide useful information now, when port not
available? We mentioned that.
http://groups.google.com/group/web2py/browse_frm/thread/76c1751a01bf8d5d
On Apr8
By the way, I always hope the pack function in web2py admin can do an
automatical cleanup before packing.
Hopefully Massimo is reading this post. :-)
On Apr13, 10:01am, Speedbird wrote:
> That has been fixed since Beta 2 ;). Thanks.
>
> http://www.pyforum.org/pyforum/default/view_topic/27
>
> O
on before the pack all
> button?
> I think any file delettion has to be explicit.
>
> Massimo
>
> On Apr 12, 9:33 pm, Iceberg wrote:
>
> > By the way, I always hope the pack function in web2py admin can do an
> > automatical cleanup before packing.
>
> &g
when trying to cleanup admin app.
Just use the attached default.py to replace web2py 1.61's
applications/admin/controllers/default.py
Best regards,
Iceberg, 2009-Apr-13, 23:07(PM), Mon
--- Original Message ---
From:mdip
This is a topic with long history.
http://groups.google.com/group/web2py/msg/df79e41f2298bef2
Hopefully Massimo will eventually find a way to implement a ram based
db. :-)
On Apr13, 10:44pm, vihang wrote:
> There maybe something wrong in my understanding, in which case please
> correct me, but
e is a proposal
>
> db=SQLDB('sqlite:memory:appname',cache=cache.ram)
>
> Working on this but the problem is determining whether tables are
> there or need to be created.
>
> Massimo
>
> On Apr 13, 10:30 am, Iceberg wrote:
>
> > This is a topic with lo
Good to have a new alternative syntax, though I doubt it is not
powerful enough for some serious app which need to do many things for
a SQLField(...), such as:
SQLField('name',
requires=IS_NOT_EMPTY(),
label='User Name', comment='blah', # needed by many t2 functions
writable=False,
...)
Thanks Yarko's insight on the topic of db performance domain.
As to me, I brought up the issue only because I want to store sessions
in RAM. In many cases sessions are not needed to be persistent on
disk. Ram means maintenance free here, that way there is no need to
delete old session files anymo
Currently I think most of us use response.flash as a resort to give
all kinds of feedback. For example:
def foo():
form=SQLFORM(...)
if form.accepts(...):
if there_is_some_minor_issue:
response.flash='Warning: your input is unusual, but anyway the
data is accepted'
else:
r
her replace the
web2py.exe by another web2py.exe I build by myself (mentioned in my
previous cron-relevent post), I get the hardcron.
To Achipa: Since I have kind of workaround, I can live with current
situation. If you need me to do further specific test, feel free to
let me know.
R
On Apr16, 3:05pm, Fran wrote:
> On Apr 16, 3:13 am, Iceberg wrote:
>
> > Currently I think most of us use response.flash as a resort to give
> > all kinds of feedback.
>
> I have this in my model:
>
> def shn_sessions(f):
> ...
>
> My layout.html conta
:-) No need to imagine. Using web2py in education is one of the reason
professor Massimo create web2py. And it "happen to" be good for
production site also. Thank Massimo!
On Apr17, 2:50am, Jason Brower wrote:
> +1
> I hated having to work in MSaccess. Can you believe that was my
> database cla
I guess the answer is NO, because we need backward compatibility.
However, I would suggest to add the description about SQLField VS
db.Field in DAL document (http://www.web2py.com/examples/default/dal),
so old users do get confused when seeing db.Field at the first time. I
bet few people know the
On Apr17, 2:37am, Iceberg wrote:
> On Apr16, 3:05pm, Fran wrote:
>
> > On Apr 16, 3:13 am, Iceberg wrote:
>
> > > Currently I think most of us use response.flash as a resort to give
> > > all kinds of feedback.
>
> > I have this in my model:
>
way than this, but getting the constants under
> application control is what I'm trying to suggest.
>
> Regards,
> -Yarko
>
> On Fri, Apr 17, 2009 at 3:54 PM, mdipierro wrote:
>
> > I like it. This may not be compatible with this
> >http://www.web2py.com/ev
By the way, I believe the T("...") handles short phrase better, but if
you need to deal with some long article such as company background
description, it will also be a good choice to manually organize your
file as:
yourapp/static/en/about.html
yourapp/static/de/about.html
...
On Apr18, 10:
Read doc here. http://www.web2py.com/examples/global/vars/SQLTABLE
The "headers" argument does what you want.
On Apr18, 6:30pm, Timmie wrote:
> Hello,
> when building a SQLFORM, there are really useful helpers such as
> * labels={'name':'Your Full Name:'}
> * col3={'name':A('what is this?', _hr
Well, I had similar thoughts as Massimo at the beginning, and that is
exactly why I "stop here", and even use hardcode magic color.
IMHO, a controller should be able to clearly express general info,
warning msg, and bad error. Because they are so commonly needed in
EVERY web app. If you think you
m.
>
> So - I'm now thinking that both Massimo's and Icebergs latest comments need
> to be merged.
>
> Regards,
> - Yarko
>
> On Sat, Apr 18, 2009 at 10:32 AM, Iceberg wrote:
>
> > Well, I had similar thoughts as Massimo at the beginning, and that is
>
Glad to have a happy ending of this story. :-)
On Apr19, 11:25pm, mdipierro wrote:
> yes we can do that. I can include a warn, info and error in different
> colors.
>
> Massimo
>
> On Apr 19, 10:07 am, Yarko Tymciurak wrote:
>
> > this seems like a nice approach... one that separates concerns
I happened to confirm same problem today.
I am now using stable web2py 1.61.1, but it seems the problem exists
even earlier than 1.61.1 ...
My simplified code for reproducing.
Model:
db = SQLDB('sqlite://storage.db')
db.define_table('repository',
db.Field('name'),
)
from gluon.tools import
Did not know that before. But this design is really good! Wow!
However, as always, I suggest this useful comments can be appeared in
build-in doc such as http://www.web2py.com/examples/default/dal
On Apr20, 10:04am, mdipierro wrote:
> This is not a bug but it was a bug before.
>
> If you want t
"Pack all now also cleans up errors and sessions" works as
expected. :-) By the way, you lost a fix to a minor, minor bug: when
trying to "cleanup" admin, now a ticket is issued (at least on Windows
XP). In my previous patch, I also wrap try...except outside os.unlink
(session_files)
On Apr20, 1
; }
>
> def index():
> response.flash=DIV("Hello World",_class='info')
> return dict()
>
> But it looks ugly. Mind that it has to work decently even if one does
>
> def index():
> response.flash="Hello World"
> return dict()
>
On Apr17, 3:44am, AchipA wrote:
> Linux definitely works, all crom modes, I have it in production in all
> three modes. Had no Mac reports so don't know about those.
Achipa, to upset you again, today I deploy my app on Linux for my
first time, and find that similar problem on my Windows XP still
On Apr22, 4:18pm, Timmie wrote:
> OKI, this applys to controller and maybe model code.
>
> But where and how to locate view documents to make them available
> either in widget form or full pages to all applications?
>
I did this before. Maybe it can help you too.
There are some "resources" need
& regards,
> Timmie
>
> On 22 Apr., 10:49, Iceberg wrote:
>
> > I did this before. Maybe it can help you too.
>
> > There are some "resources" need to be shared among many of my apps.
> > These resources include public documents (*.html, *.pdf, *.swf,
Thanks! This trick is what I am looking for, for a long time. :-)
On Apr22, 10:20pm, mdipierro wrote:
> Or for more portability
>
> exec('import applications.%s.modules.mylib as mylib' %
> request.application)
>
> Massimo
--~--~-~--~~~---~--~~
You received this m
Havn't you read this? http://www.web2py.com/examples/default/dal
On Apr23, 9:21am, waTR wrote:
> I am trying to have a controller insert a db record, and then update
> the same record. However, in order to update the record just created
> by a user session, I need to use the db record's id numbe
I don't know mac, but when using Windows binary (the web2py_win.zip),
I can always put 3rd party libraries into web2py/applications/myapp/
modules, then access it, in a slightly different way:
import applications.myapp.modules.third_parti_lib
On Apr23, 7:46am, mdipierro wrote:
> You cannot us
t the whole folder inside of modules?
>
> > would i access the library by saying
>
> > import applications.myapp.modules.modulefolder
>
> > or
>
> > import applications.myapp.modules.modulefolder.twitter.py
>
> > thanks! sorry for being such a newb ;P
>
I bet that the article is not written by Massimo, because he might not
have that good understanding ... about wing. :-)
Anyway, this is an interesting post. I never imagine an IDE for python
can even set breakpoint for a daemon program.
On Apr 23, 1:51 pm, Speedbird wrote:
> ...
> PS - Here's
Oh, one more minor suggestion, shouldn't we add some description about
this new feature into the build-in document of "example 6" in this
page?
http://www.web2py.com/examples/default/examples
In fact I tried to write a couple more examples for Massimo to show
the new "info" and "warn" class, bu
m.vars.filename=form.vars.file.filename
if form.accepts(request.vars,session,onvalidation=lambda f:validate
(f)):
response.flash='ok'
return {'':form}
PS: I've post a comment on that AlterEgo link too, waiting for
approval.
Sincerely,
I just guess, perhaps that would pollute the sys.path. Imagine this
case, app_one and app_two both have a homebred module named "modules/
mylib.py", you can not know which one is actually called when using
just "import mylib".
Searching from this maillist, I found some post relevant to this topic
h the "self-contained" philosophy and
> the namespace collision risk should be low enough. Plus it lets the
> user install the libraries in site-packages if he wants to, without
> any change in the application code.
>
> Or maybe I just think too much and I should get th
Not sure, but why not just try and come back to tell us the
conclusion? :-)
On Apr28, 9:12pm, carlo wrote:
> I need to create some links to pdf files saved in a static/pdf folder.
>
> I found an example in the book for images using :
>
> URL(r=request,c='static',f='myimage.png')
>
> is that ok a
Maybe we can store the uploaded file on disk as:
lots-of-junk__encoded-filename.abc
where:
lots-of-junk is a unique hash string as web2py currently does.
encoded-filename.abc can be the original filename encoded by base64
to make it appears as ascii-char only on disk.
Then when downloading,
Sorry but I have to say the {{if response.flash.xml()[1:4] == 'div':}}
looks ugly. I guess:
isinstance(response.flash, str)
or:
isinstance(response.flash,DIV)
would do same thing and is more elegant.
On Apr30, 2:58am, Fran wrote:
> In order to use the newly-suggested differential flash class
In case you did not know yet, I would suggest an item zero:
0. web2py's built-in document center at
http://localhost:8000/examples/default/docs
And these are my favorite sections (The more important, the earlier it
appears):
Interactive Examples
Database Abstraction Layer Examples
Interact
Hi Massimo,
Once again, I forgot the syntax for the limitby clause, so I turned to
the built-in doc for help. Unfortunately, the detail syntax of limitby
is not mentioned at all.
http://www.web2py.com/examples/default/dal
Eventually google still guides me to the old document for DAL:
http:/
Is there anyone who deploy web2py on production server? How do you
prune httpserver.log? Otherwise this file grows bigger and bigger.
Currently I am planing to os.unlink() it via the cron feature. Is
there any more gentle way? Thanks.
--~--~-~--~~~---~--~~
You recei
Mmm, I happened to meet same problem. Sure it is not a web2py issue,
not even a python issue. It is mainly because JSON standard does not
define how to handle date and time.
http://www.json.org/index.html
Anyway, encoding datetime is easy. There are even simpler ways here.
http://stackoverfl
401 - 500 of 671 matches
Mail list logo