Could you please tell the exact code?
--
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)
---
You received this message because you are subscribed to the Google G
Also can I increase by 5 hours and 20 minutes instead of time shown by the
request.now
Can I do like this?: HH+5:MM+20:SS
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Rep
i think you can use request.client
e.g.
def oncreate_event(form, table):
db.auth_event.insert(time_stamp = request.now,
*client_ip = request.client*,
user_id = auth.user_id,
origin = '%s/%s' % (request.controller,
request.function),
description = 'ID %s created in table %s' % (form.vars.id, ta
i think you can achieve it with datetime.timedelta and set the default
value of your table with that value.
e.g.
import datetime
table.end_time.default = request.now + datetime.timedelta(seconds = 19200)
p.s.
19200 seconds is 5 hours and 20 minutes
best regards,
stifan
--
Resources:
- http://w
for this and the previous issue, you should be on the path "I won't never
ever start a process inside a web request".
That being said, subprocess.Popen has cwdir .
On Monday, January 11, 2016 at 8:52:58 PM UTC+1, Yebach wrote:
>
> What do u suggest I use to startthe exe program. It takes
You can set your timezone like that in your model:
import os
os.environ['TZ'] = 'Europe/Rome'
Il giorno lunedì 11 gennaio 2016 18:50:05 UTC+1, RAGHIB R ha scritto:
>
> Can we do it without any plugin? If yes, how?
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- h
Using cwdir helped to solve the problem with httpserver.log file. Thank you
for that
So you suggest using scheduler to start my exe program?
2016-01-12 12:24 GMT+01:00 Niphlod :
> for this and the previous issue, you should be on the path "I won't never
> ever start a process inside a web reques
Person, I'm trying generating a generic view in pdf; but is showing this
error
RuntimeError: Table column/cell width not specified, unable to continue
I Put the width at TDs ,then the this error dissapeares, then appeares this
other:
AttributeError: 'NoneType' object has no attribute 'get'
you can also do this with web2py you just need to create a webview with
Cordova or Kivy with the URL of your mobile website view. Me this is what I
do and it works without problems
Le lundi 11 janvier 2016 22:31:58 UTC+1, Alessio Varalta a écrit :
>
> Sorry, , you are right. Now i have developed
thank you
On Tuesday, January 12, 2016 at 12:34:47 AM UTC+5:30, Anthony wrote:
>
> web2py isn't giving you the "wrong" time -- it's the local time on your
> server. If you want UTC, you can use request.utcnow (request.now and
> request.utcnow are just datetime.datetime.now() and
> datetime.date
hi Kiran,
would you posting an extract of your final solution?
cheers
Steve
On Thursday, 16 January 2014 02:32:31 UTC+8, Kiran Subbaraman wrote:
>
> Anthony,
> Thanks for the explanation. Went ahead and created widgets, and things
> work just fine.
>
>
Hey guys. I'm having an issue with logging users in on Safari 9. It works
in Chrome and Firefox fine. When I try to log in, it will take me back to
the login screen and no errors are shown. This leads me to believe it is
logging me in and then losing the session or something. Also, we are
c
How to do that? Can you write a chunk of code please if it doesn't bother
you?
On Tuesday, January 12, 2016 at 12:31:27 AM UTC+5:30, Anthony wrote:
>
> On Monday, January 11, 2016 at 1:03:25 PM UTC-5, RAGHIB R wrote:
>>
>> {{=
>> x.name}}
>> this in my view calls this functions:
>> def my_insert_
use anything you like EXCEPT something inside the web environment.
On Tuesday, January 12, 2016 at 2:01:37 PM UTC+1, Yebach wrote:
>
> Using cwdir helped to solve the problem with httpserver.log file. Thank
> you for that
>
> So you suggest using scheduler to start my exe program?
>
> 2016-01-12
this is not threadsafe. use utc and translate dates when presented to users.
On Tuesday, January 12, 2016 at 12:41:44 PM UTC+1, Gael Princivalle wrote:
>
> You can set your timezone like that in your model:
>
> import os
>
> os.environ['TZ'] = 'Europe/Rome'
>
>
>
--
Resources:
- http://web2py.co
@eric That's interesting... So essentially you'd get an "app" on your
mobile, but it just opens to a webpage on a server.
That is probably the best solution offered so far although you need to be
connected to and also don't get access to phone's features like contacts,
notifications etc...
On Tue
Hello
I tried with sheduller
In model I created a file called scheduler.py
my code
def runWoshiEngine(scriptId, path, outPath):
import os, sys
import subprocess
count = 0
while ( count < 10 and ( os.path.isfile(outPath))):
count += 1
os.remove(outPath)
time
I will try that but I also tried doing this locally and not on
Pythonanywhere and get the same result so not too sure it is Pythonanywhere.
On Monday, January 11, 2016 at 4:35:50 PM UTC-5, Alessio Varalta wrote:
>
> write in the pythonanywhere forum because for example on my server there
> are a
I'm using psycopg2 v2.4.5.
Em terça-feira, 12 de janeiro de 2016 03:02:55 UTC-2, Massimo Di Pierro
escreveu:
>
> very strange. ConnectionWrapper is not a web2py/dal object. which version
> of psycopg2 are you using?
>
> On Monday, 11 January 2016 21:27:24 UTC-6, Júlia Rizza wrote:
>>
>> I have a
ouch. it's 4 years ago.. try to update it :D
On Tuesday, January 12, 2016 at 5:05:50 PM UTC+1, Júlia Rizza wrote:
>
> I'm using psycopg2 v2.4.5.
>
> Em terça-feira, 12 de janeiro de 2016 03:02:55 UTC-2, Massimo Di Pierro
> escreveu:
>>
>> very strange. ConnectionWrapper is not a web2py/dal object
no, it's not. please read the relevant section on the book to get
acquainted with the scheduler.
http://web2py.com/books/default/chapter/29/04/the-core#web2py-Scheduler
On Tuesday, January 12, 2016 at 4:06:31 PM UTC+1, Yebach wrote:
>
> Hello
>
> I tried with sheduller
> In model I created a fi
I'm seeing this traceback error when I try to run a function defined in a
model:
Traceback (most recent call last): File "/var/www/medios/gluon/scheduler.py"
, line 295, in executor _env = env(a=a, c=c, import_models=True) File
"/var/www/medios/gluon/shell.py", line 166, in env sys.exit(1) Syste
def result():
session.x=mail.send('smm...@gmail.com',
'hello',
'Hi Raghib, you
have a new entry: ','session.name+session.name2+" with
"+str(session.percent)')
if session.x==True:
response.flash="result"
else:
response.fla
what is easiest way to calculate total user uploaded data size so I can
bill them for storage individually?
each user will have multiple files loaded at different times. They will be
billed each month.
thanks
Alex Glaros
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documenta
Can someone please lay out the general concepts of how to implement Active
Directory for multiple groups on a single cloud instance?
Is it possible?
Let's say I have cities of Sacramento and Los Angeles as clients on a
single, cloud-based version of w2p. They want to integrate their own Active
as I find out from different sources, request.env.server_addr
and request.env.remote_addr should work but they don't really work. When I
used this for my app on pythonanywhere, I always
got request.env.server_addr as None and different ip address
for request.env.remote_addr than what is show
- request.client
- request.env.remote_addr
- request.env.http_x_forwarded_for
--
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)
---
You received
request.client is equal to http_x_forwarded_for if the header is there,
either remote_address.
They can't be ALL three different, unless request.env.remote_addr is an
ipv6 address. Either request.client equals remote_addr or request.client
equals http_x_forwarded_for .
on the "what they are" I s
with the default ldap adapter you can't.
It won't be hard to hack to search in multiple AD domains, but the setup is
highly unusual: one app should have one source-per-type identification
provider.
e.g. user: niphlod. I exist in Sacramento, but also on Los Angeles
(because, basically, two niphl
if you store the file-size as metadata it would be matter of a
select sum(filesize) from thattable group by user
if you choose not to do it (which I don't recommend), you'd have to
retrieve the file for each user and sum the calculated size.
On Tuesday, January 12, 2016 at 7:38:24 PM UTC+1, Al
If you read docs about mail.send, you'd know that it takes
mail.send(to, subject, message, attachments, cc, .. etc etc etc).
for html-only mails, it should be
mail.send('recipi...@gmail.com, 'subject', 'thebody', etc etc
etc)
That being said, what's the error ?
On Tuesday, January 12, 20
Excuse me, one last question.
Is it really necesary?
import copy
db._adapter.types = copy.copy(db._adapter.types)
or modify the adapter right away will work? It looks like it does, but i
dont know if theres any implication by skiping copy.
Thanks
--
Resources:
- http://web2py.com
- http://we
it seems an error in the model definition, as line 166 in gluon.shell is
where an exception is raised when executing model files BEFORE calling the
controller.
As I repeatedly said, scheduler is just calling shell at regular intervals
on steroids. If it works on the shell, it'll work on the sche
So for a rookie like me, does the simplest solution seem to be to create a
special independent app for each organization just for auth/LDAP purposes,
then transmit the user data to the centralized, common, shared instance?
The goal is to allow for example, Paris and Chicago to auth independent o
On Tuesday, January 12, 2016 at 9:07:23 PM UTC+1, Alex Glaros wrote:
>
> So for a rookie like me, does the simplest solution seem to be to create a
> special independent app for each organization just for auth/LDAP purposes,
> then transmit the user data to the centralized, common, shared insta
What about multi-tenancy?
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?search=multi+#Common-fields-and-multi-tenancy
He could check which domain is accessed and authenticate against the proper
LDAP instance, no?
Richard
On Tue, Jan 12, 2016 at 3:43 PM, Niphlod w
http://web2py.com/books/default/chapter/29/11/jquery-and-ajax
On Tuesday, January 12, 2016 at 9:12:02 AM UTC-5, rgbap...@gmail.com wrote:
>
> How to do that? Can you write a chunk of code please if it doesn't bother
> you?
>
> On Tuesday, January 12, 2016 at 12:31:27 AM UTC+5:30, Anthony wrote:
>
Ive spent 6 hours wondering why i couldnt update or insert a record with
the interactive console.
After changing mysql user passwords, drop tables, remigrate everything,
mounting a fresh new web2py installation, tried to disable caching, i wasnt
able to update or insert a record even tho the do
Can anyone help me with syntax for computing file size and posting to
metadata? Niphlod got me started in the right direction.
Is this the right idea? Am trying to get file size into field file_size
below:
def filesize(filename):
import os, stat
return os.uploadfolder(os.path.join(request
also tried to enter file_size within form when adding the record
if form.process().accepted:
session.flash = 'profile update accepted'
form.vars.file_size = filesize([form.vars.thumbnail])
result was
return os.stat(os.path.join(request.uploadfolder,'uploads'))
File "nt
You can send pull requests to the book repo:
https://github.com/mdipierro/web2py-book
If you want to suggest substantial changes to the organization/structure of
the docs, you might first open a discussion on the developers group:
https://groups.google.com/forum/#!forum/web2py-developers
Antho
See also
http://web2py.com/books/default/chapter/29/15/helping-web2py#Documentation--Updating-the-book.
On Tuesday, January 12, 2016 at 9:42:55 PM UTC-5, Anthony wrote:
>
> You can send pull requests to the book repo:
> https://github.com/mdipierro/web2py-book
>
> If you want to suggest substant
request.env.remote_addr is the socket remote address and request.client is
the former or the HTTP_X_FORWRDED_FOR.
none of them is 100% reliable as they can be tricked by the visitor.
On Tuesday, 12 January 2016 04:10:50 UTC-6, 黄祥 wrote:
>
> i think you can use request.client
> e.g.
> def oncreate
That is why we do not use the built-in python localization functions in
web2py. They are not thread safe.
On Tuesday, 12 January 2016 08:16:43 UTC-6, Niphlod wrote:
>
> this is not threadsafe. use utc and translate dates when presented to
> users.
>
> On Tuesday, January 12, 2016 at 12:41:44 PM
is it possible to update 2 sessions values using web2py module? i've tested
it only first session value work, the second session value work if explicit
define in the module (but the module is used by another controller, so i
want to create just 1 module for all controllers).
e.g.
*modules/transa
I do this
form.process(keepvalues=True,onvalidation=validate_meas).accepted:
and the form retains values on submission.
On Saturday, January 11, 2014 at 12:10:07 AM UTC+5:30, Kiran Subbaraman
wrote:
>
> Hello All,
> The *design *is: I have a custom form with the a controller that
> inserts/upda
But I use FORM and not SQLFORM.
On Saturday, January 11, 2014 at 12:10:07 AM UTC+5:30, Kiran Subbaraman
wrote:
>
> Hello All,
> The *design *is: I have a custom form with the a controller that
> inserts/updates a table. Tthe form accepts data, and on successful
> submission of this form, it sta
I realy hate web2pyslices.
Maybe there are people who like this page, however for me it is always pain.
List of plugins is terrible and I think it is because their authors simple
cannot understand how to upload some stuff. For final users it is then
completly useless - and more: makes big shame t
48 matches
Mail list logo