if I can use expand_one to do so, I don't know how... please help
On Monday, 17 February 2014 07:39:42 UTC, sasogeek wrote:
>
> is there a function like expand_one that allows you to display (.txt .docx
> .pptx .pdf) files?
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documenta
if I can use expand_one to do so, I don't know how... please help
On Monday, 17 February 2014 07:39:42 UTC, sasogeek wrote:
>
> is there a function like expand_one that allows you to display (.txt .docx
> .pptx .pdf) files?
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documenta
is there a function like expand_one that allows you to display (.txt .docx
.pptx .pdf) files?
--
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 receive
Anthony's example is great. Anyway, I would recommend replacing this:
def index():
return dict(grid=SQLFORM.grid(db.person, user_signature=False))
with this:
@auth.requires_login()
def index():
return dict(grid=SQLFORM.smartgrid(db.person))
user_signature=False will expose all data to u
Hi Massimo, there is one more thing, it seems that the redirect problem is
not only with my login function. Every function where I use a redirect call
from my controller results in a error page with a log as 303 error.
File "/srv/trustvouch-fe/applications/app/controllers/default.py", line
480,
Goodmorning,
i:m trying to fill a table record by code. All the basic test went good,but now
i'm trying to fill a table that has a field wich is a foreign key of another.
luca
field ('name', db.person)
whrn i try to fill i catch an error .
. in which way i can compose my instruction
for do it?
t
Sorry Massimo, I commented both the requires_login() and
requires_permission() for both dashboard() and my index() functions, still
the error is same.
2014-02-17 06:12:42,411 - ERROR - app - Traceback (most recent call last):
File "/srv/trustvouch-fe/applications/app/controllers/default.py",
Hi,
To makes things easier I have resolved to use db.executesql() it gives a
bit more flexibility were dal object model maybe a bit complex.
Thanx for your help thus far!
On 14 Feb 2014 21:10, "Teddy Nyambe" wrote:
> Apologies if I was not clear, when you do a cross join as in the example
> you
I have an index.html page that loads two elements:
1) A select list, id='account_select'
2) A component (open_positions.load)
In the component (open_positions.load), I have a
I think I will just create postgre roles per app and worry less about this.
On Monday, 17 February 2014 08:20:05 UTC+11, Tim Richardson wrote:
>
> postgres has peer authentication.
> If I have mapped OS user www-data to a postgres role, and if apache runs
> as www-data, can I use peer authentic
Note, instead of this method, you can now use gluon.current.
Anthony
On Sunday, February 16, 2014 6:32:13 PM UTC-5, Julio F. Schwarzbeck wrote:
>
>
>
>
> I assume that if you will use modules they'll probably be implemented in
> some kind of class, I'd personally do something similar to this..
I assume that if you will use modules they'll probably be implemented in
some kind of class, I'd personally do something similar to this..
# mymodule.py
class ModuleHelper(object):
""" Sample Helper for common methods.
"""
def __init__(self, environment):
self.request =
http://web2py.com/books/default/chapter/29/04/the-core#Accessing-the-API-from-Python-modules
On Sunday, February 16, 2014 4:55:06 PM UTC-5, aapaap wrote:
>
> hello,
>
> how to get globals like "request" available in my own modules ?
>
> thanks,
> Stef
>
--
Resources:
- http://web2py.com
- ht
inside the user() action in controllers/default.py you can add:
if request.vars.state:
auth_provider =
cgi.parse_qs(request.vars.state)['auth_provider'][0]
then you can do what you need with auth_provider
2014-02-16 12:13 GMT+01:00 ssuresh :
> I am using google oauth login as expl
hello,
how to get globals like "request" available in my own modules ?
thanks,
Stef
--
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 me
found something that seems to work (after some modifications)
#http://chase-seibert.github.io/blog/2011/01/21/youtube-detecting-x-frame-optionsframebreaking-in-python.htm
def Is_Framing_Allowed ( URL ) :
import urllib2
req = urllib2.Request ( URL )
##req.add_header ( "Referer", "http:
Anthony that is really good, very impressive and just what I want! From
memory that so far actually seems to be both simpler and better than what
MS Access would offer.
A lot of people and companies could make good use of web2py as a database,
Especially small businesses and charities etc. I ne
postgres has peer authentication.
If I have mapped OS user www-data to a postgres role, and if apache runs as
www-data, can I use peer authentication in web2py and therefore not code a
password in?
It seems that the connection string is parsed for user and password.
The main reason I want to av
Hi everyone...
Linked tables like...
db.define_table('calls',
Field('business', 'string'),
...
and
db.define_table('leads',
Field('business', 'reference calls'),
...
with controller containing
def calls():
form = SQLFORM(db.calls)
if form.process().accepted:
re
PEP8 has limitations.
"field is True" would never work because the "is" operator cannot be
overloaded. Only the "==" can be overloaded.
Massimo
On Sunday, 16 February 2014 12:41:48 UTC-6, Julio F. Schwarzbeck wrote:
>
> Folks,
>
> take a look at this piece of code:
>
> topics = db((db.topic.
I have the following in my model:
Field('date', 'date', default=datetime.date.today(), requires = IS_DATE(
format=('%B %-d, %Y')), writable=False,readable=False),
...and in the appadmin database entry form the date displays in the format
I've chosen. However when db.mytable.date is called in
So with other helpers I can do things like P(db.table.field,
_class="text-centered") to center the text in a paragraph tag generated by
the P helper.
Is there any way to do the same with the MARKMIN helper? I
have {{=MARKMIN(post.caption)}} set for a photo blog app so I can easily
style my pho
Folks,
take a look at this piece of code:
topics = db((db.topic.id == topic_id) & (db.topic.active == True)).select()
PEP8 is breaknig with the following error:
default.py:xxx:yy: E712 comparison to True should be 'if cond is True:'
or 'if cond:'
And of course changing (db.topic.active ==
Thanks!!!
On Sat, Feb 15, 2014 at 1:10 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> python web2py.py -S welcome -M -R tito.py -A param1 param2
>
>
> On Friday, 14 February 2014 16:35:15 UTC-6, Tito Garrido wrote:
>>
>> Hi Folks,
>>
>> Just a simple test... an external script:
>>
In the latest version of web2py, this solution no longer works. There's no
"web2py-menu-active" class. Is it now standard policy for web2py apps not
to have menu selections highlighted?
Thanks.
On Monday, 17 October 2011 15:00:38 UTC-4, Paolo Caruccio wrote:
>
> If you're using respone.menu to
I am open to change this. Do you want to attempt a patch to address some of
the issues?
Massimo
On Sunday, 16 February 2014 05:39:31 UTC-6, Alexei Vinidiktov wrote:
>
> The first issue is that the client app that uses a cas provider only
> provides one option: to log in - in the top navigatio
I'm having the same issue with rss in my InstantPress powered blog. I think
it has the same roots.
I also replaced the saxutils.py file with the patched one and nothing
changed.
On Tuesday, June 4, 2013 1:53:03 PM UTC+7, Loïc wrote:
>
> Hello all,
> Am I the only one having issues with generic
I downloaded the latest web2py and I get intermittent ability to edit
files. I am using a Raspberry Pi model B. I tried editing today and no can
do. I can view the file but can not edit it. I tried Firefox, Google Chrome
and IE but am not able to edit. Seems if I reboot my RPI and reconnect to
I had the same problem of uploading image in SQLFORM.factory as in
https://groups.google.com/forum/#!searchin/web2py/manual$20upload$20sqlform/web2py/Cw5ggpU6CIc/kS6fiRK8l7wJ
mdipierro showed number of ways to solve it and his last solution worked
for me. But now if I delete the record from the d
On Sunday, February 16, 2014 11:07:21 AM UTC-5, André Kablu wrote:
>
> Or you could automatically check for auth.user_id right after the
> validation.
>
The problem is the auth.login() function does a redirect after failed
login, so there's no opportunity to do anything after the auth.login()
f
Thanks Niphlod. Deleting the database fixed it.
I had encountered a few similar errors in the past where deleting the
database fixed it. However, this is the first one I've come across where
the app would still partially work and not fail immediately at startup.
Sounds like SQLite may not eve
Or you could automatically check for auth.user_id right after the
validation.
Em domingo, 16 de fevereiro de 2014 12h39min40s UTC-3, Anthony escreveu:
>
> I suppose you could do:
>
> if response.flash == auth.messages.invalid_login:
>
> Otherwise, you can create an auth.settings.login_onfail ca
I suppose you could do:
if response.flash == auth.messages.invalid_login:
Otherwise, you can create an auth.settings.login_onfail callback, which can
then set a flag in the session indicating login has failed (or redirect
somewhere).
Anthony
On Sunday, February 16, 2014 10:26:45 AM UTC-5, des
Here is what I have:
I have a legacy db in mysql named cep, so I'd created two dbs in my
application, one for the app and one for this legacy table:
db = DAL('sqlite://storage.sqlite', pool_size=1, check_reserved=['all'])
db_endereco = DAL('mysql://user:pass@localhost/cep')
db_endereco.define_
Perfect! I will give it a try!
Thanks!
On Saturday, February 15, 2014 9:23:39 PM UTC+2, Anthony wrote:
>
> No, you do not have to modify the framework. You can put your custom
> function wherever you want (within your own code) -- you can put it in a
> module and import it, or just define in a
Hey Anthony thanks for the reply.
Yes I am using the auth.login() using a custom form. I am not using the
flash message so if the user enters the wrong password the page just
reloads without any indication of the login failure. Isn't there another
way to find out if the login failed, so I can n
Oops. alright, thanks a lot.
On Sunday, February 16, 2014 4:58:06 PM UTC+2, Anthony wrote:
>
> You didn't update your controller code -- request.args(0) should now be
> request.vars.code.
>
> On Sunday, February 16, 2014 9:46:47 AM UTC-5, Avi A wrote:
>>
>> I mean that it displays the "searching.
You didn't update your controller code -- request.args(0) should now be
request.vars.code.
On Sunday, February 16, 2014 9:46:47 AM UTC-5, Avi A wrote:
>
> I mean that it displays the "searching" (the "else" part) and the
> query doesn't find it:
>
> org_code_name = db(db.t_orgs.f_org_code ==
I mean that it displays the "searching" (the "else" part) and the query
doesn't find it:
org_code_name = db(db.t_orgs.f_org_code ==
request.args(0)).select(db.t_orgs.ALL)
if org_code_name:
...
else:
return 'searching..'
if the password is just "123"
Sorry, should be encodeURIComponent. What do you mean it doesn't find it?
On Sunday, February 16, 2014 8:52:06 AM UTC-5, Avi A wrote:
>
> This almost works (no error):
> encodeURIComponent (without the "d").
> But it doesn't find it
>
> On Sunday, February 16, 2014 3:48:22 PM UTC+2, Avi A wrot
tried to simplyfied test the query in the shell but got no result (no error
occured).
e.g.
In [4] : sum = db.purchase_detail.quantity.sum()
print db().select(sum).first()[sum]
In [5] : for row in db(db.product).select():
print row.name
product0
product1
product2
In [6] : for row in db(db.purchas
This almost works (no error):
encodeURIComponent (without the "d").
But it doesn't find it
On Sunday, February 16, 2014 3:48:22 PM UTC+2, Avi A wrote:
>
> "ReferenceError: encodedURIComponent is not defined"
>
> How do I define it? Do I have to import something?
> Thanks.
>
>
>
>
> On Sunday,
"ReferenceError: encodedURIComponent is not defined"
How do I define it? Do I have to import something?
Thanks.
On Sunday, February 16, 2014 3:05:04 PM UTC+2, Avi A wrote:
>
> great, thanks .
>
> On Sunday, February 16, 2014 3:03:40 PM UTC+2, Niphlod wrote:
>>
>> and what you expected ? :-P
>>
did you alter the field definition ? SQLite has a big issue when dealing
with columns whose type is altered. as a proof of concept, try deleting
your database and let web2py recreate it, you shouldn't incur again in any
problem.
On Sunday, February 16, 2014 6:06:25 AM UTC+1, A36_Marty wrote:
>
great, thanks .
On Sunday, February 16, 2014 3:03:40 PM UTC+2, Niphlod wrote:
>
> and what you expected ? :-P
> you built your function to post to an url like
>
> /base_url/
> whatever_is_inserted_in_the_form_without_encoding_or_sanitization
>
> Not every url is a valid one (try opening /base_url
and what you expected ? :-P
you built your function to post to an url like
/base_url/whatever_is_inserted_in_the_form_without_encoding_or_sanitization
Not every url is a valid one (try opening /base_url/ì^'0=")and its
generally NOT safe doing what you're doing.
User input in web applicatio
You are passing the password as a URL arg, and in web2py, URL args cannot
include special characters. Instead, pass it as a query string variable:
$.web2py.component(url + '?code=' + encodedURIComponent(org_code),
'org_form_target');
Anthony
On Sunday, February 16, 2014 7:36:17 AM UTC-5, Avi A
All I see is:invalid request
rendered on the #org_form_target
#model
db.define_table('t_orgs',
Field('f_org_name', type='string',
label=T('Organization Name')),
Field('f_org_code', type='password',
label=T('Organization pasword')),
Field('org_api_key', length=64, typ
What do you mean the form won't be accepted? Is it failing validation on
the server when form.process() is called? Do you have an IS_STRONG
validator defined? What is happening with the Ajax call in the browser?
Please show some more code an explain exactly what is happening.
On Sunday, Februar
Filed a bug report
https://code.google.com/p/web2py/issues/detail?id=1875&thanks=1875&ts=1392551348
On Sun, Feb 16, 2014 at 7:49 AM, Alexei Vinidiktov <
alexei.vinidik...@gmail.com> wrote:
> I think I've come across a bug, and a nasty one too.
>
> I'm trying to make my apps work with cas authent
The first issue is that the client app that uses a cas provider only
provides one option: to log in - in the top navigation bar. I think some
users would be at a loss as to how to register since there is no explicit
link.
The second and third issues are with the cas provider login page. After the
I am using google oauth login as explained
here https://groups.google.com/forum/#!msg/web2py/fjpbFxRAGJM/pxvoBJKk2UkJ..
I am trying to use the "state" parameter to pass some additional values to
google. As I understand we should get the values back in the response from
google. My authentication
Hi,
I created a table with a password field.
I got an ajax (web2py component) form where a user fill the password, and
if it's OK, it does something.
It works fine, but the problem is that if I use for example "!" in the
password field , the form won't be accepted.
Is there a solution for that?
Sorry I mean here:
@auth.requires_login()
@auth.requires_permission(request.function)
def dashboard():
you should NOT have both. Perhaps this was causing the problem?
On Saturday, 15 February 2014 09:15:18 UTC-6, ajith c t wrote:
>
> Hi Massimo,
>
> Thanks for the reply, but sorry to s
54 matches
Mail list logo