Hello all.
With a grid I use a custom single record view.
So in my view I have this test:
if request.args and request.args[-3] == 'view':
for displaying the custom single record view.
But when I click on the add record button I have this error:
list index out of range
Is there a way to use a
Problem solved!Everything is working fine now!
quarta-feira, 18 de Novembro de 2015 às 15:35:32 UTC, Carla Raquel escreveu:
>
> I'm having some troubles importing from csv files while using a Postgres
> connection, when a table has one or more references to other tables like so:
>
> db.define_tab
yes, thank you, that works great. you know i tried to see all of that in
the source code api, but i couldn't find the source code api anymore. lucas
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.
if len(request.args) >= 3 and request.args[-3] == 'view':
or:
if request.args(-3) == 'view':
request.args(index) is the same as request.args[index], except the former
returns None rather than raising an exception if the index is out of range.
Finally, you could just do:
if 'view' in request.a
I think that for the programmer is not so important the version..always if
the last is not too old..Python 2.7 is not too old but the problem that i
see is that there is a good guide and good forum..web2py have many good
features, but the real problem that I find( I am a web2py developer from 5
created and defined are different things. rephrasing: are you sure that the
DAL instance defines the master table before the call to the sub-table
definition happens ?
On Thursday, November 19, 2015 at 12:12:05 AM UTC+1, Maxwell Morais wrote:
>
> Thank you so much for the answer!
>
> Yes, I'm su
Hello,
I'm wondering if anyone is aware of a guide on creating a secure REST
service with web2py. I'd like to get help with creating authentication
tokens and handshaking and then creating a temporary key allowing people to
access the service for a set period of time.
Thank you for you help a
On Thursday, November 19, 2015 at 4:25:07 PM UTC-8, Jason Solack wrote:
>
> Hello,
>
> I'm wondering if anyone is aware of a guide on creating a secure REST
> service with web2py. I'd like to get help with creating authentication
> tokens and handshaking and then creating a temporary key allow
tested it. return an error if i put the value int = 1 as true in
appconfig.ini
e.g.
privates/appconfig.ini
[auth]
create_user_groups = 0 ; return an error traceback when value = 1, when
value = 0, no error occured, works as expected
models/db.py
auth.settings.create_user_groups = myconf.take('au
I just tried to reproduce your error and could not.
Judging from the error, are you sure you are passing in the string
'auth.create_user_groups' and not auth.create_user_groups as a variable?
On Thu, Nov 19, 2015 at 9:32 PM, 黄祥 wrote:
> tested it. return an error if i put the value int = 1 as
pardon, i just tried, what is discussed in this thread on my configuration,
parsing as string .'auth.create_user_groups' not auth.create_user_groups as
a variable
e.g.
models/db.py
auth.settings.create_user_groups = False
i want to change the configuration into privates/appconfig.ini with :
e.g.
Can you reproduce this error in a fresh welcome app?
Then you can send just the one line?
Is it solely:
; auth
[auth]
create_user_groups = 1
VS
; auth
[auth]
create_user_groups = 0
?
On Thu, Nov 19, 2015 at 10:44 PM, 黄祥 wrote:
> pardon, i just tried, what is discussed in this thread on m
Also:
auth.settings.create_user_groups = myconf.take('auth.create_user_groups',
cast=lambda value: bool(int(value)))
On Thu, Nov 19, 2015 at 10:53 PM, Mark Graves wrote:
> Can you reproduce this error in a fresh welcome app?
>
> Then you can send just the one line?
>
> Is it solely:
>
> ; aut
It appears that auth.settings.create_user_groups takes either False or the
string that formats the user group creation message.
So you'll need to provide a string format representation ie '%(id)s' as is
shown in the error.
However that won't convert to a boolean, so your cast function will fail.
Hello,
I developed an app accessible by different users. There is 4 groups of
users who can access to different views.
I would like to know how to allow the access to some views for only one
group.
Thanks
Clément.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- h
i am using this syntax
results =
json.load(urllib.urlopen("http://www.pricetree.com/dev/api.ashx?pricetreeId=11072&apikey=7770AD31-382F-4D32-8C36-3743C0271699";))
it is showing this error
HTTP Error 403: Forbidden
what should i do
pls reply to this qustion
--
Resources:
- http://web
Hi Anthony,
This solution you mention is, with some minor changes, still working in the
current version. I've managed to get the change working in the 2.12.3
version of web2py.js:
Change function trap_form to:
trap_form: function(action, target) {
/* traps any LOADed form */
I need some help with a DAL query. I'm trying to update records, but my
query contains joins.
*tournament Table*
| id | start | end |
*match Table*
| id | tournamentID | home_team | away_team | start | end |
db( ((db.tournament.start >= '2015-01-01 00:00:00') & (db.tournament.end <=
'2015-12-3
Thanks for the reply Kiran - I have gone through that section of the book a
couple of times and can't find an answer to what I want.
I should clarify: 'myc' is a generic token - a URL argument - I should have
written it as or .
The full path of the application is /default/company/myc, where 'd
Hi,
I try to import (compile) .less files in web2py.
I did find in the web2py book that you can import less files with
response.files
Did try to import a less file with that in the layout.html
{{response.files.append(URL('static','less/style.less'))}}
But in the source code from the finish page,
Thanks for there reply. I'm using 15 workers with a one second heartbeat.
I don't think this is fundamentally a load problem though - it looks like
a case of two things taking the same locks in a different order. Maybe the
situation mentioned here
http://www.postgresql.org/docs/9.4/static/ex
I have a table that I have created (in models) using
db.define_table('myTable',
Field('start', type='datetime', requires=NE)
)
I have some records in this table, in this format: '2015-12-31 00:00:00' (this
is on id = 1)
I want to run a query that will add one hou
Hello, Carlos.
Did you manage to make this working?
On Wednesday, October 15, 2014 at 4:51:43 AM UTC+2, Cláudio Bastos wrote:
>
> Hi,
>
> i'm struggling to make Web2py and Google Cloud Endpoints work together.
>
> When I change app.yaml to include :
>
>
> - url: /_ah/spi/.*
> script: my_api.app
I tried to connect web2py to my Oracle database.
I have deployed web2py on a windows environment where python was already
installed with cx_oracle.
But web2py haven't run with Oracle cause it can't see the driver cx_oracle
that is installed in Python directory.
I tried to redeploy cx_oracle to th
The problem is probably in the layout.html you are using. It may be
declaring an encoding other than utf8.
On Monday, 16 November 2015 18:46:58 UTC-6, Patrik Skřivánek wrote:
>
> Hello,
>
> I have in my controller simple input form:
>
> form=FORM('Search user: ', INPUT(_name='search'), INPUT(_typ
which reminds me... I will include it in the next web2py version.
On Thursday, 19 November 2015 19:08:46 UTC-6, Dave S wrote:
>
>
>
> On Thursday, November 19, 2015 at 4:25:07 PM UTC-8, Jason Solack wrote:
>>
>> Hello,
>>
>> I'm wondering if anyone is aware of a guide on creating a secure REST
>>
i think you can use conditional check auth.has_membership, either put it on
models/menu.py, controllers or even in views
e.g.
if auth.has_membership(role = 'Admin'):
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py
27 matches
Mail list logo