I can't get the request.args from an index function.
E.g.: within app 'fruit' I have a controller 'salad', like so:
# web2py/applications/fruit/controllers/salad.py
def index()
print request.args
return dict()
# curl -X GET localhost/fruit/salad/foo
# web2py console output:
[]
How to g
How do I redirect to a different page on login?
Here's what I've tried: auth.settings.login_next = URL('profile')
Thanks for all suggestions,
Alec Taylor
--
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and
Thanks
On Mon, Feb 18, 2013 at 3:49 AM, Anthony wrote:
> By default, web2py looks for a view with the same name as the associated
> function in a folder with the same name as the associated controller. In the
> scaffolding app, auth actions are handled by the user() function in the
> default.py c
Thanks for the feedback Christian.
It seems to be this that causes the problem on GAE but works on sqlite:
students = cache.ram('students',
lambda:db(db.student.id>0).select(db.student.id,
db.student.family_name,
ok, I'll do it.
2013/2/18 Massimo Di Pierro
> Bring it up with Mariano, author of fpdf. ;-)
>
>
> On Sunday, 17 February 2013 14:37:03 UTC-6, mweissen wrote:
>
>> I have tried it now. These are my results:
>>
>> (1) A text like
>>
>> English: Hello World
>> Greek: Γειά σ
is there any way that i log in user by code?
for example after checking username and password with login_bare, i push
the user into the session as logged in user? in this case there is no need
to write ajax/login directly, and the programmer has a better control.
if i write :
def login():
--
thank you, i solve the problem like this:
def index():
form = auth.login()
form.elements('input',_type='submit')[0]['_Onclick']='login();return
false;'
return dict(form=form)
def login():
if not auth.login_bare(request.vars.email,request.vars.password):
return 'login fail
Should we offer something like {{=auth.ajax_login()}} helper which submits
to /user/login? If would not be difficult to write.
How should it work?
On Sunday, 17 February 2013 21:37:59 UTC-6, Anthony wrote:
>
> def login():
>
> form=auth.login()
>> if form.accepts(request,session=None)
>
> def login():
form=auth.login()
> if form.accepts(request,session=None):
>
auth.login() already handles form processing, so you should not call
form.accepts(), as that will not work.
>
>
>
> Email
>
> Password
> placeholder="*">
>
Thanks I'll explore this route.
On Sun, Feb 17, 2013 at 7:14 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> Yes I assumed both apps are written in web2py. Yet the protocol it uses is
> CAS 2.0 therefore that works even if application A is not written in web2py
> as long as it suport
Yes I assumed both apps are written in web2py. Yet the protocol it uses is
CAS 2.0 therefore that works even if application A is not written in web2py
as long as it suports CAS 2.0.
Another possibility is, if application A runs under apache, to use the
server access control to delegate authenti
Hi Massimo,
I'm going to explore this option more. Just a quick question though. It
seems like both application A and B need to be web2py. Is that true?
Application A isn't a web2py application.
Also I learned more about the client's criteria -- they mostly just want a
form on application A's
I have a web2py application and was curious how to go to the public
website, enter username/password in a form (or iframe) and if
authentication is successful, it would load the application into the
browswer window. Right now you click a login button and it redirects to
web2py's login form. I
Perhaps this can help?
http://code.google.com/p/modwsgi/wiki/ConfigurationDirectives
Anyway you can mimic it with web2py. In a model add:
if not session.authorized:
if request.post_vars.password == '123456': session.authorized = True
else: raise
HTTP(200,HTML(BODY(FORM('Password:',INPU
already up again, right now
--
---
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, send an email
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.goo
It was unreachable at some point but I think it was a network issue. I
could not ssh either and not is back without me taking any action.
On Sunday, 17 February 2013 16:20:24 UTC-6, Michele Comitini wrote:
>
> its down
>
> http://www.websitedown.info/web2py.com
>
> 2013/2/17 wwwgong >:
> > c
Bring it up with Mariano, author of fpdf. ;-)
On Sunday, 17 February 2013 14:37:03 UTC-6, mweissen wrote:
>
> I have tried it now. These are my results:
>
> (1) A text like
>
> English: Hello World
> Greek: Γειά σου κόσμος
> Polish: Witaj świecie
>
Hello Amber,
You do not need to reinvent the wheel for this. Web2py can do it out of the
box.
Application B. No special code. Just any web2py application that uses Auth
and exposes the normal default/user action.
Application A. Use decorators like @auth.requires_login() as normal but
change
its down
http://www.websitedown.info/web2py.com
2013/2/17 wwwgong :
> cannot access web2py.com today, any clue?
>
> --
>
> ---
> 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, s
cannot access web2py.com today, any clue?
--
---
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, send an email
to web2py+unsubscr...@googlegroups.com.
For more options, visit http
I have tried it now. These are my results:
(1) A text like
English: Hello World
Greek: Γειά σου κόσμος
Polish: Witaj świecie
Portuguese: Olá mundo
Russian: Здравствуй, Мир
Vietnamese: Xin chào thế giới
Arabic: مرح
login form is modal form inside index, and send login form via ajax to
login() function, but i can not login.
def login():
form=auth.login()
if form.accepts(request,session=None):
return 'logged'
else: return 'failed'
below section is in index page view:
I understand it is a primitive system, but also a quick way to put a
website behind a login. I do not want to integrate an authentication
system, because it is only for some betatesters before the website goes
live.
On Sunday, February 17, 2013 4:25:16 PM UTC+1, Massimo Di Pierro wrote:
>
> Why
don't know how to reply "properly" the scheduler in "stable" has some
column names that are incompatible with check_reserved=['all'].
If you have a db connection with check_reserved=['all'] there's no way to
have a working scheduler in your app.
The solution is either rely on the stable sch
Currently I have an application (A) that redirects the user to a web2py
application (B) to log in. I want to change it so that the application A
instead calls B with a username/password and gets back dict(user:user)
where user is the result of auth.login_bare(username,password). I have
made a
nice find! note that once you have more than about 1000 rows in a table
you'll need to have pagination turned on in smartgrid, else the request
will time out.
On Friday, February 15, 2013 3:15:55 PM UTC-8, Luca wrote:
>
> Found:
>
> q = db.table
>
> seems to work. Aha! --Luca
>
> On Friday, F
Hi Massimo and Dana,
What I missed to notice is to have a __init__.py inside my application's
folder.
after putting it in, import started working fine.
Thanks for timely help.
Regards,
Srinath
http://about.me/srinathgs
http://about.me/srinathgs
I write code @ Alamut
Srinath G S
On Sat, Feb
Andy,
what is the object that you are trying to store in memcache? this:
PicklingError: Can't pickle : attribute lookup
__builtin__.function failed
implies to me that you are trying to store an object that contains a
function (which is not pickleable).
i can't remember the exact differences,
I just upgraded to the latest pfdf version (had to make a change for
compatibility). Please check it.
On Sunday, 17 February 2013 11:13:46 UTC-6, mweissen wrote:
>
> I want to use the utf-8 character set together with pyfpdf.
> On https://code.google.com/p/pyfpdf/wiki/Unicode there is pyfpdf vers
I want to use the utf-8 character set together with pyfpdf.
On https://code.google.com/p/pyfpdf/wiki/Unicode there is pyfpdf version
1.7, which supports utf-8.
But in web2py (2.3.2) in gluon\contrib\pyfpdf fpdf.py is version 1.54b
Is there any reason not to use pyfpdf 1.7 in web2py?
Regards, Mar
Thanks to all - regards, Martin.
2013/2/17 Mark
> I think this can be done in "edit" page of each record. If a record is not
> editable based on some conditions, redirect it to another page.
>
> # In edit page of each record
> if len(request.args) > 2 and request.args[-3] == 'edit':
> recor
By default, web2py looks for a view with the same name as the associated
function in a folder with the same name as the associated controller. In
the scaffolding app, auth actions are handled by the user() function in the
default.py controller, so it will automatically use the
/views/default/us
The controller and function map to a view file so controller default and
function user have used up those 2 levels of default view file definition.
You could set response.view = "path to html" in the user function of the
default controller depending on arg(0) being login or register.
Ron
On S
I am trying to replace these views with custom ones I've created.
So I have a folder called "user" with a "login.html" and a "register.html".
Putting this "user" folder in web2py//views does not make the
system use these views. Moving them to the
web2py//views/default folder also has no affect.
Why do you want to use htaccess instead of web2py own authentication.
htaccess is such a primitive system.
On Sunday, 17 February 2013 06:26:09 UTC-6, Chr_M wrote:
>
> I come from a PHP background and when I wanted to have a website (or a
> part) behind a login screen (for example for beta tes
I think this can be done in "edit" page of each record. If a record is not
editable based on some conditions, redirect it to another page.
# In edit page of each record
if len(request.args) > 2 and request.args[-3] == 'edit':
record = db[request.args[-2]](request.args[-1])
if record_not_e
On Saturday, February 2, 2013 3:56:42 PM UTC+2, Niphlod wrote:
>
> if your db is istantiated with check_reserved=['all'] then you need to
> fetch the gluon/scheduler.py from trunk and use that, because in 2.3.2
> stable the column names of the scheduler's table are not compatible.
>
What is the
Thanks Massimo,
I think what happened was I coded this up without the integer tag on count,
then realised I needed it, and added it. The first commit occurred with the
integer tag , so as far as I could see it was always an integer.
Recreating the table fixed it
Neil
On Saturday, February 16,
a, it's work, thank you so much rif
--
---
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, send an email
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://gr
(1) Hard to help without some code.
(2) Does the problem occur without the jQuery Mobile plugin?
On Sunday, February 17, 2013 5:23:55 AM UTC-5, Ramos wrote:
>
> can i get some help on this?
> thk u
>
> 2013/2/14 António Ramos >
>
>> Hello i have an app that with web2py 2.0.9 after pressing login b
I come from a PHP background and when I wanted to have a website (or a
part) behind a login screen (for example for beta testing) I could do that
with a htaccess and htpasswd file (with Apache2). I have deployed a web2py
website with Apache2, but I can not figure out how to have this website
be
>
> TLTR: a private company not affiliated with python.org is trying to claim
> copyright of the name Python in Europe for all software.
>
I found this article with more info, although I'm not sure if it's a good
source:
http://www.guardian.co.uk/technology/2013/feb/15/python-trademark-bid
--
can i get some help on this?
thk u
2013/2/14 António Ramos
> Hello i have an app that with web2py 2.0.9 after pressing login button i
> am redirected to the index page.
> I tested my app with web2py 2.3.2 and the redirection is not done.
>
> I have after pressing login button to change the url a
try this:
{{='auth' in globals() and auth.navbar(mode="dropdown") or ''}}
you can also remove the mode="dropdown" parameter.
-rif
duminică, 17 februarie 2013, 07:24:11 UTC+2, 黄祥 a scris:
>
> hi,
>
> i've create the custom layout using
> http://www.cssportal.com/layout-generator/ and also the m
44 matches
Mail list logo