[web2py] check url agrs / vars after #

2020-06-28 Thread Ari Lion BR Sp
Hi, how to get / check url agrs / vars after # symbol. I want to re-wright url without reload and get thwe args/varss of it. I see it happends after # symbol. Regards -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code)

Re: [web2py] Check an empty upload field in database

2019-01-11 Thread Arindam Dasgupta
Hi, The syntax if form.vars.pic_upload: worked for me. I was not able to find the correct If statement. @ Steve : No I have not used the IS_NOT_EMPTY() validator. Thanks for the link I will go through it. Regards, Arindam On Fri, Jan 11, 2019 at 6:20 PM 黄祥 wrote: > had you try IS_NOT_EMPTY()

Re: [web2py] Check an empty upload field in database

2019-01-11 Thread 黄祥
had you try IS_NOT_EMPTY() validator? *ref:* http://web2py.com/books/default/chapter/29/07/forms-and-validators#Range-set-and-equality-validators best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - htt

Re: [web2py] Check an empty upload field in database

2019-01-11 Thread sandeep patel
You can use an if-else or try-except block for that Like this. def index(): form = SQLFORM(db.orders) if form.process().accepted: if form.vars.pic_upload: makeThumbnail(db.orders,form.vars.id,(175,175)) else: #do whatever you want else:

[web2py] Check an empty upload field in database

2019-01-11 Thread Arindam Dasgupta
Hi, I have a problem with checking whether the file upload field in the database is empty or not. In the code mentioned below, the user can either upload a file or submit the form without uploading a file. If the user uploads a file then the " makeThumbnail" function should be called. Otherwise it

[web2py] Check box access

2018-12-08 Thread pradeep chauhan
hi, i have a form with 3 check boxes ..i want to give access to authorized person ..only authorized person can check the box..how can i do that..any example? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code

[web2py] check boxes with is_in_set

2016-12-08 Thread R U
hi all, I understand this might be too much in the realm of "please write my code for me" with that in mind let me ask. Is it possible to use -- is_in_set -- to create a list of check boxes instead of a drop-down? what I am doing is: two types of users. both have access to the same list. user t

[web2py] Check to see if a field is in another table in a computed field

2016-02-10 Thread Greg White
Want a computed field to show whether or not a field value exists in another table started with this... db.define_table( 'inventory', Field('name'), Field('qty', label='Quantity'), Field('MatSize',label='Material Size'), format = '%(name)s') db.define_table( 'POrequest'

[web2py] Check is user is the owner of row (help with db query)

2014-09-08 Thread desta
We have the default USERS table, a PROJECTS table that references back to USERS, a JOBS table that references back to PROJECTS and a TASKS table that references back to JOBS. Essentially USERS <- PROJECTS <- JOBS <- TASKS Now the client is logged in, requests to delete tasks with ID=5. In the

[web2py] Check to delete glitch in 2.9.6 and 2.9.7

2014-09-05 Thread Ide
I have 2 applications which both seem to have a problem with the 'check to delete' option in 2.9.6 and 2.9.7. The 'check to delete' label on this tick box is now showing up as 'Check to deleteNone'. I don;t think it did this when I was using 2.9.5, although that was a few months ago now, so I ma

[web2py] Check file size before upload process

2014-01-26 Thread lesssugar
I'm using IS_LENGTH in my model to validate file size of uploaded image: IS_LENGTH(2097152, 1, error_message='Max image size: 2MB') However, the size is being checked after the file's been uploaded, which is not very user friendly when it comes to files larger than 2MB. How can I validate the f

[web2py] check if db field is empty

2014-01-22 Thread Yebach
Hello How do I check is database field is empty? eng_out = db(db.script.id == id_skripte).select(db.script.sc_engine_output) print "eng_out ",eng_out ## this returns ##eng_out script.sc_engine_output ## if eng_out is None: ## check for nullability print "field is Nul

Re: [web2py] check for record and proceed with index only scan

2014-01-22 Thread Anthony
If you want to get rid of the orderby, do: db(db.mytable.id == someid).select(db.mytable.id, limitby=(0, 1),orderby_on_limitby =False) When you specify a limitby, by default it will orderby the PK (or add the PK to the orderby). The reason for this is to ensure a consistent ordering if you rep

Re: [web2py] check for record and proceed with index only scan

2014-01-22 Thread Jayadevan M
Here is how it is now .. 1) cond = db.mytable(id=someid) generates SELECT FROM mytable WHERE (id = someid) LIMIT 1 OFFSET 0; 2) cond = db(db.mytable.id==someid).select(db.mytable.id,limitby=(0, 1)) generates SELECT FROM mytable WHERE (id = someid) ORDER BY pk LIMIT 1 OFFSET 0; What I woul

Re: [web2py] check for record and proceed with index only scan

2014-01-22 Thread Jayadevan M
Sorry. It works (I got something wrong earlier) but the limit has gone away. I just have to ensure that there is ay least one record. On Wed, Jan 22, 2014 at 5:28 PM, Jayadevan M wrote: > I tried that. I get the error - > 'Row' object has no attribute 'select' > By the way, the "=" works. Addi

Re: [web2py] check for record and proceed with index only scan

2014-01-22 Thread Jayadevan M
I tried that. I get the error - 'Row' object has no attribute 'select' By the way, the "=" works. Additional information, this function is under modules. Do I have to imprt something to make the select construct work? On Wed, Jan 22, 2014 at 5:22 PM, Johann Spies wrote: > Oops. That should be

Re: [web2py] check for record and proceed with index only scan

2014-01-22 Thread Johann Spies
Oops. That should be cond = db(db.mytable.id==someid).select(db.mytable.id) On 22 January 2014 13:50, Johann Spies wrote: > cond = db.mytable(id=someid).select(db.mytable.id) > > Regards > Johann > > > On 22 January 2014 10:50, Jayadevan M wrote: > >> I am checking for existence of record in a

Re: [web2py] check for record and proceed with index only scan

2014-01-22 Thread Johann Spies
cond = db.mytable(id=someid).select(db.mytable.id) Regards Johann On 22 January 2014 10:50, Jayadevan M wrote: > I am checking for existence of record in a table > > cond = db.mytable(id=someid) > if not cond : > do something > > This works fine. The query executed selects *all* columns and

[web2py] check for record and proceed with index only scan

2014-01-22 Thread Jayadevan M
I am checking for existence of record in a table cond = db.mytable(id=someid) if not cond : do something This works fine. The query executed selects *all* columns and adds LIMIT 1 OFFSET 0; The LIMIT and OFFSET are OK. Since I want to just check for existence of a record, how can I rewrite th

[web2py] Check it out: PURE AJAX file uploads :D

2013-04-24 Thread select
in your client side js code use the js file api (this is for one file, but multi file upload can be done too) $('#datafile-uploadfield').change(function() { var upload_element = $(this)[0]; var file = upload_element.files[0]; if (file) { var reader = new FileReader(); read

[web2py] Check if exist table (dal)

2013-04-16 Thread damufo
Hi, In my init class have a install() with create table. When creates second instance, fail. table already defined: mytable Version web2py™ Version 2.4.6-stable+timestamp.2013.04.06.17.37.38 Python Python 2.7.4: C:\Python27\python.exe (prefix: C:\Python27) How check is this exists this table?

[web2py] Check if a from's boolean is true or false from the controller

2012-12-03 Thread Daniele
Hey guys, I'm wondering if there's a way from the controller to know whether a form's boolean field (checkbox) is selected or not. I only want to add the info in the form to the database if the checkbox is selected, otherwise the controller should not process that form. Thanks! --

Re: [web2py] Check upload file size before actual file data uploading

2012-10-02 Thread Massimo Di Pierro
You can try this: In the upload form add def upload_page(): ... length_bytes = cache.ram('X-Progress-ID:test:length',None,0) uploaded_bytes = cache.ram('X-Progress-ID:test:uploaded',None,0) ... they are updated during the upload. Hope this helps. On Tuesday, 2 October 201

Re: [web2py] Check upload file size before actual file data uploading

2012-10-01 Thread Johann Spies
On 2 October 2012 04:20, Exeption wrote: > Hi, > > Already have asked > here, > but no reply. > > I will duplicate my question here: > > In my web2py controller I'm accessing file data like: > >

[web2py] Check upload file size before actual file data uploading

2012-10-01 Thread Exeption
Hi, Already have asked here, but no reply. I will duplicate my question here: In my web2py controller I'm accessing file data like: vfile = request.post_vars.video.file But how can I check

[web2py] Check for a value in a table

2012-09-18 Thread Hassan Alnatour
Dear ALL , How can a check if a value for a Field in a table , now in this i do this values = [] for i in db().select(db.table.ALL): values.append(i.Field) then i check like this : if i in values: . . Is there a better way to do this ?? Best Regards, --

[web2py] Check to delete:False

2012-03-29 Thread Annet
After upgrading from 1.99.2 to 1.99.7 the "check to delete" label has changed to "check to delete: False" Check to delete:False Is there a reason for this? Kind regards, Annet

Re: [web2py] Check out my new site! (also trouble with routes.py)

2012-03-27 Thread Johann Spies
On 27 March 2012 13:46, vtgorilla wrote: > I just launched it this morning: http://RosterBrain.com > > > it looks impressive but you have got no rugby, cricket and tennis there! :) Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Ps

[web2py] Check out my new site! (also trouble with routes.py)

2012-03-27 Thread vtgorilla
I just launched it this morning: http://RosterBrain.com I was having a lot of trouble getting routes.py to work with my form submits so I just stripped it for the time being. Is there anything wrong with the following syntax? routers = dict( BASE = dict( default_application = 'welcome

[web2py] Check if request method is post

2012-02-20 Thread Hassan Alnatour
Dear All , How can i check if the request method is post ?

[web2py] Check to establish whether or not a record exists

2011-10-10 Thread Chris Rowson
Hi list, I have a database table which looks like this: postcode_cache postcode (UNIQUE) lat lon nearest I want to test first whether or not a record exists for 'postcode' and if a record does exist, I want to check whether the 'nearest' field contains any data. I've tr

Re: [web2py] Check out my new web2py website

2011-08-01 Thread Bruno Rocha
are you using ninjaui? http://ninjaui.com/objects On Mon, Aug 1, 2011 at 9:06 AM, weheh wrote: > I want to keep this low profile for now because there is still much to > do. But if anyone is interested in trying my beta web2py website, > please go ahead. It's at http://beta.yakitome.com. Don't e

Re: [web2py] Check out my new web2py website

2011-08-01 Thread Furqan Rauf
looks neat :) On Mon, Aug 1, 2011 at 7:06 AM, weheh wrote: > I want to keep this low profile for now because there is still much to > do. But if anyone is interested in trying my beta web2py website, > please go ahead. It's at http://beta.yakitome.com. Don't expect it to > be super stable nor ha

[web2py] Check out my new web2py website

2011-08-01 Thread weheh
I want to keep this low profile for now because there is still much to do. But if anyone is interested in trying my beta web2py website, please go ahead. It's at http://beta.yakitome.com. Don't expect it to be super stable nor have all features available, but the basics are there. So far, it only h

[web2py] Check

2011-07-06 Thread beedge
Thanks for responses. Point about definition of objects in the python files accepted! Can I just check something here, as I may have the wrong end of the stick... My understanding was that the Apps are all completely independent (i.e. seperate authentication etc). However, I'm seeing an account

[web2py] check if len error in view

2011-05-13 Thread 黄祥
hi, i've just followed Post preview like you have in blogs. on http://www.web2pyslices.com/main/slices/take_slice/90 model: db.define_table('post', Field('body', 'text' ) ) controller: def index(): posts = db(db.post

[web2py] Check if file has unsaved changes before loading new page

2011-04-14 Thread Drise
In the past week, I have come to really love Web2Py and thank Massimo for his work. One thing I would find useful is when editing a file, and you have unsaved changes, you should be prompted to save or discard those changes before being able to browse to a new page.

[web2py] Check if a user has already rated

2011-04-11 Thread pbreit
I wasn't aware that validators could be used like that. Perhaps just query the db?

[web2py] Check if a user has already rated

2011-04-11 Thread Drise
Hello. I'm trying to get a view to check if a user has already rated something (ie, is in the hasrated database). I have this code {{if ratings.username.IS_NOT_IN_DB(auth.user):}} But when the database is empty I get a Nonetype error. Then, when I manually add myself to the database, I get ('str'

[web2py] 'check exists' option for reseting password

2011-04-11 Thread Brian Will
I'd rather my password reset form not check the db for the existence of the email and just blindly give an 'an email has been sent' message regardless of what email address is entered. In Auth.request_reset_password(), this should require simply making the second validator conditional upon an opti

[web2py] check if file in form

2011-03-02 Thread LightOfMooN
How can I check if there is file in the sent form? if request.vars.image: redirect(URL('structure',args=['it', 'works'])) doesn't work if request.vars.image.file rises an error, when no file sent

[web2py:37865] Re: Rails-scaffolding in web2py -check my slice

2009-12-26 Thread mdipierro
cool! On Dec 26, 9:12 am, Jon Romero wrote: > I know crud is good and admin panel is slick but sometimes I just need > to hack an add/edit/delete based on a table. So, I made this a > decorator :D > > http://www.web2pyslices.com/main/slices/take_slice/45 > > Hope you like it! > Enjoy! -- You re

[web2py:37856] Rails-scaffolding in web2py -check my slice

2009-12-26 Thread Jon Romero
I know crud is good and admin panel is slick but sometimes I just need to hack an add/edit/delete based on a table. So, I made this a decorator :D http://www.web2pyslices.com/main/slices/take_slice/45 Hope you like it! Enjoy! -- You received this message because you are subscribed to the Google