How do I insert attributes ie _class="small" into a custom form tag.
Should look like below at the end of the day.
''
I didn't find any attribute function in form.custom.begin to insert
the above.
ass'] = 'small'
> >>> form.custom.begin.xml()
>
> ''
>
> On Jul 6, 11:14 am, mdipierro wrote:
>
>
>
> > form['_class']='small'
>
> > On 6 Lug, 09:33, rāma wrote:
>
> > > How do I insert
Hi,
How do I get the form to validate right.
I want to validate an email field ONLY IF it is filled in. IS_EMAIL()
doesn't meet my requirement as it enforces validation simply by
submitting.
IS_NOT_REQUIRED() validator? ;-)
Rāma
Thank you for the blazing fast response.
I didn't find that in the book hope its noted somewhere to be added
later.
Rāma
On Jul 20, 1:33 am, mdipierro wrote:
> IS_EMPTY_OR(IS_EMAIL())
>
> On Jul 19, 12:23 pm, rāma wrote:
>
>
>
> > Hi,
>
> > How do I get
Usually you create a function in the model so that it is available
throughout the view and and controllers.
On Jul 20, 1:57 am, Luis Díaz wrote:
> how I can create your own functions, style MENU () or URL ()?
>
> I want to call them from any (controllers, view) without import
> with local_import
I think I have a double submission problem on crud create. I am using
a redirect in the view instead of the next attribute because I have to
evaluate certain variable conditions. Haven't tried in other
situations. I don't know if anyone can confirm this.
Hi,
Does anyone has a working example of the Google WebSearch AJAX API. I
need to count the returning hits for a particular keyword on
GoogleScholar.
Pls share.
If anyone has it in PHP etc do share. I will try to port it to web2py.
Interesting thread glad I found it by searching the group because this
is what I am doing currently. However, the LMS is designed to be a
prototype trial though. I will be testing the beta LMS with a bunch of
students next week. I will be interested to help too in this project.
On Nov 8, 2:45 pm,
Wow that's an amazing site in 200 lines code !
On Jan 29, 4:28 am, mdipierro wrote:
> http://www.reddit.com/r/Python/comments/av2r8/creating_school_library...
--
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to
al.
>
> Massimo
>
> On Jan 28, 3:08 pm, rāma wrote:
>
>
>
> > Wow that's an amazing site in 200 lines code !
>
> > On Jan 29, 4:28 am, mdipierro wrote:
>
> > >http://www.reddit.com/r/Python/comments/av2r8/creating_school_library...
--
You r
update book
> info from ISBN and making the interface more customizable).
>
> On Jan 28, 3:53 pm, mdipierro wrote:
>
>
>
> > It is there. There is a download link at the top of the search page.
> > It requires web2py to open it.
>
> > On Jan 28, 3:45 pm, rām
How do you get the initial url which initiated the redirect to a login
screen. I need to build a dictionary for custom login errors based on
these urls. Can this information be accessed from the login view?
This is rather daunting. An sms gateway put their variables in their
header rather than urlencode it. I am not sure how to get my app to
fetch the header variables from the request sent by the server.
I tried mimicking using urllib2 by sending headers to my app. But,
request.headers always return
Thanks a bunch! Its working
On Dec 20, 2:32 pm, mdipierro wrote:
> they are in request.env
>
> so header called blablabla would be in request.env.http_blablabla
>
> On Dec 20, 12:09 am, rāma wrote:
>
>
>
> > This is rather daunting. An sms gateway put their variab
Hi all,
I'm aware that you can bulk insert using a dictionary but is there a
way to :
dictionary={'field1':'value','field2':'value' ...}
db.table.insert(dictionary)
It would be really easy if I can do this.
Cool!! Thanks
On Dec 20, 11:23 pm, mdipierro wrote:
> db.table.insert(**dictionary)
>
> On Dec 20, 9:19 am, rāma wrote:
>
>
>
> > Hi all,
>
> > I'm aware that you can bulk insert using a dictionary but is there a
> > way to :
>
I tried to construct a validator:
db.sender.keywords.requires = IS_IN_DB(db( db.auth_user.id=user_id ),
db.userkeywords.keyword)
I was able to do this in previous versions.
Please help.
Simple mistake. Sorry!
On Dec 23, 2:05 pm, rāma wrote:
> I tried to construct a validator:
>
> db.sender.keywords.requires = IS_IN_DB(db( db.auth_user.id=user_id ),
> db.userkeywords.keyword)
>
> I was able to do this in previous versions.
>
> Please help.
Does/Can web2py store tzinfo in the datetime by the datepicker so that
we can do time conversion easily to server time or UTC time. Time
conversion was hell for me for the past two days.
How is this issue typically approached?
For my case, it has to be accurate as tasks are scheduled client side
Can't do this anymore in the newer version. Any substitutes?
both fields has requires=IS_IN_SET with multiple=True
{{=A('('+str(db((~db.pm.deleted_by.contains(user_id))&(~db.pm.read_by.contains(user_id))).count())
+')',_href='#',_class='mail')}}
Searched around and found that it can be done this
Hi everyone,
Long since I last posted. I just came across autoroutes script and after
adding my domain and subdomain in the config, it does not seem to be
routing to the app. However, only the first route works.
I need test.domain.co -> /myapp/
Is this expected or autoroutes are only designed
I think the import button should have a delimiter field makes things easier.
On Thursday, 12 March 2009 00:08:27 UTC+8, mdipierro wrote:
>
> There is no configuration parameter to do so. You mat create your own
> csv serializer. look into the python csv module.
>
> On Mar 11, 10:01 am, Marco Pro
Traceback (most recent call last):
File "C:\web2py\gluon\restricted.py", line 188, in restricted
exec ccode in environment
File "C:\web2py\applications\beta/views\default/user.html", line
136, in
TypeError: 'str' object does not support item assignment
Posting this because it started affe
SQLFORM factory field with underscore in them doesn't seem to submit
properly for the below case:
SQLFORM factory field name with underscore doesn't submit properly in
the below case:
SQLFORM.factory(Field('fieldname', - Submit OK
SQLFORM.factory(Field('select_fieldname', - Submit failed got a
None returned I think.
just to add: form catches the session as well.
Regards,
Rama
I updated web2py from 1.91XX to 1.92XX felt the speed improved a
little which was previously worse. but now facing the same issue. This
speed I'm talking about is when editing the app using the admin which
also recently started affecting page load while loading the backend (a
noticeable lag 1~2 sec
Dear all,
We certainly can do this
count = db.person.field.count()
for row in db(db.person.field==db.dog.owner).select(db.person.name, count,
groupby=db.person.field):
print row.person.name, row[count]
but what if we have a person.field of type list:string. I know the field has
a 'contains' me
I think this should be it:
query=db((db.things.id>0)&(db.photos_things.id==db.photos_things.thing_id)).select()
for row in query:
list = [row.things.title, row.photos_things.photo_id.image]
the loop is wrong. The below will be it.
list=[]
for row in query:
list.append([row.things.title, row.photos_things.photo_id.image])
Has this been fixed?
Has there been updates on this. I am working on using web2py as a backend
for my mobile app. Where there are no privileged cookies to track, is
Niphlod's solution the best so far Dave Lypka suggested a few modification
to the source, which I am not comfortable doing unless really necessary.
On
Hi,
I followed the instruction:
3) Use it!
Now API users can obtain a token with
http://.../app/default/user/jwt?username=...&password=
(returns json object with a token attribute)
API users can refresh an existing token with
http://.../app/d
r])
This happened to work for me.
Cheers,
rāma
--
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
I could do this in SQLFORM readonly mode:
https://groups.google.com/forum/#!topic/web2py/KnEaFsRRHL4
However, how do you make SQLFORM to show the translations in edit mode. Do
you have to modify the widget? How?
Thank you.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documenta
Obsoleted by Anthony's answer:
https://groups.google.com/d/msg/web2py/pY36w84ovgQ/lA5vepMRBgAJ
On Wednesday, 25 July 2018 12:29:32 UTC+8, rāma wrote:
>
> Just to share with everyone for a record here. Tried searching and
> couldn't find anything easily.
>
> If you
label, ...} form:
> IS_IN_SET({value: T(value) for value in values})
>
> # As a list of tuples in (value, label) form:
> IS_IN_SET([(value, T(value)) for value in values])
>
> # Using the "labels" argument.
> IS_IN_SET(values, labels=[T(value) for value in val
Based on recommendations of a muli-lingual site here:
https://stackoverflow.com/a/16624252
Does anyone have it implemented in web2py?
Appreciate if you have existing URL rewrites for me to try out.
Thanks!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://gi
18 at 11:36:53 PM UTC-4, rāma wrote:
>>
>>
>> Based on recommendations of a muli-lingual site here:
>> https://stackoverflow.com/a/16624252
>> <https://www.google.com/url?q=https%3A%2F%2Fstackoverflow.com%2Fa%2F16624252&sa=D&sntz=1&usg=AFQjC
Hi web2py community,
I am thinking of protecting my admin area with a secret var.
I tried to put
if request.controller == 'admin':
reponse.flash = request['vars']
#raise HTTP(404, "page looking for does not exist")
But I can't seem to get a proper response. I even tried inspecting the
This is wonderful. And, something I would love to be adopted to the
official repo.
Thanks for this!
On Sunday, 3 March 2019 19:24:38 UTC+8, Nico Zanferrari wrote:
>
> Good morning!
>
> I'm proud to say that I've succeeded in building the Windows 64 bit binary
> with python 3.7.2 using pyinstall
64-bit version. I used a conda
environment running of pycharm in my original version and made sure all the
site-packages modules or not preinstalled in the conda environment.
Please help.
On Friday, 26 April 2019 13:02:37 UTC+8, rāma wrote:
>
> This is wonderful. And, something I would
for py2.7, web2py for py3.7, web3py for py3.7 (WIP)
>
>
>
>
>
>
>
>
>
> On Thursday, 25 April 2019 22:02:37 UTC-7, rāma wrote:
>>
>> This is wonderful. And, something I would love to be adopted to the
>> official repo.
>>
>> Thanks
27; makes PyInstaller to work with distutils and to work inside
> virtualenv environment."
>
> It's possible to change this behaviour on gluon/shell.py by adding the
> missing code - I'm setting up a PR for this ;-)
>
> Nico
>
>
> Il giorno dom 28 apr
n this howto page
> <https://github.com/nicozanf/web2py-pyinstaller/blob/master/HOWTO-modules.md>
> for
> future reference - feel free to correct me if I was wrong somewhere!
>
>
> Cheers,
> Nico
>
>
> Il giorno lun 29 apr 2019 alle ore 04:24 rāma > h
ONE month!? Sounds super exciting.
On Thursday, 2 May 2019 15:16:21 UTC+8, Massimo Di Pierro wrote:
>
> yes. for my prospective it is very close to be done. we have:
>
> [x] more than x10 faster than web2py
> [x] pydal (same as web2py)
> [x] routing (like bottle or flask)
> [x] T
> [x] helpers (99
Still no solution?
On Wednesday, 5 October 2011 19:37:39 UTC+8, Anthony wrote:
>
> I think if you specify a much longer maxtextlength, the text will
> ultimately wrap, but it may cause the column to be much wider than you
> want. Maybe all the th's and td's should include column-specific classes
Looking for something like this too
On Sunday, 15 March 2015 22:34:06 UTC+8, pumplerod wrote:
>
> The web2py support page lists experts4solutions as a group to inquire
> about consulting or development, however, their home page has no method of
> contact? My coding chops are really just good en
I used:
for x in grid.elements('td.row_buttons'):
x.insert(4, A(
[SPAN(_class="menu-icon fa fa-paper-plane"), SPAN("Go To",
_class="buttontext button", _title="GoTo")]
, _href="TEST", _class="button btn btn-default btn-secondary"))
This is specific to my needs, you may not w
, _href="TEST", _class="button btn btn-default
btn-secondary")]
))
you can get the row properties into your button. But, what I am not sure is
how to control where it appears in the table. Right now, by default, it
appears before table referencin
Hi,
Is there anyone working on packaging web2py as an webview app?
Is it easily deployable with these kits?
--
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)
I am using the latest version of NSSM - the Non-Sucking Service Manager;
both 2.24 and the prelease build 2.2.4-101 .
Unfortunately for me, NSSM sucked big time and trying to get it working
with web2py was an utter waste of time.
Tried
-K; nothing and tried
-X; nothing anyways
Env:
Python3.7
W
Can the taskutils be used to replace nssm with web2py?
On Wednesday, 27 January 2016 13:49:26 UTC+8, Massimo Di Pierro wrote:
>
> # a library to convert units and propagate errors in math
> https://github.com/mdipierro/buckingham
>
> # a library to automatically install modules when imported
> htt
to select the column holding the
> command line)
>
> On Monday, June 3, 2019 at 8:58:02 AM UTC+2, rāma wrote:
>>
>> I am using the latest version of NSSM - the Non-Sucking Service Manager;
>> both 2.24 and the prelease build 2.2.4-101 .
>>
>> Unfortunately for me,
:09 PM UTC-7, rāma wrote:
>>
>> Hi Nico,
>>
>> Thanks for your inputs.
>>
>> I've actually run windows py2.7 binary with modules within site-packages,
>> and pip can be leveraged by setting your target folder like this:
>>
>> pip install -
Dear web2py community,
I am sharing my docker container that has pandas, numpy and scikit-learn
preinstalled via docker running on nginx.
https://hub.docker.com/r/rnjv/conda-web2py
docker pull rnjv/conda-web2py
Best,
rāma
--
Resources:
- http://web2py.com
- http://web2py.com/book
Hi all,
How to sort a smartgrid with your own custom sorted id list?
Say I have a id list of the query and I have a sorting functions that
returns a sorted id list, how would I make smartgrid to commit to the
ordering instead of sorting by ids by default?
Thanks,
rama
--
Resources:
- http://
56 matches
Mail list logo