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.
think there is a web2py script for that session2trash.py
ref:
http://web2py.com/books/default/chapter/29/13/deployment-recipes#Cleaning-up-sessions
another alternative you can use shell or python subprocess then make a
scheduler for it (cron) or even with configuration management like ansible
bes
Yes, the online version of the book is a web2py application - and I've made
it Python 3 compatible with that PR.
But indeed the content of the book itself is still mainly Python2-oriented
any help is appreciated ;-)
Nico
Il giorno Lun 3 Dic 2018, 18:17 Marcelo Huerta
ha scritto:
> El sábad
Congrratulations and Thanks, Nico
ari / brazil
Em terça-feira, 4 de dezembro de 2018 05:51:53 UTC-3, Nico Zanferrari
escreveu:
>
> Yes, the online version of the book is a web2py application - and I've
> made it Python 3 compatible with that PR.
>
> But indeed the content of the book itself is
Hi,
I need to display a drop down list in my form but have no idea how to do
it. I have the following arrangements :
Model :
db.define_table('orders',
Field('comments' ,type='string'),
Field('print_size',requires=IS_IN_SET(['5x3.5', '6x4',
'6x4.5', '5x7', '5x7.5',
I was working on trying to figure out the EXACT same thing !
Thanks ..
*Ben Duncan*
DBA / Chief Software Architect
Mississippi State Supreme Court
Electronic Filing Division
On Tue, Dec 4, 2018 at 6:40 AM Arindam Dasgupta
wrote:
> Hi,
> I need to display a drop down list in my form but ha
I have done something like that. Let me retrieve it in 3hrs
On 4 Dec 2018 5:17 PM, "Ben Duncan" wrote:
I was working on trying to figure out the EXACT same thing !
Thanks ..
*Ben Duncan*
DBA / Chief Software Architect
Mississippi State Supreme Court
Electronic Filing Division
On Tue, Dec
@Arindam: Try the following code instead
def test():
form = FORM(LABEL("File(s):"), INPUT(_name='pic_upload', _type='file',
_multiple=''),
BR(), LABEL("Comments:"), INPUT(_name='comments'),
BR(), LABEL("Print Size:"), INPUT(_name='print_size'),
Here is a sample I did when I found some OLD web2py forums. I tested with a
dictionary then
with a "in" DB ..
In controller/default.py:
def company_login():
# Read the company file into a dictionary
company =
db(db.company).select(db.company.company_number,db.company.company_name,orderby=d
Hello,
We've recently updated web2py and now our applications utilizing the
scheduler are having errors.
We can see there are significant changes to scheduler.py - but not sure if
it's just a matter of adding fields to the our tables to bring it back up
and running.
Thanks for any advice!
Ja
@ sandeep.
Thanks a lot for your solution and it is working for me. But I am facing a
small problem : When I choose a option from the drop down list and later
change my mind and try to select a different value , I cannot do that
because after the first selection, it is not showing other values.Any
Hello,
The following line in a view which used to work in web2py 2.6.x no longer
works in 2.17.2. I expect it has something to do with moving pydal to it's
own package, but I'm not sure how to rectify the issue.
{{=db.error_invoice_line[fieldname].label}}
The error given is:
1.
2.
3.
4.
5.
6
What errors are you getting? Did you restart the scheduler after updating
web2py?
--
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 messa
You can do this way.
# Controller.py
Add id in your input field.
def test():
form = FORM(LABEL("File(s):"), INPUT(_name='pic_upload', _type='file',
_multiple=''),
BR(), LABEL("Comments:"), INPUT(_name='comments'),
BR(), LABEL("Print Size:"), INPUT(_name='pri
Just make your own is_numerical_type function
def is_numerical_type(ftype):
return ftype in ('integer','boolean','double','bigint') or ftype.
startswith('decimal')
And use that one.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web
In a recent release, a 'broadcast' field was added to the scheduler_task
table. I had to add it manually to get it to work.
I added it with type varchar(512) and then it started working again.
-Jim
On Tuesday, December 4, 2018 at 10:50:07 AM UTC-6, Jason Solack wrote:
>
> Hello,
>
> We've rece
Humm that should be a simple matter of running it with migrate=True.
--
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
I'm getting this on every request
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
Traceback (most recent call last):
File "/home/www-data/web2py/gluon/main.py", line 461, in wsgibase
session._try_store_in_db(request, response)
File "/home/www-data/web2py/gluon/globals
Yes, it should be, but I believe when I ran it the first time I had
fake_migrate = True.
On Tue, Dec 4, 2018 at 4:51 PM Leonel Câmara wrote:
> Humm that should be a simple matter of running it with migrate=True.
>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
The application should be running with migration disabled in production in
which case this won't happen.
--
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 use the sessions2trash.py script very successfully as an hourly task on
PythonAnywhere.
I copied the code from the web2py scripts folder to a scripts folder under
my app as I've modified the original code slightly to print totals of
trashed sessions. I use the "delete after 60 minutes" settin
I'm using update_or_insert
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#update_or_insert>
for a table that's keeping track of a certain type of request.
I'd like to keep track of how many times a particular row has been updated,
and I'm wondering if I can do that wi
On Tuesday, December 4, 2018 at 12:17:52 AM UTC-8, Gaël Princivalle wrote:
>
> 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!
On Tuesday, December 4, 2018 at 4:40:30 AM UTC-8, Arindam Dasgupta wrote:
>
> Hi,
> I need to display a drop down list in my form but have no idea how to do
> it. I have the following arrangements :
>
> Model :
>
> db.define_table('orders',
>
> Field('comments' ,
@ sandeep : your solution works for me but the problem is that I cammot
style the elements added later using general css rules like :
input[type=submit]{
background-color: #4CAF50;
border: none;
color: white;
padding: 16px 32px;
text-decoration: none;
margin: 4px 2px;
c
25 matches
Mail list logo