I recently upgraded to 2.17.2 and now I noticed that some of my apps
functions don't work anymore.
in the past I used e.g.: STYLE(XML('body {color: white}'))
this caused an error: (Expected bytes)
after removing XML() you can use STYLE('body {color: white}')
but it gives the following output:
<
Python version 2.7.6
Op dinsdag 30 oktober 2018 20:28:53 UTC+1 schreef Dave S:
>
>
>
> On Tuesday, October 30, 2018 at 4:15:49 AM UTC-7, A3 wrote:
>>
>> I recently upgraded to 2.17.2 and now I noticed that some of my apps
>> functions don't work anymore.
&g
I am using sqlform.grid, with links that show details in a div when
clicked.
here are some fragments of the code:
def view_report():
qry.reportnr.represent = render_FIELD(qry.reportnr)
fields = (qry.id,qry.detail, qry.reportnr,)
grid = SQLFORM.grid(qr,fields =fields,
>
> I made following changes to make it work:
>
- When the fields rendered the first row is marked as topfield and stored
in session.topfield
- First time load or reload returns row.id = 0 and forces to row.id stored
in session.topfield
def view_report():
qry.reportnr.represent = rend
Using auth and auth.settings.expiration the login expires correctly, when
you refresh manually or click a button or menu it redirects to login.
My problem is that the page last shown before it expired remains visible.
There is no automatic redirecting just after the expiration time has
passed.
Thanks, I thought there was a standard solution.
I tried this:
add this scrip to layout:
var time = new Date().getTime();
$(document.body).bind("mousemove keypress", function(e) {
time = new Date().getTime();
});
function refresh() {
if(new Date().ge
Anthony your right, I was just looking in the wrong direction.
What about something like:
def index():
timeout = auth.settings.expiration
return dict( timeout=timeout)
or put the variable timeout in the layout directly to simplify.
And in the layout
var timeout = {{=timeout}};
Maybe you can use:
db.define_table(‘animal’,
Field('name', 'string', length=45),
Field(‘age’, ‘integer’),
Field(‘apt_time’,’datetime’)
and then subclass:
db.define_table(‘cat’, db.animal)
and
db.define_table(‘dog’, db.animal)
and then query on db.animal ?
--
Resources:
- http://web2
HTTP" part of the download
see below.
- I do not understand what happens after the raise HTTP.
Can anybody help me with this?
Thanks, A3
Here is a fragment of the code:
@auth.requires_login()
def view_report_simple():
qr = (db.reports.Customerid=="020030")
fie
After researching the forum and other locations I found the following
"solution":
the raise HTTP(200) seems to break the running submit code. As suggested
elsewhere the download should be invoked on another page. So first redirect
and than start the download.
I replaced:
selectable = [('Dow
Hi, I tried to use the Simple Wiki and found the following problem:
I uploaded an excel file in page media.
On the wiki page I used the link to the uploaded file: @3/testexcel.xls
When i look at the page i get an empty square.
I am using Chrome: when I inspect the element, is shows:
Mixed
Also tried to force insecure:
this shows me the HTML page in the box.
--
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 beca
Hi, I'm learning to use the auth.wiki and ran into the following problem:
I tried the minimal example in the code:
def index()
return auth.wiki()
I add a user
Created a wikipage with a tag: mytag
When I click the tag mytag or use the wiki menu search page it show me:
Please note I'am using p
> Please try it.
>
> On Wednesday, 19 August 2015 16:39:14 UTC-5, A3 wrote:
>>
>> Hi, I tried to use the Simple Wiki and found the following problem:
>> I uploaded an excel file in page media.
>> On the wiki page I used the link to the uploaded file:
>> @3/t
explained here:
https://groups.google.com/d/msg/web2py/asCPsD9UGb8/ksmYX0UjBx0J
Op dinsdag 22 september 2015 04:22:39 UTC+2 schreef Yebach:
>
> Ok thanx. This worked.
>
> One more question. My SQLFORM.grid is not refreshed after callback. So
> record stays there. HOw to do a grid refresh?
>
> 2
I tried to extend the auth.wiki using the extra option but I cannot get it
to work.
I set auth.wiki(resolve=False) in the models
and used the following controller:
def index():
checked = lambda text: '%s' % text + ' ✓'
return auth.wiki(render='markmin',extra=dict(checked=checked))
in a
I made a new application and only added the code to the index: and now it
works.
Then I tried to do the same in my earlier application.
Replaced index:
Replaced view/index
Replaced model/db
This had no effect.
Op donderdag 24 september 2015 16:18:22 UTC+2 schreef Leonel Câmara:
>
> Do you have
ewer is a google app and it does not share your
> credentials. It wants the doc to be public.
>
> On Wednesday, 23 September 2015 08:50:35 UTC-5, A3 wrote:
>>
>> Hi Massimo:
>> I tried it: browser is no longer complaining about mixed content but ..
>> the viewer is no
I want to be able to test if a certain function exists in a controller.
(I am loading a component with help of another)
controller:
default.py
def myfunction()
return
def mytest()
if exists(myfunction()):
do this.
--
Resources:
- http://web2py.com
- http://web2py.com/bo
ames.append(f.__name__)
> return f
>
> component = Component()
>
> Then you would decorate components:
>
> @component
> def component1():
> return dict()
>
> @component
> def component2():
> return dict()
>
> Finally, wherever needed, check for a
Currently I run Web2py using wsgi / Apache using virtualenv in the
wsgihandler.py
I also use a scheduler using web2py.py --nogui -K myap
Sofar I didn't pay attention to the virtualenv as I didn't have any
problems.
Probably because the python version in the virtualenv is equal to the
syste
Want to lookup a phone number in a db table
the value to lookup is e.g. caller = "+31123456789"
Phone numbers in db field can contain + - . and also () and is not very
consistent.
could look like: phonenumber = "+31-(0)123 456 789"
would like something:
db(db.table.phonenumber.like(caller)
You can edit the view: default/user.html
add some html code like you would do in a standard html doc
Op maandag 11 oktober 2021 om 20:49:45 UTC+2 schreef lucas:
> hello one and all,
>
> how can i add a simple message to the /user/register form? just plain
> text with a link in there als
Error: 'NoneType' object has no attribute
'__getitem__' <https://www.ursadina.nl/admin/default/errors/gtd1#>
The problem was that the field phonenumber could also be None.
Solution: in the table definition :set default to "" and update all
existing None values to "&qu
Thanks Jim,
Didn't realize that it will retrieve all. Actually the database is not so
big at the moment so I don't notice any performance problems.
Better try your suggestions before it has grown to big.
Cheers - A3
Op dinsdag 19 oktober 2021 om 16:50:13 UTC+2 schreef Jim S:
>
I updated my old server to the lastest web2pu and python3
Most things are working but I have some problems with the auth.wiki.
I can't edit my old pages. I get: Value already in database or empty
I made a new site with only the auth.wiki:
I can create a page but cannot update it. I get the sam
gt; Clemens
>
> On Monday, April 7, 2025 at 5:15:41 PM UTC+2 A3 wrote:
>
>> I updated my old server to the lastest web2pu and python3
>> Most things are working but I have some problems with the auth.wiki.
>>
>> I can't edit my old pages. I get: Value already in
27 matches
Mail list logo