I need a function to manage payment by installment and when fee is fully
paid
db.define_table('payment_type',
Field('category'),
Field('amount', 'double'),format='%(category)s %(amount)s')
db.define_table('fee',
Field('name', 'reference students'),
Field('category', 'reference payment_type'),
Fi
From: web2py@googlegroups.com on behalf of Dave S
Sent: Tuesday, May 28, 2019 7:10 pm
To: web2py-users
Subject: [web2py] Re: GAE Task Queue no longer passes payload to web2py function
On Tuesday, May 28, 2019 at 4:11:40 AM UTC-7, Carl Hunter Roach wrote:
I installed R-2.15.4.
You are
On Tuesday, May 28, 2019 at 4:11:40 AM UTC-7, Carl Hunter Roach wrote:
>
> I installed R-2.15.4.
> You are right that I don't get any function parameters in the functions
> that handle my Google tasks.
>
> I am getting a weird error.
>
> In the function handling the Google task that historically
I installed R-2.15.4.
You are right that I don't get any function parameters in the functions
that handle my Google tasks.
I am getting a weird error.
In the function handling the Google task that historically worked) the
value of `request.body` is:
', mode 'w+b' at 0x2b31c3ed9930>
That is wei
Thanks for responding dps.
Having found the issue arrive with the R-2.15.0b2 release I did try the latest
2.18x line. But that too was broken so I went back to R-2.14.6
But then last week the issue started to occur (I hadn’t pushed any code so this
change is hard to explain, to say the least).
On Friday, May 24, 2019 at 3:43:26 AM UTC-7, Carl Hunter Roach wrote:
>
> This code has been working for a couple of years but, for an unknown
> reason to me, has stopped working.
>
> This function continues to create Tasks correctly.
>
> def send_task():
> from google.appengine.
Hello i added an authors and readers computed fields to my table
db.define_table(
'entities',
...
Field('authors',compute= lambda r:authors(r)),
...
)
when i save a record i get this
:
authors :
[**]
created_by :
4L
created_on :
datetime.datetime(2017, 6, 28, 16, 16, 24)
delete_record
I would like to add a list of dates into my data base when the user signs
up.
from datetime import date, datetime, timedelta
import random
from random import randint
dog = randint(3,25)
def perdelta(start, end, delta):
curr = start
while curr < end:
yield curr
curr += delta
So I want to update the database while a scheduler task is running but the
function won't update it. If I try to run the same function from a
controller it will update the database.
Here is the function:
def Test():
row = db(db.posts.Posted==False).select().first()
row.update_record(Pos
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
Hi community!
I want to call a function inside other function, What can I do?
For example:
def function_1():
y = 'This is an example'
(I wanna here my function "function_2")
return locals()
def function_2():
x = 'Hello world'
return locals()
My best regards.
--
Resourc
confirm button. This then calls a web2py function that sends a confirmation
email and books the seats in the database.
A user claims it is double booking him even though he only clicks confirm
once. The strange thing is it only does this for him and it has done it
three weeks running.
Has anyone
Of course, if you define a function in a module, you will need to explicitly
import it. You can import it in a model file if you like.
Anthony
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/w
Hi there,
I'm building a webapp with the model less app approach by Bruno Rocha and I
stumble upon a problem.
Usually when you use models you can define function which can later be used
inside a view.
How would I do this with a model less approach?
--
Resources:
- http://web2py.com
- http://w
i am gettting this error.
function 'GEOSversion' not found
--
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 subs
On Thursday, August 7, 2014 1:38:48 PM UTC-7, wish...@gmail.com wrote:
>
> Hi guys,
>
> any idea how I can map an url like upload/upl*.php5* to an web2py
> controller/function?
>
>
This is way out of my range of expertise, so expect to hear sniggering from
the experts, but I'd look at a rewrite
Hi guys,
any idea how I can map an url like upload/upl*.php5* to an web2py
controller/function?
Background: upload/upl.php was the old url from an outdated php server
stack. Unfortunately it has been hardcoded in some clients out of my
control.
To make things work a 301 redirect will break thi
On Tuesday, June 3, 2014 12:50:48 PM UTC+3, Maurice Waka wrote:
>
> from applications.Folders1.modules.myfolder1.main import mainfrom
> applications.Folders1.modules.myfolder1.list1 import GAMES0
> code.if id == name3:
> result = location
> return result
> else:
I tried to work it out but I still have no breakthrough. Now I get this
None write response instead. Here is the code:
from applications.test.modules.Test1 import GAMES0from
applications.test.modules.Test1 import GAMES1from
applications.test.modules.Test1.cores import mainfrom gluon import *de
Thanks team!! That gives me an idea of how to program. Mush appreciated!
On Thu, Jun 5, 2014 at 2:20 AM, Derek wrote:
> you running it from the shell gives you the REPL which you don't have when
> you run it through web2py. repl will print out if you just give it a class
> it will tell you what
you running it from the shell gives you the REPL which you don't have when
you run it through web2py. repl will print out if you just give it a class
it will tell you what instance of class you have. if you want to print like
it does in the repl, you need to 'print repr(x)' where x is the class
Some of the code in the functions and classes not displayed in your
original post may reference web2py globals and environment variables.
I think (I'm still learning web2py also) that running your code in the
shell then has access to the web2py environment. Modules do not have
access automatic
When I work with the same module on python shell, its perfectly printing
out. I dont know why it does not print on web2py. Basically I imported it
without editing from python shell. Anyway since am new to web2py and
python, you could help out
On Tuesday, June 3, 2014, Derek wrote:
> Sorry, but it
Sorry, but it looks like it's doing what you are asking of it. Perhaps you
should comment your code to make sure it's doing what you are thinking it's
doing.
you are instantiating a new filters class, giving it the name 'o', then you
get a list of the contents of that class, run them if possible
from applications.Folders1.modules.myfolder1.main import mainfrom
applications.Folders1.modules.myfolder1.list1 import GAMES0
code.if id == name3:
result = location
return result
else:
while True:
class Filters(object):
There's default/download function, usually used like this on files that
were uploaded:
Download
In this case, I do not want to keep the full download path in my tag.
Instead, when the link is clicked, I would like to redirect to another
function, which will proceed with the download based on
Answered on StackOverflow: http://stackoverflow.com/a/14341931/440323
On Tuesday, January 15, 2013 3:19:13 AM UTC-5, Mihir Lade wrote:
>
> Hi Anthony,
>
> Thanks for your reply.
>
> The code to searchFlights is as below:
>
> def searchFlights():
> return dict()
>
> def show():
> *received
Also, I am querying a local database that I created using the DAL.
Yes, I am creating a custom HTML form and posting it to web2py to query the
database..
On Sunday, January 13, 2013 9:45:11 AM UTC+10:30, Anthony wrote:
>
> Can you provide more details regarding what you have tried? How are you
Hi Anthony,
Thanks for your reply.
The code to searchFlights is as below:
def searchFlights():
return dict()
def show():
*receivedFlights =
request.vars.originCity+','+request.vars.destCity+','+request.vars.type+','+request.vars.deptDate+','+request.vars.arrivalDate+','+request.vars.v
Can you provide more details regarding what you have tried? How are you
creating the form and posting to web2py? Are you querying local databases
that you are modeling with the DAL, or are you querying some external API's?
When you submit a form to web2py (via GET or POST), the variables will be
Hi Alan,
I've read the chapters a few times however having difficulty understanding
a HTML search page would pass the information to a function where it
queries multiple databases to return the data?
On Sunday, January 13, 2013 8:14:07 AM UTC+10:30, Alan Etkin wrote:
>
> The book has anything y
The book has anything you are asking for and much more. For an introduction
to forms and controllers I think you could check the examples at Overview:
http://www.web2py.com/books/default/chapter/29/03#Overview
Also, there are appliances available you can use as example:
http://www.web2py.com/ap
Hi Guys,
I am currently working on an assignment where I need to create a function
which would query the database to search flights available according to the
users input through the HTML form. I have attached a picture of the HTML
form.
Basically the user, selects the origin, the destination,
Dear web2py folks,
I have a controller that fetches a record from the DB (I'm using
GAE).
def event():
id=request.args[0]
myrow = db.event[id]
return dict(myrow = myrow)
What I try to render the result as JSON, I get the following error
(trace starts from generic.json view)
I have the controller:
@auth.requires_login()
def roll():
if request.args(0):
step = int(request.args(0))
else:
return dict(message = "Roll it!")
if request.args(1):
visible = False
else:
visible = True
result = util.roll_step(step)
db.live.i
I agree about using the online book, especially if you are following along
at your computer. If you are new to Python, make sure to read the Python
chapter.
Just keep in mind that writing technical documentation for a wide variety of
skill levels is really, really hard. The Web2py Book does a v
On Friday, March 25, 2011 10:00:04 AM UTC-4, Hal Smith wrote:
>
> As I continue to plug along, following your manual, I keep bumping
> into web2pyfunctions (I assume) - such as index (), first (), second
> (), and dict (). It would be nice to have these documented, in
> something like the UNIX
There are Python keywords
http://zetcode.com/tutorials/pythontutorial/keywords/
There are Python built-in function, defined here:
http://docs.python.org/library/functions.html
(dict is one of them)
There are web2py APIs, they are all documented in the book:
http://web2py.com/book/default/chap
As I continue to plug along, following your manual, I keep bumping
into web2pyfunctions (I assume) - such as index (), first (), second
(), and dict (). It would be nice to have these documented, in
something like the UNIX Man pages.
Later, it speaks of request.vars.visitor_name - without explaini
2011/2/11 Manuele Pesenti :
> (...)
> TypeError: float() argument must be a string or a number
>
> Thank you very much for any help.
>
>Manuele
>
where/why is the/a float argument?
Hi,
how can I select records of a table that got 2 date fields (one datetime
and a simple date) wich difference is a fixed value?
I thought this solution:
import datetime
today=datetime.datetime.today()
yesterday = today.date() - datetime.timedelta(days=1)
db.define_table('mytab',
...
i have 2 function in controler/vnstoragedoc.py
def check(type1,type2,type3):
query1 =
db.archives.symbol.like('%'+request.vars.txtSoKyHieu+'%')
query2 = db.archives.key.like('%'+request.vars.txtTuKhoa+'%')
query3 = db.archives.archives_type == db.arch
On Sun, Oct 24, 2010 at 2:18 PM, Luther Goh Lu Feng wrote:
> If I have a function that I intend to call from different controllers, but I
> have no need for the function to have a view, where should this function be
> defined? eg. a function that simply calculates the outcome of a math formula,
>
If I have a function that I intend to call from different controllers, but I
have no need for the function to have a view, where should this function be
defined? eg. a function that simply calculates the outcome of a math formula,
and several controllers will call this function to display the re
Is there a built-in function that will list all members of a group, or
do I need to write a query to do that? Seems like such a function
should exist, but I can't find it in the doc.
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to thi
I found BeautifulSoup to do it.
On Jul 3, 9:51 am, dlypka wrote:
> If I load some raw HTML into eamy or a simple TEXTAREA, I need to
> have it pretty-printed first, to avoid the long lines which mess up
> the display.
> I see there are various python libaries to do this.
>
> But does web2py alr
t; - Finally, you give little information about your problem. You
> >> >> probably would live better with an IDE/debugger, probing your stack
> >> >> data with breakpoints and showing you the code at execution time.
>
> >> >> Best Regards
>
> >>
ve little information about your problem. You
>> >> probably would live better with an IDE/debugger, probing your stack
>> >> data with breakpoints and showing you the code at execution time.
>>
>> >> Best Regards
>>
>> >> On 11 Maio, 21:54, NetHead wrote
n 11 Maio, 21:54, NetHead wrote:
>
> >> > Hey Gang:
>
> >> > When a user visits a page, I am attempting to run the following lines:
>
> >> > import os
> >> > os.system("E:/Python/web2py_src/web2py/applications/TheReckoning/
> When a user visits a page, I am attempting to run the following lines:
>>
>> > import os
>> > os.system("E:/Python/web2py_src/web2py/applications/TheReckoning/
>> > prod_scripts/dropship_copy_to_opc.bat")
>>
>> > This exact com
If I load some raw HTML into eamy or a simple TEXTAREA, I need to
have it pretty-printed first, to avoid the long lines which mess up
the display.
I see there are various python libaries to do this.
But does web2py already have such a function somewhere? I see the CODE
widget, but it does colori
> > os.system("E:/Python/web2py_src/web2py/applications/TheReckoning/
> > prod_scripts/dropship_copy_to_opc.bat")
>
> > This exact command works fine from a Python interactive session,
> > BUT when put into a Web2py function, the page never loads -- the
>
web2py/applications/TheReckoning/
> prod_scripts/dropship_copy_to_opc.bat")
>
> This exact command works fine from a Python interactive session,
> BUT when put into a Web2py function, the page never loads -- the
> blue bar just creeps forward slly.
>
> We tried this
Hey Gang:
When a user visits a page, I am attempting to run the following lines:
import os
os.system("E:/Python/web2py_src/web2py/applications/TheReckoning/
prod_scripts/dropship_copy_to_opc.bat")
This exact command works fine from a Python interactive session,
BUT when put int
54 matches
Mail list logo