[web2py] Delete sessions

2018-12-04 Thread Gaël Princivalle
Hello. Is there a way to delete automatically the sessions? I mean the folders/files inside this folder: web2py/applications/my_app/sessions For example deleting the sessions oldest than 1 week. Thanks! -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.

[web2py] Delete space from users email in auth form

2018-11-22 Thread Константин Комков
Hello. I face a problem autosubstitution of email with space when users login on site using mobile devices. Can I delete all spaces before check email in auth form? Maybe It's work already in new version of web2py? I use now 2.16.1. -- Resources: - http://web2py.com - http://web2py.com/book (Do

Re: [web2py] Delete EXPORT button from SQLFORM.grid

2017-09-07 Thread Andrea Fae'
I need the same! Il giorno venerdì 5 maggio 2017 09:30:56 UTC+2, Yebach ha scritto: > > How can you also remove the text "Export" ?? > > If I set all classes to False the text stays, if I remove export classes > from signature it displays all > > On Wednesday, August 15, 2012 at 12:41:28 PM UTC+

Re: [web2py] Delete EXPORT button from SQLFORM.grid

2017-05-05 Thread Yebach
How can you also remove the text "Export" ?? If I set all classes to False the text stays, if I remove export classes from signature it displays all On Wednesday, August 15, 2012 at 12:41:28 PM UTC+2, Jan Rozhon wrote: > > Silly me didnt notice this option. Thx > > Dne středa, 15. srpna 2012 11

[web2py] delete record confirmation dialog

2017-04-18 Thread Andrea Fae'
How to change customized message in the confirmation dialog about delete a record using grid or smartgrid? (depending on the situation) Any examples? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.

[web2py] Delete confirmation popup

2017-03-27 Thread Winter Kryz
Hello Everybody, I hope someone can help me, I have a table full of records from a data base, each row has a delete button so what I want to do is to show a "Yes/No" Javascript popup to confirm the delete action. So far what I did is: *** controller *** def Person(): person = db(db.Person

[web2py] Delete a row from one table when two tables are joined

2017-02-22 Thread Mat Miles
I need to create a join to limit the rows to be deleted. Is it possible to delete a row from one table when a query joins two tables? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issu

[web2py] Delete confirmation

2016-08-27 Thread Winter Kryz
Hello everybody, I have a Datatable filled with registers from a database and for each row I have a 'delete' button, what I'm trying to do is display a modal (bootstrap) delete confirmation (yes/no) but I don't know how to pass the id of that particular register so I can delete from the databas

[web2py] delete on confirmation

2016-04-10 Thread rajjmatthur
I have a link where I delete the table entry. But I would like to have a confirmation like "are you sure you want to delete...?". I believe I need to use javascript. Any help from the group? How to get a confirmation window prior to delete? -- Resources: - http://web2py.com - http://web2

[web2py] delete and logout user

2015-11-24 Thread Alex Glaros
If a user deletes their account, my controller deletes their db.auth_user record but their login session is still active. If I try to auth.logout() then, I get integrity restraint error. If I log them out first, I don't automatically have their user_id to delete the records with. Is there a s

Re: [web2py] delete session value that store query as_list()

2015-05-04 Thread 黄祥
can not, it will deleted if the session list value is only 1, but if more than one you could sweep it all (delete it twice) with : e.g. def empty_checkout(session_return_detail, redirect_cart): for i, row in enumerate(session_return_detail): del session_return_detail[i] for i in xr

Re: [web2py] delete session value that store query as_list()

2015-05-04 Thread Johann Spies
On 1 May 2015 at 10:44, 黄祥 wrote: > > the problem is if i just use one all value that store in session detail is > not deleted all, always remain i=1, so that i must take two steps for that. > is it the correct way to handle it in web2py? > > I see Session() is as Storage object and with a stora

[web2py] delete session value that store query as_list()

2015-05-01 Thread 黄祥
hi, i store rows query in the session, and want to remove it, is it need two step for that? e.g. def purchase_return_form(): form = SQLFORM(db.purchase_return_header) if form.validate(): session.purchase_return_header = dict(form.vars) rows = db(db.purchase_order_detail.pu

[web2py] Delete a row at a given index from a Rows object

2014-09-13 Thread Gliese 581 g
I have fetched large number of rows from a database. I am fetching the rows from database and storing it in a session. Now when I delete a record for some reasons I do not want to get the entire data back but just delete the corresponding row from the Rows object. I have the index of deleted rec

Re: [web2py] Delete Query Not Working

2014-07-16 Thread dlypka
you might need to db.commit() after the delete(). versioning might be doing a commit() for you. On Tuesday, July 15, 2014 9:05:09 AM UTC-5, samurai wrote: > > No, I hadn''t. But it worked on turning it on. Thanks > But I don't get it. Record versioning just creates an archived db for the > modifi

Re: [web2py] Delete Query Not Working

2014-07-15 Thread Shubham Jain
No, I hadn''t. But it worked on turning it on. Thanks But I don't get it. Record versioning just creates an archived db for the modifications done. So how this feature being disabled is restricting me from deleting a record ?? *Shubham Jain* 3rd Year, Software Engg Delhi Technological University(F

Re: [web2py] Delete Query Not Working

2014-07-14 Thread lyn2py
Did you turn on versioning? Can you post a traceback? On Friday, July 11, 2014 3:21:14 PM UTC+8, samurai wrote: > > As both Manuele and Leonel said, I changed it to args(0). But no use. It > was still not working. > > I actually changed a bit and now I am getting 'd' by get.vars. > > def pro_del

Re: [web2py] Delete Query Not Working

2014-07-11 Thread samurai
As both Manuele and Leonel said, I changed it to args(0). But no use. It was still not working. I actually changed a bit and now I am getting 'd' by get.vars. def pro_del(): d = request.get_vars.d db(db.products.product_id == d).delete() session.flash = "Product Del

Re: [web2py] Delete Query Not Working

2014-07-09 Thread samurai
Thanks Manuele. Just writing (0) worked for me as my product_id is'nt an int type. Its alphanumeric. On Wednesday, July 9, 2014 4:32:55 PM UTC+5:30, Manuele wrote: Il 09/07/14 10:32, samurai ha scritto: > > def pro_del(): > > d = request.args > > db(db.products.product_id == d

Re: [web2py] Delete Query Not Working

2014-07-09 Thread Manuele Pesenti
Il 09/07/14 10:32, samurai ha scritto: > def pro_del(): > d = request.args > db(db.products.product_id == d).delete() > session.flash = "Product Deleted" > redirect(URL('default','index')) > #return locals() try this: def pro_del(): d = request.args(0) o

[web2py] Delete Query Not Working

2014-07-09 Thread samurai
This is the function for deleting a record from database. def pro_del(): d = request.args db(db.products.product_id == d).delete() session.flash = "Product Deleted" redirect(URL('default','index')) #return locals() The id is successfully getting passed to

[web2py] Delete in SQLFORM.grid does not update number of records

2014-04-05 Thread horridohobbyist
If I delete records in SQLFORM.grid, the number of records does not change. Only if I explicitly refresh the browser page does the number of records change. Have I found a bug? (I'm using web2py 2.9.4.) -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github

[web2py] delete stored image

2013-07-23 Thread nicormoreno
i am making a product app in web2py everything is working really well exept one thing. i upload the images like this: the_image = db.product_images.image.store(request.vars.image.file, request.vars.image.filename) img_id = db.product_images.insert(product_id=p_id , image=the_ima

[web2py] delete session strange behaviour

2013-02-14 Thread 黄祥
hi, i'm trying to delete session using del session, and found strange behaviour for example *#**views/default/order.html* {{for id, qty in order.items():}} {{p=db.product(id)}} {{=p.product_name}} Rp. {{=p.unit_price}} {{=qty}} {{=SPAN(A('+', callback=URL('order

[web2py] .delete()

2013-02-07 Thread Annet
If db(db.eventList.nodeID==id) is empty will db(db.eventList.nodeID==id).delete() result in an error? Best regards, Annet -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it,

[web2py] delete query translation

2013-01-14 Thread dederocks
Hello, How do you translate the following in dal? delete tableA from tableA where TableA.field1='x' join TableB on TableB.field2=TableA.field3 WHERE (TableB.field3 = y) ? if you do db((tableA.field1=='x') & (tableA.field3==TableB.field2) & (TableB.field3==y)).delete() it doesn't work -- too man

Re: [web2py] Delete a user

2013-01-08 Thread puercoespin
I think the right way is digitally signed urls. In the book: http://web2py.com/books/default/chapter/29/04?search=signature --

Re: [web2py] Delete a user

2013-01-07 Thread villas
You can do it, but also consider what should happen to referenced records - be aware of any cascading deletes. On Monday, January 7, 2013 10:00:48 PM UTC, Daniele wrote: > > Well, I know I can do this from the admin interface but I was wondering > how a user can remove himself from the websi

Re: [web2py] Delete a user

2013-01-07 Thread Daniele Pestilli
Well, I know I can do this from the admin interface but I was wondering how a user can remove himself from the website if he so wishes. Should I put the code `db(db.auth_user.email=="some...@domain.com").delete()` in a {{=A(_href=action)}} or is that bad practice? I want the user to be able to del

Re: [web2py] Delete a user

2013-01-07 Thread Bruno Rocha
If you have shell access. Go to your shell python web2py.py -S yourappname -M >>> db(db.auth_user.email=="some...@domain.com").delete() >>> db.commit() The user with "some...@domain.com" is now deleted! If you dont hace shell access, just go to your admi interface, database adminitration and

[web2py] Delete a user

2013-01-07 Thread Daniele
What's the correct way of deleting a user? Say someone creates an account on my page and wants to remove him/herself. How can I do this? Thank you! --

[web2py] delete uploads with SQLFORM.factory

2012-12-26 Thread Paolo
Hi all, it seems to me that SQLFORM.factory doesn't honor the uploadseparate option because I'am not able to delete the uploaded file with SQLFORM.factory form = SQLFORM.factory(db.club, db.cities, _class='well', formstyle='bootstrap', showid= False,

Re: [web2py] delete button + confirm instead of "check to delete" + confirm + submit

2012-11-13 Thread Richard Vézina
I improve it a bit by making sure the only form that get submit is the desired form : form.element(_id='delete_record__row')['_class']='hidden' # To hide the "check to delete boolean" form.add_button(T('Delete'), '#', _class='btn-small btn-danger') # Add delete button

Re: [web2py] delete button + confirm instead of "check to delete" + confirm + submit

2012-11-13 Thread Richard Vézina
Thanks for the idea Dereck Appreciate your help too Paolo! Richard On Tue, Nov 13, 2012 at 6:48 PM, Derek wrote: > I'd use a before_delete function to check if the checkbox 'yes im sure - > delete' was checked. if not checked, don't delete. don't enable the delete > button until that box is ch

Re: [web2py] delete button + confirm instead of "check to delete" + confirm + submit

2012-11-13 Thread Richard Vézina
# Basic idea from : https://mail.google.com/mail/?shva=1#search/delete+button/139d8ffdbb78d345 form.element(_id='delete_record__row')['_class']='hidden' form.add_button(T('Delete'), '#', _class='btn-small btn-danger') delete_confirmation = T('Are you sure you wan

Re: [web2py] delete button + confirm instead of "check to delete" + confirm + submit

2012-11-13 Thread Derek
I'd use a before_delete function to check if the checkbox 'yes im sure - delete' was checked. if not checked, don't delete. don't enable the delete button until that box is checked is another option On Tuesday, November 13, 2012 1:26:08 PM UTC-7, Richard wrote: > > Hello, > > I would like to rep

Re: [web2py] delete button + confirm instead of "check to delete" + confirm + submit

2012-11-13 Thread Richard Vézina
I thought about something similar... I could set the check to delete to hidden and revert back to unhidden just before submit. Richard On Tue, Nov 13, 2012 at 5:32 PM, Paolo Caruccio wrote: > Please try with: > > delChkbx = form.element('tr', _id='delete_record__row') > delChkbx['_styl

Re: [web2py] delete button + confirm instead of "check to delete" + confirm + submit

2012-11-13 Thread Paolo Caruccio
Please try with: delChkbx = form.element('tr', _id='delete_record__row') delChkbx['_style'] = "position:absolute;left:-9px;" In my previous solution please set deletable=False in the form declaration. Il giorno martedì 13 novembre 2012 23:11:48 UTC+1, Richard ha scritto: > > Hell

Re: [web2py] delete button + confirm instead of "check to delete" + confirm + submit

2012-11-13 Thread Richard Vézina
Hello Paolo, So far I have this: form.add_button(T('Delete'), '#', _class='btn-small btn-danger') delete_confirmation = T('Are you sure you want to delete this record?') form.element('input[value='+T('Delete')+']')['_onclick'] = "if (confirm('%s')) { jQuery('input[type=che

Re: [web2py] delete button + confirm instead of "check to delete" + confirm + submit

2012-11-13 Thread Paolo Caruccio
a possible solution # controller def update_record(): form = crud.update(db.table, request.args(0)) delete_confirmation = T('Are you sure you want to delete this record?') delBtn = A('Delete', _href=URL('delete_record', args=['table', request.arg

[web2py] delete button + confirm instead of "check to delete" + confirm + submit

2012-11-13 Thread Richard
Hello, I would like to replace the way web2py allow the deletion of a record. Instead of the check to delete then confirm then submit... I would add a delete buttton on which is attached a confirmation message onclick then when the confirmation is confirmed the record is deleted. Actually I ha

[web2py] delete on GAE

2012-10-17 Thread howesc
Hi all, I'm trying to clean up old expired sessions.but i waited a long time to get to this and now my GAE delete is just timing out. Reading the GAE docs, there appears to be some improvements that we can make to the query delete method on GAE that will make it faster and cheaper. what w

[web2py] delete posts

2012-10-10 Thread Massimo Di Pierro
I have seen some delete posts. We do not delete posts ever! We just block spam (nude girls and java job advertisements usually). I do not know why some posts have disappeared and listed as deleted. If you know something please share here. --

Re: [web2py] Delete EXPORT button from SQLFORM.grid

2012-08-15 Thread Jan Rozhon
Silly me didnt notice this option. Thx Dne středa, 15. srpna 2012 11:43:46 UTC+2 Johann Spies napsal(a): > > On 15 August 2012 11:31, Jan Rozhon >wrote: > >> >> >> did someone solve how to remove the export button from the SQLform.grid? >> > > Use the option: csv = False when you define the grid

Re: [web2py] Delete EXPORT button from SQLFORM.grid

2012-08-15 Thread Johann Spies
On 15 August 2012 11:31, Jan Rozhon wrote: > > > did someone solve how to remove the export button from the SQLform.grid? > Use the option: csv = False when you define the grid. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm

[web2py] Delete EXPORT button from SQLFORM.grid

2012-08-15 Thread Jan Rozhon
Hi all, did someone solve how to remove the export button from the SQLform.grid? Additionally, what is the proper way to display JSON string in the field? Thanks for any hints, Jan --

[web2py] delete row question

2012-05-25 Thread Roberto Perdomo
Hi, I have a single question, There is a way to run a feature automatically when you delete a record from a particular table?

[web2py] Delete plugin will also delete default theme

2011-10-06 Thread Omi Chiba
See attached screen shot. 1. Download layout plugin 2. Upload to your app 3. Click "delete plugin" 4. Now I'm naked like attached screen. <>

Re: [web2py] delete a SQLTABLE column

2011-08-03 Thread Richard Vézina
Don't know if my "delete column function" could be part of web2py core functions but here it is : def __del_sqltable_column(sqltable, column_name): """ For deleting a given column in an instance of web2py SQLTABLE class. Pass the SQLTABLE object and the column name to delete. Ex.:

Re: [web2py] delete a SQLTABLE column

2011-08-03 Thread Richard Vézina
Yes... I use pgAdmin for the other things, I didn't fix my choice on a commercial database manager... ;-) Richard On Wed, Aug 3, 2011 at 4:04 PM, Anthony wrote: > I think he wants to delete columns from a SQLTABLE, not a db table. > > On Wednesday, August 3, 2011 4:01:09 PM UTC-4, pbreit wrote

Re: [web2py] delete a SQLTABLE column

2011-08-03 Thread Anthony
I think he wants to delete columns from a SQLTABLE, not a db table. On Wednesday, August 3, 2011 4:01:09 PM UTC-4, pbreit wrote: > That's how I delete columns.

Re: [web2py] delete a SQLTABLE column

2011-08-03 Thread pbreit
That's how I delete columns.

Re: [web2py] delete a SQLTABLE column

2011-08-03 Thread Richard Vézina
Wrong thread I think! ;-) Richard On Tue, Aug 2, 2011 at 7:18 PM, pbreit wrote: > Navicat Lite or SQLite Manager for Firefox

Re: [web2py] delete a SQLTABLE column

2011-08-02 Thread pbreit
Navicat Lite or SQLite Manager for Firefox

Re: [web2py] delete a SQLTABLE column

2011-08-02 Thread Richard Vézina
Here I go ;-) rows = db().select(db.table1.ALL) table = SQLTABLE(rows) for i in range(0, len(table[1])): del(table[1][i][0]) del(table[0][0][0]) # Delete the header entry of the deleted column Richard On Tue, Aug 2, 2011 at 2:17 PM, Richard wrote: > Hello, > > If you have a easy way to del

[web2py] delete a SQLTABLE column

2011-08-02 Thread Richard
Hello, If you have a easy way to delete a entire SQLTABLE column before I find a way, I will take it. Thanks. Richard

Re: [web2py] Delete buttons not working

2011-07-31 Thread Bruno Rocha
Hi, you are probably talking about PowerGrid example app. I made delete buttons read-only, just to avoid loss of the data on examples. I am writing a better documentation and solving some reported issues, thank you for testing. I hope next week to release a better version, with support to more d

[web2py] delete buttons not working

2011-07-31 Thread peter
I now see that the delete buttons do not work in your live demos, and that this is maybe deliberate as you do not want people emptying the demo databases. So maybe this is not a bug, but the lack of documentation leaves me unclear. Thanks Peter

[web2py] Delete buttons not working

2011-07-31 Thread peter
Bruno Thanks a lot for this, it is a very useful tool just as I needed it. I am using the latest version of web2py, and python 2.5, so I had the same problems as Tomt had. I commented out the 'with open(path' etc. I am now finding that the delete buttons do not work on the examples on which they

[web2py] delete online user

2011-03-24 Thread Neveen Adel
Hello, Is there a way to when a user delete another online user , the deleted user logged out ? Thanks in Advance

[web2py] Delete error in SQLFORM with marked up labels

2010-07-04 Thread Bob_in_Comox
Using web2py version 1.79.2 In building a form using SQLFORM I use: form = SQLFORM(db.table, record, fields=myfields, labels=mylabels, col3=mycol3, deletable=True) where mylabels and mycol3 use XML() to wrap some HTML markup PROBLEM: Works fine, except when I try to delete a record I get: Fil

[web2py] delete row issue with postgre many to many relation table and Web2py

2010-07-01 Thread Lennon
In my application I have a form that removes the relationship between two data types without deleting each piece of data. To do this I run a delete on the many to many relation lookup table that stores the relationships. For each of the relationships removed I run this line in web2py: db(db.rela

[web2py] Delete record without triggering validators?

2010-05-11 Thread Iceberg
Hi Massimo, Right now validators are triggered even when a record is successfully being deleted. This can be annoying in case I am deleting old records as below: db.define_table('my_table', Field('today', 'date', requires=IS_DATE_IN_RANGE(minimum=request.now.date()), default =

[web2py] delete database entry by form

2010-04-19 Thread claudio
I have a newbie question: How can I create a form to delete selected entries from a database? Can I use SQLFORM for this? I have tables roughly like this in db.py db.define_table('person', Field('name')) db.define_table('posts', Field('title'), Field('author',db.person)) and in default.py a fun