[web2py] Re: Hosting my web2py application

2020-11-03 Thread mostwanted
I'm currently using pythonanywhere for some of my applications, I was just 
interested in hosting 1 or 2 of some.

On Wednesday, November 4, 2020 at 8:27:01 AM UTC+2 Rufus wrote:

> The technique we used with PHP was the php would call the python program 
> (or any other program callable from the linux shell) and take the output 
> from it or the files generated by it using PHP.
> This is not the same as generating web pages using python, or modifying 
> the HTML to include python code (like web2py, or, I imagine, django and 
> such)
> Have you looked at www.pythonanywhere.com?
>
>
> On Thursday, October 29, 2020 at 1:21:17 AM UTC-4 mostwanted wrote:
>
>> I've come across alot of information on setting up a domestic webserver I 
>> just wasnt sure if the same setup of hosting a PHP application would apply 
>> to hosting a Python application, I just thought it could be different but 
>> if its all the same thing I'll pick one & try it out.
>>
>> Regards
>>
>> On Tuesday, October 27, 2020 at 11:51:36 PM UTC+2 jonatha...@whatho.net 
>> wrote:
>>
>>> Do you want instructions on how to set up and run a server (Linux, 
>>> Windows?) on your home premises?
>>> Instructions on how to install web2py on such a server?
>>> Instructions on how to provide access to web browsers out on the 
>>> internet (e.g. setting up IP addresses on which the server can be 
>>> contacted?)
>>>
>>> These are big topics which (I would suggest) are outside the scope of 
>>> this group, and might require a fair bit of research. Also there are lots 
>>> of options depending on your requirements. None of it's specially difficult 
>>> but most of it is not specific to web2py.
>>>
>>>
>>> On Tuesday, 27 October 2020 at 15:44:30 UTC mostwanted wrote:
>>>
 How do I setup a private home server to host my web2py application? 
 What do i need & how do i put it together? If anyone has done it before 
 please share the process or direct me to where I can find the information.

 Regards;

 Mostwanted

>>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/6dac8e2a-e01a-4e23-9acd-cfbf12639b30n%40googlegroups.com.


[web2py] Re: Displaying content based on the id attribute

2020-11-03 Thread mostwanted
I threw in  console.log("Hello world!");  but its not printing anything on 
the console! The link events are not being handled!


On Tuesday, November 3, 2020 at 11:35:19 PM UTC+2 Jim S wrote:

> Can you put some console.log() statements in your javascript inside your 
> function to see what is/isn't working?
>
> -Jim
>
>
> On Tuesday, November 3, 2020 at 12:10:06 PM UTC-6, mostwanted wrote:
>>
>> Hey Jim, I have but it shows no errors!
>>
>> On Tuesday, November 3, 2020 at 6:02:50 PM UTC+2 Jim S wrote:
>>
>>> Have you checked your browser console to see if you have any javascript 
>>> errors?
>>>
>>> -Jim
>>>
>>>
>>> On Tuesday, November 3, 2020 at 3:36:22 AM UTC-6, mostwanted wrote:

 I have a hidden span that i want displayed when a link is clisked while 
 waiting for the page to load but this is not working! I dont know where I 
 am going wrong but thought I had it right, please assist me.

 *CSS:*
 .link_loader
 {
 display: none;
 }

 *CONTROLLER*
 *#The yellow line is the hidden span that has the loader I want to 
 display*
 def ajaxlivesearch():
 keywords = request.vars.keywords
 print "Keywords: " + str(keywords)

 if keywords:
 query = reduce(lambda 
 a,b:a,[db.services.service_name.contains(k) for k in keywords.split()])
 services = db(query).select()
 items = []

 if services:
 for c in services: 
 items.append(DIV*(SPAN("loading ...", SPAN(_class="fa 
 fa-spinner fa-spin"), _class="link_loader", 
 data={'id':"res%s"%c.service_name})*, A(c.service_name, 
 _class="service", _style="font-weight: bold;", _href=URL('companies', args=
 c.id), _id="res%s"%c.service_name, 
 _onclick="updatelivesearch(jQuery('#res%s').html())" % c.service_name)))

 *VIEW*
 *#This jQuery script attempts to display the hidden span*

 **$(document).ready(function(){
 $('.service').click(function(e) {
 const id = $(this).data('id'); 
 $('#' + id).fadeIn(); 
 e.preventDefault();

 });
 });

 **

 Regards;

 Mostwanted

>>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/61e48a96-f5d5-46e2-9522-f5aeb92b9112n%40googlegroups.com.


[web2py] Re: Hosting my web2py application

2020-11-03 Thread Rufus
The technique we used with PHP was the php would call the python program 
(or any other program callable from the linux shell) and take the output 
from it or the files generated by it using PHP.
This is not the same as generating web pages using python, or modifying the 
HTML to include python code (like web2py, or, I imagine, django and such)
Have you looked at www.pythonanywhere.com?


On Thursday, October 29, 2020 at 1:21:17 AM UTC-4 mostwanted wrote:

> I've come across alot of information on setting up a domestic webserver I 
> just wasnt sure if the same setup of hosting a PHP application would apply 
> to hosting a Python application, I just thought it could be different but 
> if its all the same thing I'll pick one & try it out.
>
> Regards
>
> On Tuesday, October 27, 2020 at 11:51:36 PM UTC+2 jonatha...@whatho.net 
> wrote:
>
>> Do you want instructions on how to set up and run a server (Linux, 
>> Windows?) on your home premises?
>> Instructions on how to install web2py on such a server?
>> Instructions on how to provide access to web browsers out on the internet 
>> (e.g. setting up IP addresses on which the server can be contacted?)
>>
>> These are big topics which (I would suggest) are outside the scope of 
>> this group, and might require a fair bit of research. Also there are lots 
>> of options depending on your requirements. None of it's specially difficult 
>> but most of it is not specific to web2py.
>>
>>
>> On Tuesday, 27 October 2020 at 15:44:30 UTC mostwanted wrote:
>>
>>> How do I setup a private home server to host my web2py application? What 
>>> do i need & how do i put it together? If anyone has done it before please 
>>> share the process or direct me to where I can find the information.
>>>
>>> Regards;
>>>
>>> Mostwanted
>>>
>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/5d505e53-9528-40c7-a750-92aa5575d25an%40googlegroups.com.


[web2py] Re: Displaying content based on the id attribute

2020-11-03 Thread Jim S
Can you put some console.log() statements in your javascript inside your 
function to see what is/isn't working?

-Jim


On Tuesday, November 3, 2020 at 12:10:06 PM UTC-6, mostwanted wrote:
>
> Hey Jim, I have but it shows no errors!
>
> On Tuesday, November 3, 2020 at 6:02:50 PM UTC+2 Jim S wrote:
>
>> Have you checked your browser console to see if you have any javascript 
>> errors?
>>
>> -Jim
>>
>>
>> On Tuesday, November 3, 2020 at 3:36:22 AM UTC-6, mostwanted wrote:
>>>
>>> I have a hidden span that i want displayed when a link is clisked while 
>>> waiting for the page to load but this is not working! I dont know where I 
>>> am going wrong but thought I had it right, please assist me.
>>>
>>> *CSS:*
>>> .link_loader
>>> {
>>> display: none;
>>> }
>>>
>>> *CONTROLLER*
>>> *#The yellow line is the hidden span that has the loader I want to 
>>> display*
>>> def ajaxlivesearch():
>>> keywords = request.vars.keywords
>>> print "Keywords: " + str(keywords)
>>>
>>> if keywords:
>>> query = reduce(lambda 
>>> a,b:a,[db.services.service_name.contains(k) for k in keywords.split()])
>>> services = db(query).select()
>>> items = []
>>>
>>> if services:
>>> for c in services: 
>>> items.append(DIV*(SPAN("loading ...", SPAN(_class="fa 
>>> fa-spinner fa-spin"), _class="link_loader", 
>>> data={'id':"res%s"%c.service_name})*, A(c.service_name, 
>>> _class="service", _style="font-weight: bold;", _href=URL('companies', args=
>>> c.id), _id="res%s"%c.service_name, 
>>> _onclick="updatelivesearch(jQuery('#res%s').html())" % c.service_name)))
>>>
>>> *VIEW*
>>> *#This jQuery script attempts to display the hidden span*
>>>
>>> **$(document).ready(function(){
>>> $('.service').click(function(e) {
>>> const id = $(this).data('id'); 
>>> $('#' + id).fadeIn(); 
>>> e.preventDefault();
>>>
>>> });
>>> });
>>>
>>> **
>>>
>>> Regards;
>>>
>>> Mostwanted
>>>
>>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/84fe8a86-5756-468f-8fe2-e53e10e08792o%40googlegroups.com.


[web2py] Re: Displaying content based on the id attribute

2020-11-03 Thread mostwanted
Hey Jim, I have but it shows no errors!

On Tuesday, November 3, 2020 at 6:02:50 PM UTC+2 Jim S wrote:

> Have you checked your browser console to see if you have any javascript 
> errors?
>
> -Jim
>
>
> On Tuesday, November 3, 2020 at 3:36:22 AM UTC-6, mostwanted wrote:
>>
>> I have a hidden span that i want displayed when a link is clisked while 
>> waiting for the page to load but this is not working! I dont know where I 
>> am going wrong but thought I had it right, please assist me.
>>
>> *CSS:*
>> .link_loader
>> {
>> display: none;
>> }
>>
>> *CONTROLLER*
>> *#The yellow line is the hidden span that has the loader I want to 
>> display*
>> def ajaxlivesearch():
>> keywords = request.vars.keywords
>> print "Keywords: " + str(keywords)
>>
>> if keywords:
>> query = reduce(lambda 
>> a,b:a,[db.services.service_name.contains(k) for k in keywords.split()])
>> services = db(query).select()
>> items = []
>>
>> if services:
>> for c in services: 
>> items.append(DIV*(SPAN("loading ...", SPAN(_class="fa 
>> fa-spinner fa-spin"), _class="link_loader", 
>> data={'id':"res%s"%c.service_name})*, A(c.service_name, 
>> _class="service", _style="font-weight: bold;", _href=URL('companies', args=
>> c.id), _id="res%s"%c.service_name, 
>> _onclick="updatelivesearch(jQuery('#res%s').html())" % c.service_name)))
>>
>> *VIEW*
>> *#This jQuery script attempts to display the hidden span*
>>
>> **$(document).ready(function(){
>> $('.service').click(function(e) {
>> const id = $(this).data('id'); 
>> $('#' + id).fadeIn(); 
>> e.preventDefault();
>>
>> });
>> });
>>
>> **
>>
>> Regards;
>>
>> Mostwanted
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/2d15fd90-4ee4-4ad9-a0e7-8c898a58bccan%40googlegroups.com.


[web2py] Re: Displaying content based on the id attribute

2020-11-03 Thread Jim S
Have you checked your browser console to see if you have any javascript 
errors?

-Jim

On Tuesday, November 3, 2020 at 3:36:22 AM UTC-6, mostwanted wrote:
>
> I have a hidden span that i want displayed when a link is clisked while 
> waiting for the page to load but this is not working! I dont know where I 
> am going wrong but thought I had it right, please assist me.
>
> *CSS:*
> .link_loader
> {
> display: none;
> }
>
> *CONTROLLER*
> *#The yellow line is the hidden span that has the loader I want to display*
> def ajaxlivesearch():
> keywords = request.vars.keywords
> print "Keywords: " + str(keywords)
>
> if keywords:
> query = reduce(lambda 
> a,b:a,[db.services.service_name.contains(k) for k in keywords.split()])
> services = db(query).select()
> items = []
>
> if services:
> for c in services: 
> items.append(DIV*(SPAN("loading ...", SPAN(_class="fa 
> fa-spinner fa-spin"), _class="link_loader", 
> data={'id':"res%s"%c.service_name})*, A(c.service_name, _class="service", 
> _style="font-weight: bold;", _href=URL('companies', args=c.id), 
> _id="res%s"%c.service_name, 
> _onclick="updatelivesearch(jQuery('#res%s').html())" % c.service_name)))
>
> *VIEW*
> *#This jQuery script attempts to display the hidden span*
>
> **$(document).ready(function(){
> $('.service').click(function(e) {
> const id = $(this).data('id'); 
> $('#' + id).fadeIn(); 
> e.preventDefault();
>
> });
> });
>
> **
>
> Regards;
>
> Mostwanted
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/3af2fae7-9764-4fab-a8e4-6c45e743f99fo%40googlegroups.com.


[web2py] Displaying content based on the id attribute

2020-11-03 Thread mostwanted
I have a hidden span that i want displayed when a link is clisked while 
waiting for the page to load but this is not working! I dont know where I 
am going wrong but thought I had it right, please assist me.

*CSS:*
.link_loader
{
display: none;
}

*CONTROLLER*
*#The yellow line is the hidden span that has the loader I want to display*
def ajaxlivesearch():
keywords = request.vars.keywords
print "Keywords: " + str(keywords)

if keywords:
query = reduce(lambda a,b:a,[db.services.service_name.contains(k) 
for k in keywords.split()])
services = db(query).select()
items = []

if services:
for c in services: 
items.append(DIV*(SPAN("loading ...", SPAN(_class="fa 
fa-spinner fa-spin"), _class="link_loader", 
data={'id':"res%s"%c.service_name})*, A(c.service_name, _class="service", 
_style="font-weight: bold;", _href=URL('companies', args=c.id), 
_id="res%s"%c.service_name, 
_onclick="updatelivesearch(jQuery('#res%s').html())" % c.service_name)))

*VIEW*
*#This jQuery script attempts to display the hidden span*

**$(document).ready(function(){
$('.service').click(function(e) {
const id = $(this).data('id'); 
$('#' + id).fadeIn(); 
e.preventDefault();

});
});

**

Regards;

Mostwanted

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/3b8a175c-ecdc-47e5-a157-45e7fe260f9fn%40googlegroups.com.