[web2py] sidebars still used in 2.17.2?

2018-10-29 Thread Alex Glaros
okay, guess I'll this use BS4 to create web page columns - 
https://getbootstrap.com/docs/4.0/layout/grid/

 



  



  One of three columns





  One of three columns





  One of three columns



  



-- 
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 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.google.com/d/optout.


[web2py] sidebars still used in 2.17.2?

2018-10-29 Thread Alex Glaros
Also, where is this linked from?  
It’s in the welcome site: 
\web2py\applications\examples\views\default\support.htm

-- 
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 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.google.com/d/optout.


Re: [web2py] Re: DAL and DB VIEWS

2018-10-29 Thread Ben Duncan
Ok, found the answer ...
https://groups.google.com/forum/#!topic/web2py/DCsnCkQnIoA

On Mon, Oct 29, 2018 at 12:27 PM Ben Duncan  wrote:

> I'm thinking it should be no different than defining a table, since these
> are all external / predefined tables.
> The difference is that Postgres handles the sql and I'm guessing with DAL,
> it's just data returned.
>
> Ben Duncan
>
> On Mon, Oct 29, 2018 at 12:14 PM 黄祥  wrote:
>
>> had you try DAL's execute sql ?
>> ref:
>>
>> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#executesql
>>
>> best regards,
>> stifan
>>
>> --
>> 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 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.google.com/d/optout.
>>
>

-- 
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 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.google.com/d/optout.


Re: [web2py] Re: DAL and DB VIEWS

2018-10-29 Thread Ben Duncan
I'm thinking it should be no different than defining a table, since these
are all external / predefined tables.
The difference is that Postgres handles the sql and I'm guessing with DAL,
it's just data returned.

Ben Duncan

On Mon, Oct 29, 2018 at 12:14 PM 黄祥  wrote:

> had you try DAL's execute sql ?
> ref:
>
> http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#executesql
>
> best regards,
> stifan
>
> --
> 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 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.google.com/d/optout.
>

-- 
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 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.google.com/d/optout.


[web2py] Re: DAL and DB VIEWS

2018-10-29 Thread 黄祥
had you try DAL's execute sql ?
ref:
http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#executesql

best regards,
stifan

-- 
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 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.google.com/d/optout.


[web2py] How to download a copied file to the Upload folder

2018-10-29 Thread Luis Sucuc

Hello! The previous programmer copied files directly into the Uploads 
folder, I need to be able to download them now but using the following does 
not work.


My view


   



In administrator.py

@cache.action()
def download():
   return response.download(request, db)



The application is already in production, I can not change the way to 
"upload" the 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 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.google.com/d/optout.


[web2py] DAL and DB VIEWS

2018-10-29 Thread Ben Duncan
Is it possible to use predefined Postgres views inside of DAL?

By views i mean (SQL code)

CREATE VIEW myview AS
select ..
from tablea, tableb
WHERE ..
);

Thanks
Ben Duncan

-- 
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 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.google.com/d/optout.


[web2py] Re: Changing auth form

2018-10-29 Thread Константин Комков


[image: autweh.png]
Now form is beautiful, but I don't know Is that right?

-- 
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 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.google.com/d/optout.


[web2py] Changing auth form

2018-10-29 Thread Константин Комков
Hello!
Give me advice, please. If I want to change auth form, can I do like that:
{{=form.custom.begin}}



E-mail
{{=form.custom.widget.email}}


Пароль
{{=form.custom.widget.password}}



{{=form.custom.widget.remember_me}}
Запомнить меня (на 30 
дней)








Регистрация


Забыли пароль?



{{=form.custom.end}}
{{=form.custom.begin}}



Имя (только кириллица)
{{=form.custom.widget.first_name}}


Фамилия (только кириллица)
{{=form.custom.widget.last_name}}


E-mail
{{=form.custom.widget.email}}




Пароль
{{=form.custom.widget.password}}


Подтвердите пароль
{{=form.custom.widget.password_two}}







{{=form.custom.end}}

{{=form.custom.begin}}
...
{{=form.custom.end}}

{{=form.custom.begin}}
...
{{=form.custom.end}}

{{block page_js}}

{{if request.args(0)=='register':}}
$('#fLogin').hide();
$('#fLostPassword').hide();
$('#fResetPassword').hide();
$('#fRegister').show();
{{elif request.args(0)=='reset_password':}}
$('#fLogin').hide();
$('#fLostPassword').hide();
$('#fRegister').hide();
$('#fResetPassword').show();
{{elif request.args(0)=='request_reset_password':}}
$('#fLogin').hide();
$('#fRegister').hide();
$('#fResetPassword').hide();
$('#fLostPassword').show();
{{else:}}
$('#fLostPassword').hide();
$('#fRegister').hide();
$('#fResetPassword').hide();
$('#fLogin').show();
{{pass}}

{{end page_js}}
Thanks!

-- 
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 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.google.com/d/optout.


[web2py] Re: Mixed login (openid and default auth)

2018-10-29 Thread Manuele
Ok the answere was in the documentation itself, just downbunder... 
http://web2py.com/books/default/chapter/29/09/access-control#Multiple-login-forms

but even other suggestions about your experience about the topic are 
welcome.

Best regards

Il giorno lunedì 29 ottobre 2018 12:29:27 UTC+1, Manuele ha scritto:
>
> Hi! 
>
> Is there a way to let a web2py application support both openid and 
> standard authentication in parallel? 
>
> Applying what mentioned in the documentation[*] the standard login form 
> is substituted with the openid form and there's no way to login the 
> application using username and password. An I right? Or Did I 
> misunderstand the doc? 
>
> Thank you very mutch in advance 
>
> Cheers 
>
>  Manuele 
>
>
> [*] http://web2py.com/books/default/chapter/29/09/access-control#OpenID 
>
>

-- 
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 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.google.com/d/optout.


[web2py] Mixed login (openid and default auth)

2018-10-29 Thread Manuele Pesenti

Hi!

Is there a way to let a web2py application support both openid and 
standard authentication in parallel?


Applying what mentioned in the documentation[*] the standard login form 
is substituted with the openid form and there's no way to login the 
application using username and password. An I right? Or Did I 
misunderstand the doc?


Thank you very mutch in advance

Cheers

    Manuele


[*] http://web2py.com/books/default/chapter/29/09/access-control#OpenID

--
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 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.google.com/d/optout.


Re: [web2py] Re: Auth question

2018-10-29 Thread Rahul
Hi Jim,
 This works like a charm. Thank you for this. It is what I expected 
and wanted to achieve with Auth. I'll check my new project for what I may 
be doing wrong, for now it seems that the scaffolding admin interface I 
want to use for my app is the one that is the culprit. It has lots of 
custom js and css files. I would need to figure out a way to merge them 
with it properly.  Again, Thank you! for your patience and wonderful 
support. And thank you everyone. 

Regards,

Rahul. 

On Sunday, October 28, 2018 at 6:33:25 AM UTC+5:30, Jim S wrote:
>
> Rahul
>
> Let's try this a different way.
>
> Attached is a simple multi-tenant app with one table.
>
> Does this do what you need?
>
> 1.  Create a new project in web2py
> 2.  Replace db.py in your models dir with this one
> 3.  Replace default.py in your controllers dir with this one
> 4.  Replace index.html in views/default with this one
> 5.  Add notes.html to views/default
> 6.  Replace storage.sqlite in your databases dir with this one
>
> Depending on your version of web2py this should all work.
>
> I've created 2 logins
>
> elvis - password is password
> blueeyes - password is password
>
> Click on the notes link logged in as each of them and you'll see different 
> notes show up based on the common filter.
>
> -Jim
>
> On Sat, Oct 27, 2018 at 12:52 PM Rahul > 
> wrote:
>
>> Hi Dave and Jim,
>>Please find the files in the zipped archive. I have added 
>> default.py, db.py, index.html and also layout file which I am converting to 
>> use with web2py. called ace.html. I have also attached the views\login.html 
>> file since I am extending this file  specifically for login form as it is 
>> different than layout file. Let me know. Thanks!
>>
>>
>> Regards,
>>
>> Rahul 
>>
>> On Friday, October 26, 2018 at 5:11:12 PM UTC+5:30, Jim S wrote:
>>>
>>> Can you show the entire db.py, default py and index.html?
>>>
>>> Jim
>>>
>>>
>>> On Fri, Oct 26, 2018, 1:44 AM Rahul  wrote:
>>>
 Nope - doesnt help. I commented out all the user functions defined in 
 the controller and 


 #  User functions ---
 '''def login(): return dict(form=auth.login())
 def register(): return dict(form=auth.register())
 def retrieve_password(): return dict(form=auth.reset_password())
 def logout(): return dict(form=auth.logout())
 def profile(): return dict(form=auth.profile())
 '''

 I even decorated index - It does take me to the login screen but from 
 there nothing happens. It just wont log me in like it did before. Also,  I 
 have two users in database but none work now.  Again, register seems to 
 fail (It did work earlier) but now it doesnt. See screenshot of both 
 screens. Looks like I must be really doing something weird. If this wont 
 work by this Sunday. I may go back to my old style of coding and do it all 
 by myself. I've seriously lost 10 days reading and experimenting with Auth 
 to make it work . Not too much coded. 

 @auth.requires_login()
 def index():
 response.flash = T("Hello User")
 #redirect(URL(r=request, c='default/user', f='login')) # Redirects 
 user to login page
 return dict(message=T('Welcome to web2py!'))



 Thanks,

 Rahul



 On Thursday, October 25, 2018 at 6:02:45 PM UTC+5:30, Jim S wrote:
>
> Having the default user() functions is all you need.  I'd try 
> commenting out your 'user' functions.
>
> -Jim
>
> On Wednesday, October 24, 2018 at 10:59:45 PM UTC-5, Rahul wrote:
>>
>> Yes this is in default.py. Please excuse me for my bad code as I am 
>> still experimenting with Auth and not totally familiar with the 
>> implementation. Is this the right way that I am doing it? or only having 
>> user() function is enough ? 
>>
>> Thanks, Rahul
>>
>> On Wednesday, October 24, 2018 at 9:45:21 PM UTC+5:30, Jim S wrote:
>>>
>>> I'm confused.  Is this code in your controller somewhere?
>>>
>>> #  User functions ---
>>> def login(): return dict(form=auth.login())
>>> def register(): return dict(form=auth.register())
>>> def retrieve_password(): return dict(form=auth.reset_password())
>>> def logout(): return dict(form=auth.logout())
>>> def profile(): return dict(form=auth.profile())
>>>
>>> You shouldn't need it.  To override the default login stuff I've 
>>> just modified the one in default.py.
>>>
>>> -Jim
>>>
>>>
>>>
>>> On Tuesday, October 23, 2018 at 11:26:45 PM UTC-5, Rahul wrote:

 The user function remains as-is - No modifications done. 

 def user():
 """
 exposes:
 http:///[app]/default/user/login
 http:///[app]/default/user/logout
 http:///[app]/default/user/register
 http:///[app]/default/user/profile