Thank you Leonel but u.image_user16x16 contains always the file name, so
the test will return always True.
The problem is that the image file is not created on the disk so I have to
test if it exist.
At this point it's not so easy to do.
The application call for these computed images from the au
They are not imported again just because the import is there. Python and
web2py's import is smart enough not to re-import a module that was already
loaded unless you are using track_changes.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/we
It is OK to run an import statement on every request -- the Python
interpreter will only import the module on the first request (per process)
-- after that, it will remain in memory.
Anthony
On Saturday, February 18, 2017 at 3:45:05 PM UTC-5, Khalil Khamlichi wrote:
>
> Hello everyone,
> I nee
perhaps you can import it on models because models is executed for every
requests
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
Y
Hello everyone!
I wanna share a situation to which I can't figure a proper solution to see
if I get any ideas. Sorry if this specific topic has already been covered,
but I couldn't find it anywhere.
I'm trying to upload multiple files only to make some processing and return
the results. At firs
Hello everyone,
I need to query redis a lot, do I have to import redis on each request ?
also I am sedning websocket messages, do I need to import websocket library
on every request ? isn"t there any way to load them permanently into web2py
?
Thanks in advance.
--
Resources:
- http://web2py.
I will be very grateful who can answer. thanks a lot!!
Il giorno sabato 18 febbraio 2017 20:11:30 UTC+1, Andrea Fae' ha scritto:
>
> Hello.
> From Javascript I need to ask some different values and promt is good only
> for 1 text box.
>
> I know that I have to use jqury modal dialog, but I don't
> If I understand right, the second one generates an HTTP request. That
> means the data that is fetched will be serialized and deserialized. In
> some cases this data is sizable, so I want to avoid that overhead. There
> will likely also be some overhead associated with actually
> sending
Great!
Em quinta-feira, 16 de fevereiro de 2017 15:05:38 UTC-3, José L. escreveu:
>
> Inspired by
> https://medium.com/react-redux/introducci%C3%B3n-a-redux-js-8bdf4fe0751e#.iqodqn8cc
> I have created a small project, using web2py instead of Django:
> https://github.com/jredrejo/web2pyreactpoc
>
On Saturday, February 18, 2017 at 6:00:23 AM UTC-8, Anthony wrote:
>
> Do you have a use case that cannot easily be accommodated by that pattern?
>> If so, what do you imagine would be the API for doing what you want to do,
>> and would it look much different from simply making an HTTP call (or
Hello.
>From Javascript I need to ask some different values and promt is good only
for 1 text box.
I know that I have to use jqury modal dialog, but I don't know nothing
about it (I need to study?)
Is there anyone that can write me a very simple example? You have to know
that I have to use wit
The error is not in the connection string or with the migrate settings.
I would try this in the command line to see what the problem is:
cd web2pydirectoryhere
python web2py.py -S nameofyourapplication -M
IS_NOT_IN_DB(db, 'auth_user.email')('em...@youknowisnotthere.com')
If everything is workin
Gael that's one of the bugs i've referred fo computed fields they are not
updated in session.
Notice that you use
*auth.user*.image_user16x16
Well auth.user is nothing other than *session*.auth.user
You are also using os.path.exists wrong as you're giving it an URL.
For instance I'm sure this
Revision: URL() produces a relative link, but the os.path. functions look at
the filesystem from the folder web2py is running from. You should construct the
path using os.path.join and request.folder see
http://stackoverflow.com/questions/6439252/returning-a-file-in-uploads-directory-with-web2py
Hello.
Here is a complete solution without the use of a custom form.
auth.settings.extra_fields['auth_user']= [
Field('agree_terms_and_conditions','boolean', label=T('I agree to terms
and conditions'),default=False,requires=IS_NOT_EMPTY(error_message=T('You
must agree the term conditions'))
Revision: URL() produces a relative link, but the os.path. function look at the
filesystem from the folder wep2py is running from. You can construct the path
using os. path.join and request.folder see
http://stackoverflow.com/questions/6439252/returning-a-file-in-uploads-directory-with-web2py-st
It may also be worth noting that you can get the output of another
controller function within the *same *application via LOAD(..., ajax=False)
(note, ajax=False is actually the default). This, however, will also
execute the called function's view and return the full rendered output. In
this cas
The images that are created would have an extention, like .jpg The URL()
doesn't produce it. Please check this using debugger or print statement.
Nico
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.
>
> Do you have a use case that cannot easily be accommodated by that pattern?
> If so, what do you imagine would be the API for doing what you want to do,
> and would it look much different from simply making an HTTP call (or
> possibly an RPC call) to the other app (which you can already do)?
Thanks but it returns also False:
if os.path.exists(URL('download', 'default',
args=auth.user.image_user16x16)):
Does it work if you do a similar test?
--
Gael Princivalle
2017-02-18 14:27 GMT+01:00 Nico de Groot :
> Use os.path.exists() to check if a file exists. Is.file() c
> If I visit /test_env/db_worker/call/json/work_service?a=1&b=2, I get the
> right result. What I want is to be able to visit
> /test_env/boss/order_service and get the exact same result. Right now, I
> get "name 'service' is not defined" (because db.py is not run, and
> "service" is define
Use os.path.exists() to check if a file exists. Is.file() checks if the object
is a file or a link.
Nico de Groot
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Is
I've checked better the situation.
After register computed fields are ok.
For example in the image_user16x16 field I have:
auth_user.image_user.928995a79b13d5d0.506f7274726169744356323031332d512e6a7067_image_user16x16.jpg
Link is ok in the view:
/download/default/auth_user.image_user.928995a79b1
it depends
you can use tornado web framework.
but if you want to make a complete website and chatting is one of it's
features
then it's better to use both in order to benefit from web2py features .
but either way you have to start by learning how to use tornado.websocket
and then you'll
be able
24 matches
Mail list logo