in db:
Field('bal', 'decimal(16,8)', default = Decimal(0)),
Field('fee', 'decimal(5,3)', default = Decimal(0)),
in appadmin I set values
in controller:
t.fee =0.3
t.bal - t.fee -> error! float and decimal operation
--
Resources:
- http://web2py.com
- http://web2py.com/book (Document
fff = round( float (t.decimal_val), 2)
четверг, 13 февраля 2014 г., 14:49:44 UTC+3 пользователь Robin Manoli
написал:
>
> Hey,
> I have a decimal in db, for which I tried numerous ways to round to two
> decimal points, and also to calculate with other numbers. Basically I want
> to convert it t
It shouldn't be no problem.
Can you share your code... ?
try
_target="_blank"
On Wednesday, September 9, 2015 at 7:49:27 PM UTC-5, Diego Tostes wrote:
>
> I am using the A helper. It is possible to use this helper to create a pop
> up to the link?
>
> Thanks
>
--
Resources:
- http://web2p
It appears that no workers are being started with my queuing the tasks in
this manner. If they can't be started in the controller or if they were
expected to be started with the above code, please let me know.
Otherwise, sincere thanks for all of your posts, in general, with Web2py
--
Resource
*Please see top post (9-9-15)*
--
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 Groups
I am using the A helper. It is possible to use this helper to create a pop
up to the link?
Thanks
--
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 rec
I need left-outer-join help that has added complexity beyond the simplified
example I gave
This query below works perfect if used by itself except doesn't have the
outer join feature
query = ((db.StaffPosition.jobClassification==db.JobClassification.id)&
(db.StaffPositionOrganization.staffPosi
href=row.url
On Wednesday, September 9, 2015 at 3:53:12 PM UTC-4, Diego Tostes wrote:
>
> Hi,
>
> i have a model with:
>
> Article = db.define_table('article',
> Field('title', 'string'),
> Field('author', 'string'),
> Field('type_article', 'string'),
> Field('url', 'string'),
>
hi Diego,
URL might be a reserved word or give rise to confusion, so consider
changing it
I think you don't need the virtual link. Just add a "represent" clause.
Here's a working example but it references other table.
Field('superObjectURLID', 'reference SuperObjectURL', label='Meeting
How do i add a class to form.custom.begin? are they stripped from the form?
ive tried:
form = auth()
form.add_class("hey")
but form.custom.begin outputs
Thanks
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https:/
Thats so cool. Thank you very much
You can acomplish things in web2py in such different ways that is easy to
miss the best ones.
http://web2py.com/books/default/search/29?search=form.custom
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/we
Hi,
i have a model with:
Article = db.define_table('article',
Field('title', 'string'),
Field('author', 'string'),
Field('type_article', 'string'),
Field('url', 'string'),
Field.Virtual('link_to_click', lambda row: A('click_here',
_href=)),
)
How can do to show the url field
Replace:
with:
{{=form.custom.end}}
Anthony
On Wednesday, September 9, 2015 at 1:42:23 PM UTC-4, Alfonso Serra wrote:
>
> I would like to design custom forms outside the bounds of creating custom
> web2py formstyles, using the template language instead.
>
> Ive been able to decouple the fiel
Ok you right... orderby=id
On Wed, Sep 9, 2015 at 3:06 PM, Michele Comitini wrote:
> absolutely normal, try ordering or using max
>
> 2015-09-09 20:54 GMT+02:00 Richard Vézina :
>
>> Postgres
>>
>> On Wed, Sep 9, 2015 at 2:23 PM, Leonel Câmara
>> wrote:
>>
>>> You do not have an orderby on that
absolutely normal, try ordering or using max
2015-09-09 20:54 GMT+02:00 Richard Vézina :
> Postgres
>
> On Wed, Sep 9, 2015 at 2:23 PM, Leonel Câmara
> wrote:
>
>> You do not have an orderby on that select so, depending on your backend,
>> yes that can be very normal.
>>
>> --
>> Resources:
>> -
Postgres
On Wed, Sep 9, 2015 at 2:23 PM, Leonel Câmara
wrote:
> You do not have an orderby on that select so, depending on your backend,
> yes that can be very normal.
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source
In addition to putting auth.wiki(resolve=False) in db.py, I have a refresh
function as follows (because I couldn't get auth.wiki.get_renderer to work.)
import string
@auth.requires_membership('administrator')
def refreshWiki():
print "\n"
for row in db(db.wiki_page).select():
newh
You do not have an orderby on that select so, depending on your backend,
yes that can be very normal.
--
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
I would like to design custom forms outside the bounds of creating custom
web2py formstyles, using the template language instead.
Ive been able to decouple the fields and form attributes but i dont want to
lose the security.
So the answer is, how do i include the hidden div with the token?
Exam
Hello,
db().select(db.table.id).last().id don't return the last record available,
it consistently (same id) return a wrong record id...
rows[-1] also return wront (the same id)
.first() also not return the first available record
rows[0] also return wrong (the same id)
Is that normal?
Richar
For me the following did the trick...
*db.py*
def my_custom_auth(*args, **kwargs):
from hashlib import md5
"""
auth2 = Auth(db, controller="auth", function="user",
hmac_key=Auth.get_or_create_key())
auth2.settings.create_user_groups = False
auth2.settings.login_methods = [my_
On Wednesday, September 9, 2015 at 8:21:41 AM UTC-4, desta wrote:
>
> Thank you.
>
> I am trying to follow the procedure. So when the login form is submitted,
> I guess line 1609 is called (?)
> https://github.com/web2py/web2py/blob/master/gluon/tools.py#L1609.
>
> Following the getattr, I can't
Upgrading didn't change the problem. But I found this link:
http://www.web2pyslices.com/slice/show/1565/wikifying-web2py-apps
I added the line:
auth.wiki(resolve=False)
to my db.py document and then I was able to reference the db.wiki_page
object. So the issue is resolved. Thanks all for helping.
Instead of response.render, you can use gluon.template.render:
from gluon.template import render
html = render(db.mytable(1).template, context=dict(key1=value1, key2=value2
))
Note, if the template needs access to web2py globals and objects defined in
your models, you can set context=globals().
Thank you.
I am trying to follow the procedure. So when the login form is submitted, I
guess line 1609 is called (?)
https://github.com/web2py/web2py/blob/master/gluon/tools.py#L1609.
Following the getattr, I can't seem to find where it validates and
redirects. Could you please enlighten me?
as for the needed script, there are bits and piecies in the master repo to
cut/paste to a working solution.
for the coverage part, we recently switched to codecov for the coverage (we
used to rely on coveralls too)
On Wednesday, September 9, 2015 at 11:27:30 AM UTC+2, Stefan van den
Eertwegh w
auth is an instance of Auth that you have defined in your model. Auth
happens to have a __call__ method so auth will be callable like a function.
When called auth uses the first argument (request.args(0)) to get the
correct user function (login, register, etc) from Auth using getattr and
return
Hello everyone.
I want to understand how the login/register etc work.
How does the 'default' controller exposes the 'user' functions? When the
client requests 'default/user/login' what does the '/login' part do? In the
'default.py' file I see that the controller always returns a form 'return
Hi All,
I have a GITLAB CE and GITLAB CI server running.
Does anyone have an example for a python based web2py gitlab-ci.yml for
continuous integration with web2py project GIT's?
For the people who not know what this file is.. it is the file that
configures the test suite for CI integration wit
Try something like that, just before SQLFORM(...)
db.changecontrol.project_id.requires =
IS_IN_DB(db(db.Project.account_id==auth.user_id), db.Project.id,'%(name)s
(%(id)d)',zero='Select ...')
On Tue, Sep 8, 2015 at 8:55 PM, Vincent Zaffiro
wrote:
> I am trying to utilize the SQLFORM magic as mu
Thanks Massimo,
Ended up not needing "data_rows"
Just putting statement in grid worked:
grid = SQLFORM.grid(db.JobClassification,left= db.StaffPosition.on(query))
Much appreciated!
Alex
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/we
31 matches
Mail list logo