Re: [web2py] Re: No module named PIL

2013-05-26 Thread smoggy
In my code i use:
import Image



On Saturday, May 25, 2013 10:11:38 PM UTC+1, Massimo Di Pierro wrote:
>
> web2py source yes. PIL you do not install from source on windows because 
> it includes binary modules that must be compiler. You must get the binary 
> module.
>
> On Saturday, 25 May 2013 16:04:25 UTC-5, Alex Glaros wrote:
>>
>> Right, am  running from the web2py Windows binary.  
>>
>> So I will have to install Python and w2p from source
>>
>> thanks!
>>
>> Alex
>>
>> On Saturday, May 25, 2013 4:53:23 AM UTC-7, Anthony wrote:
>>>
>>> Do you have Python installed on your machine, or are you running from 
>>> the web2py Windows binary? If that latter, try installing Python on your 
>>> machine and run from web2py source instead.
>>>
>>> Anthony
>>>
>>> On Saturday, May 25, 2013 2:44:15 AM UTC-4, Alex Glaros wrote:

 error message said: python2.7 required, but was not found in registry

 tried all versions down to 2.4

 is there a work-around?

 thanks,

 Alex

 On Friday, May 24, 2013 11:27:43 PM UTC-7, Massimo Di Pierro wrote:
>
> You don't. In windows things are done the old fashion way. You 
> download the installer:
> http://effbot.org/downloads/PIL-1.1.7.win32-py2.7.exe
> and run it. Then you pray it this is the right version.
>
> On Saturday, 25 May 2013 00:56:07 UTC-5, Alex Glaros wrote:
>>
>> I have a windows machine.  Where do I type "pip install PIL"?
>>
>> Do I type in the "plugins" section, shell section, at the DOS command 
>> line?
>>
>> On Friday, May 24, 2013 10:25:58 PM UTC-7, visuallinux wrote:
>>>
>>> pip install PIL
>>>
>>>
>>>
>>> Enviado desde mi iPhone
>>>
>>> El 25-05-2013, a las 0:35, Alex Glaros  
>>> escribió:
>>>
>>> I'll try to install it but can you please tell where and how?   I 
>>> can't find where Python is in the web2py folders.
>>>
>>> thanks,
>>>
>>> Alex
>>>
>>> On Friday, May 24, 2013 9:31:02 PM UTC-7, Anthony wrote:

 Sounds like you don't have PIL installed.
>>>
>>>  -- 
>>>  
>>> --- 
>>> 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+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>>

-- 

--- 
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/groups/opt_out.




[web2py] Re: In openshift: Need help on why my web2py website is being constantly accessed by openshift itself

2013-05-10 Thread smoggy
Ok, apparently the commenting of

option httpchk GET /
like 
#option httpchk GET /

solved the issue, now the logs do not get clogged with useless data.
It was just the haproxy that failed to start.


On Friday, May 10, 2013 1:37:27 AM UTC+1, smoggy wrote:
>
> I've checked ./haproxy-1.4/conf/haproxy.cfg
>
> and I indeed had 
>
> listen express 127.9.181.130:8080
> option httpchk GET /
>
> i commented that in order to get only tcp based checks instead of http 
> ones to keep the logs cleaner. After restarting the cartridge 
> with "rhc cartridge reload haproxy-1.4 --namespace my_namespace --app 
> my_app " the log file still shows a hit or health check every 3 seconds :/ .
>
> Andrew do your logs also show these events ? have you had any 
> configuration changes to prevent this from happening ?
>
>
> On Thursday, May 9, 2013 9:06:13 PM UTC+1, Andrew Replogle wrote:
>>
>> If you're using haproxy are you sure it's not the heartbeat check?
>>
>> On Wednesday, May 8, 2013 5:10:51 AM UTC-5, smoggy wrote:
>>>
>>> Hi folks,
>>>
>>> So in openshift in a python 2.6 cartridge + haproxy i'm having lots of 
>>> accesses from openshift ip itself, like one every 3 seconds. I do not have 
>>> any cron jobs. Is there a way to figure where these access are coming from 
>>> : wsgi, web2py, openshift ?
>>>
>>>

-- 

--- 
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/groups/opt_out.




[web2py] Re: In openshift: Need help on why my web2py website is being constantly accessed by openshift itself

2013-05-09 Thread smoggy
I've checked ./haproxy-1.4/conf/haproxy.cfg

and I indeed had 

listen express 127.9.181.130:8080
option httpchk GET /

i commented that in order to get only tcp based checks instead of http ones 
to keep the logs cleaner. After restarting the cartridge 
with "rhc cartridge reload haproxy-1.4 --namespace my_namespace --app 
my_app " the log file still shows a hit or health check every 3 seconds :/ .

Andrew do your logs also show these events ? have you had any configuration 
changes to prevent this from happening ?


On Thursday, May 9, 2013 9:06:13 PM UTC+1, Andrew Replogle wrote:
>
> If you're using haproxy are you sure it's not the heartbeat check?
>
> On Wednesday, May 8, 2013 5:10:51 AM UTC-5, smoggy wrote:
>>
>> Hi folks,
>>
>> So in openshift in a python 2.6 cartridge + haproxy i'm having lots of 
>> accesses from openshift ip itself, like one every 3 seconds. I do not have 
>> any cron jobs. Is there a way to figure where these access are coming from 
>> : wsgi, web2py, openshift ?
>>
>>

-- 

--- 
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/groups/opt_out.




Re: [web2py] In openshift: Need help on why my web2py website is being constantly accessed by openshift itself

2013-05-09 Thread smoggy
here is what tail_all gives me and i guess that can be relevant. How can i 
get the user agent or more info ?

==> python-2.6/logs/error_log-20130508-00-EST <==
[Wed May 08 13:15:26 2013] [error] [client 127.9.181.129] mod_wsgi 
(pid=30569): Exception occurred processing WSGI script 
'/var/lib/openshift/516332d0e0b8cd9f14000160/app-root/runtime/repo/wsgi/application'.
[Wed May 08 13:15:26 2013] [error] [client 127.9.181.129] IOError: failed 
to write data
[Wed May 08 14:01:11 2013] [error] [client 127.9.181.129] mod_wsgi 
(pid=30568): Exception occurred processing WSGI script 
'/var/lib/openshift/516332d0e0b8cd9f14000160/app-root/runtime/repo/wsgi/application'.
[Wed May 08 14:01:11 2013] [error] [client 127.9.181.129] IOError: failed 
to write data
[Wed May 08 14:04:27 2013] [error] [client 127.9.181.129] mod_wsgi 
(pid=30568): Exception occurred processing WSGI script 
'/var/lib/openshift/516332d0e0b8cd9f14000160/app-root/runtime/repo/wsgi/application'.
[Wed May 08 14:04:27 2013] [error] [client 127.9.181.129] IOError: failed 
to write data
[Wed May 08 14:30:36 2013] [error] [client 127.9.181.129] mod_wsgi 
(pid=30569): Exception occurred processing WSGI script 
'/var/lib/openshift/516332d0e0b8cd9f14000160/app-root/runtime/repo/wsgi/application'.
[Wed May 08 14:30:36 2013] [error] [client 127.9.181.129] IOError: failed 
to write data
[Wed May 08 19:30:25 2013] [crit] (70007)The timeout specified has expired: 
mod_wsgi (pid=30568): Unable to read WSGI request.
[Wed May 08 19:30:29 2013] [error] [client 127.9.181.129] (32)Broken pipe: 
mod_wsgi (pid=8717): Unable to send request details to WSGI daemon process 
'516332d0e0b8cd9f14000160' on 
'/var/lib/openshift/516332d0e0b8cd9f14000160/python-2.6/logs/wsgi.20595.1.1.sock'.

==> python-2.6/logs/error_log-20130509-00-EST <==
[Thu May 09 00:10:17 2013] [error] [client 127.9.181.129] mod_wsgi 
(pid=30568): Exception occurred processing WSGI script 
'/var/lib/openshift/516332d0e0b8cd9f14000160/app-root/runtime/repo/wsgi/application'.
[Thu May 09 00:10:18 2013] [error] [client 127.9.181.129] IOError: failed 
to write data
[Thu May 09 00:55:28 2013] [error] [client 127.9.181.129] mod_wsgi 
(pid=30568): Exception occurred processing WSGI script 
'/var/lib/openshift/516332d0e0b8cd9f14000160/app-root/runtime/repo/wsgi/application'.
[Thu May 09 00:55:28 2013] [error] [client 127.9.181.129] IOError: failed 
to write data
[Thu May 09 01:30:33 2013] [error] [client 127.9.181.129] mod_wsgi 
(pid=30569): Exception occurred processing WSGI script 
'/var/lib/openshift/516332d0e0b8cd9f14000160/app-root/runtime/repo/wsgi/application'.
[Thu May 09 01:30:33 2013] [error] [client 127.9.181.129] IOError: failed 
to write data
[Thu May 09 02:10:32 2013] [error] [client 127.9.181.129] mod_wsgi 
(pid=30569): Exception occurred processing WSGI script 
'/var/lib/openshift/516332d0e0b8cd9f14000160/app-root/runtime/repo/wsgi/application'.
[Thu May 09 02:10:32 2013] [error] [client 127.9.181.129] IOError: failed 
to write data
[Thu May 09 03:12:21 2013] [error] [client 127.9.181.129] mod_wsgi 
(pid=30568): Exception occurred processing WSGI script 
'/var/lib/openshift/516332d0e0b8cd9f14000160/app-root/runtime/repo/wsgi/application'.
[Thu May 09 03:12:21 2013] [error] [client 127.9.181.129] IOError: failed 
to write data

==> python-2.6/logs/web2py.log <==
127.9.181.129, 2013-05-09 04:53:55, GET, /, HTTP/1.0, 200, 0.273601
127.9.181.129, 2013-05-09 04:53:58, GET, /, HTTP/1.0, 200, 0.205469
127.9.181.129, 2013-05-09 04:54:00, GET, /, HTTP/1.0, 200, 0.273682
127.9.181.129, 2013-05-09 04:54:03, GET, /, HTTP/1.0, 200, 0.450868
127.9.181.129, 2013-05-09 04:54:12, GET, /, HTTP/1.0, 200, 7.086337
127.9.181.129, 2013-05-09 04:54:21, GET, /, HTTP/1.0, 200, 6.137373
127.9.181.129, 2013-05-09 04:54:24, GET, /, HTTP/1.0, 200, 1.335112
127.9.181.129, 2013-05-09 04:54:27, GET, /, HTTP/1.0, 200, 1.107582
127.9.181.129, 2013-05-09 04:54:30, GET, /, HTTP/1.0, 200, 0.272535
127.9.181.129, 2013-05-09 04:54:32, GET, /, HTTP/1.0, 200, 0.454832
/usr/bin/tail: cannot open `python-2.6/logs/wsgi.20595.1.1.sock' for 
reading: No such device or address

==> python-2.6/logs/access_log-20130509-00-EST <==
- - - [09/May/2013:04:54:32 -0400] "GET / HTTP/1.0" 200 22647 "-" "-"

==> python-2.6/logs/web2py.log <==
127.9.181.129, 2013-05-09 04:54:35, GET, /, HTTP/1.0, 200, 0.292673

==> python-2.6/logs/access_log-20130509-00-EST <==
- - - [09/May/2013:04:54:34 -0400] "GET / HTTP/1.0" 200 22647 "-" "-"

==> python-2.6/logs/web2py.log <==
127.9.181.129, 2013-05-09 04:54:37, GET, /, HTTP/1.0, 200, 0.405507

==> python-2.6/logs/access_log-20130509-00-EST <==
- - - [09/May/2013:04:54:37 -0400] "GET / HTTP/1.0" 200 22647 "-" "-"


Quarta-feira, 8 de Maio de 2013 11:51:28 UTC+1, Ricardo Pedroso escreveu:
>
> On Wed, May 8, 2013 at 11:10 AM, smogzer > 
> wrote: 
> > Hi folks, 
> > 
> > So in openshift in a python 2.6 cartridge + haproxy i'm having lots of 
> > accesses from openshift ip itself, like one every 3 s

[web2py] Re: Can somebody hack a user tracker and download counter for us ?

2013-04-22 Thread smoggy
Just publishing the solution I've found for download counting.
It uses the already available google analytics code and i just pasted the 
code in the first link into the end of the layout.html .

How to track downloads with google analytics:
http://www.blastam.com/blog/index.php/2013/03/how-to-track-downloads-in-google-analytics-v2/

How to track the downloads:
http://www.cre8ivespark.com/track-pdf-downloads-with-jquery

-- 

--- 
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/groups/opt_out.




[web2py] Re: Can somebody hack a user tracker and download counter for us ?

2013-04-17 Thread smoggy
Just saying that if there is somebody with some free time and in need of a 
challenge that would be great. It would also further enhance our beloved 
web2py. You people are so judgmental these days.

Terça-feira, 16 de Abril de 2013 22:24:03 UTC+1, Anthony escreveu:
>
> Are you saying you don't know how to do it, or you just want someone to do 
> your work for you?
>
> On Tuesday, April 16, 2013 3:16:07 PM UTC-4, smoggy wrote:
>>
>> I was wondering if somebody could hack a web2py slice that wraps the 
>> A(_href) and adds the clicks to a db, also for downloads, for each session 
>> it could track the user actions and create a behavior/path from it.
>>
>> It would be great for everybody.
>>
>> This slice could be a nice base
>> http://www.web2pyslices.com/slice/show/1358/a-simple-page-statistics-model
>>  
>

-- 

--- 
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/groups/opt_out.




[web2py] Re: automatically generating md5 hash after a file upload

2013-03-28 Thread smoggy
Bump.

Quinta-feira, 28 de Março de 2013 11:32:19 UTC, smoggy escreveu:
>
> Hello folks,
>
> So i want to generate a md5 hash of uploaded files. How can this be done ? 
> here is my attempt
>
> with the following code i get
>
> AttributeError: 'str' object has no attribute 'retrieve'
>
> So obviously the row elements are not Field type, and since i'm a python 
> newbie i couldn't figure this. Can anybody tip me on this ?
>
>
> def md5_for_file(f):
> ... 
> return md5.digest()
>
> db.define_table('t_products',
>  Field('id','id'),
>  Field('f_file_xplatform', type='upload'),
>  Field('f_file_xplatform_hash', type='string',label=T('Source File Hash')),
>  Field('f_file_xplatform_download_name', 'string', compute=lambda r: 
> download_name(r,"XPLATFORM")),
> )
>
> def download_name(in_row,in_os):
> try:
> tt_row = in_row['f_file_xplatform'].retrieve(nameonly=True)
> print "tt_row:  " + tt_row
> t_md5 = md5_for_file(tt_row[1])
> in_row['f_file_xplatform_hash']=t_md5
> return 'blabla.'+t_md5
> 
> except Exception, e:
> import traceback
> print traceback.format_exc()
>
>

-- 

--- 
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/groups/opt_out.




[web2py] automatically generating md5 hash after a file upload

2013-03-28 Thread smoggy
Hello folks,

So i want to generate a md5 hash of uploaded files. How can this be done ? 
here is my attempt

with the following code i get

AttributeError: 'str' object has no attribute 'retrieve'

So obviously the row elements are not Field type, and since i'm a python 
newbie i couldn't figure this. Can anybody tip me on this ?


def md5_for_file(f):
... 
return md5.digest()

db.define_table('t_products',
 Field('id','id'),
 Field('f_file_xplatform', type='upload'),
 Field('f_file_xplatform_hash', type='string',label=T('Source File Hash')),
 Field('f_file_xplatform_download_name', 'string', compute=lambda r: 
download_name(r,"XPLATFORM")),
)

def download_name(in_row,in_os):
try:
tt_row = in_row['f_file_xplatform'].retrieve(nameonly=True)
print "tt_row:  " + tt_row
t_md5 = md5_for_file(tt_row[1])
in_row['f_file_xplatform_hash']=t_md5
return 'blabla.'+t_md5

except Exception, e:
import traceback
print traceback.format_exc()

-- 

--- 
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/groups/opt_out.




[web2py] Re: Cannot submit SQLFORM :/

2013-03-26 Thread smoggy
To close this thread.
The workaround:
So i had this SQLFORM with default view that did not work.
I couldn't fix it, so i created a new controller, pasted the function 
there, created a dedicated view and it worked.


-- 

--- 
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/groups/opt_out.




[web2py] Re: Cannot submit SQLFORM :/

2013-03-26 Thread smoggy
Snif. Maybe when i get the time i play with QtWebkit to switch those fields 
automatically then :/ .

As for the SQLForm problem, you got any clues ? why in badmin it works but 
every other sqlform does not.

Terça-feira, 26 de Março de 2013 17:40:33 UTC, Derek escreveu:
>
> You can't auto-fill a location of a file to upload. Imagine the security 
> holes that would open up on the web. No, users have to select the file on 
> their system. 
>
>
> On Tuesday, March 26, 2013 10:36:15 AM UTC-7, smoggy wrote:
>>
>> There is no view, it's rendered from the controller.
>>
>> About the upload, i'm sending in request.vars the location of the file to 
>> upload, so the user does not have to input it manually. This is being 
>> called from a backoffice program that will upload : an icon, a zip and a 
>> screenshot, so this upload form filling is very convenient.
>>
>> Terça-feira, 26 de Março de 2013 14:02:47 UTC, Anthony escreveu:
>>>
>>> Can we see the view?
>>>
>>> Regarding pre-populating an upload field, what do you mean? Do you want 
>>> to provide a default file, or do you somehow want to identify a file on the 
>>> user's machine?
>>>
>>> Anthony
>>>
>>> On Tuesday, March 26, 2013 9:07:43 AM UTC-4, smoggy wrote:
>>>>
>>>> Hi Folks,
>>>>
>>>> So I cannot submit SQLFORM, even the simpler ones like the following. I 
>>>> always get the "else:" that says "please fill the form"
>>>> I checked and it seems the code is alright and i can submit forms and 
>>>> add content using the badmin plugin, so i'm kind of lost here.
>>>>
>>>> And another question, how can we pre-populate the upload field with 
>>>> request.vars ?
>>>>
>>>> in models.py
>>>>
>>>> db.define_table('t_asd',
>>>> Field('id','id'),
>>>> Field('f_app',type='string', default='abc',label=T('Parent 
>>>> App'),comment=T('The application or addon that will load this.'))
>>>> )
>>>>
>>>> in controller.py
>>>>
>>>> @auth.requires_login()
>>>> def register_addon3():
>>>> form = SQLFORM(db.t_asd)
>>>> if form.process().accepted:
>>>> print("Addon added, waiting for moderator approval to show on 
>>>> the addon store.")
>>>> response.flash = 'Addon added, waiting for moderator approval 
>>>> to show on the addon store.'
>>>> elif form.errors:
>>>> print("form has errors.")
>>>> response.flash = 'form has errors'
>>>> else:
>>>> print("please fill the form.")
>>>> response.flash = 'please fill the form'
>>>> return dict(form=form)
>>>>
>>>>

-- 

--- 
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/groups/opt_out.




[web2py] Re: Cannot submit SQLFORM :/

2013-03-26 Thread smoggy
There is no view, it's rendered from the controller.

About the upload, i'm sending in request.vars the location of the file to 
upload, so the user does not have to input it manually. This is being 
called from a backoffice program that will upload : an icon, a zip and a 
screenshot, so this upload form filling is very convenient.

Terça-feira, 26 de Março de 2013 14:02:47 UTC, Anthony escreveu:
>
> Can we see the view?
>
> Regarding pre-populating an upload field, what do you mean? Do you want to 
> provide a default file, or do you somehow want to identify a file on the 
> user's machine?
>
> Anthony
>
> On Tuesday, March 26, 2013 9:07:43 AM UTC-4, smoggy wrote:
>>
>> Hi Folks,
>>
>> So I cannot submit SQLFORM, even the simpler ones like the following. I 
>> always get the "else:" that says "please fill the form"
>> I checked and it seems the code is alright and i can submit forms and add 
>> content using the badmin plugin, so i'm kind of lost here.
>>
>> And another question, how can we pre-populate the upload field with 
>> request.vars ?
>>
>> in models.py
>>
>> db.define_table('t_asd',
>> Field('id','id'),
>> Field('f_app',type='string', default='abc',label=T('Parent 
>> App'),comment=T('The application or addon that will load this.'))
>> )
>>
>> in controller.py
>>
>> @auth.requires_login()
>> def register_addon3():
>> form = SQLFORM(db.t_asd)
>> if form.process().accepted:
>> print("Addon added, waiting for moderator approval to show on the 
>> addon store.")
>> response.flash = 'Addon added, waiting for moderator approval to 
>> show on the addon store.'
>> elif form.errors:
>> print("form has errors.")
>> response.flash = 'form has errors'
>> else:
>> print("please fill the form.")
>> response.flash = 'please fill the form'
>> return dict(form=form)
>>
>>

-- 

--- 
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/groups/opt_out.




[web2py] Re: web2py world conference 2013

2013-01-28 Thread smoggy
I'm from Lagos Portugal also.
If in Portugal i would suggest the use of the University of Algarve 
installations, It has :
- a nearby airport
- the weather is awesome specially in the summer.
- it is not-expesive.
- good nightlife
- awesome sea food

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[web2py] Re: Just knew about Server-Sent Events and want to share it with you

2012-09-10 Thread smoggy
Hey thanks !

That's something nice to have around, i prefer to hack+grow on some example 
than start from zero.

Anyway i guess that some two-way json-rpc could be implemented on top of 
SSE to make realtime streaming apps a breeze. As opposed to the 
complication of deployment that are websockets.

Ciao.

Segunda-feira, 10 de Setembro de 2012 17:07:19 UTC+1, Paolo Caruccio 
escreveu:
>
> Some time ago I converted the example of html5rocks (
> http://googlecodesamples.com/html5/sse/sse.html) in a simple web2py app. 
> Please pay attention it's a toy app and so check for errors and security 
> holes before use the code in production.
>
> I reused the code for a message system between server and client to 
> communicate database tables change. 
>
> After you Installed the app,  access 
> http://localhost:8000/SSE_clock/default/sse to view the clock example
>
>
> Il giorno domenica 9 settembre 2012 12:00:53 UTC+2, smoggy ha scritto:
>>
>> Stream Updates with Server-Sent Events: 
>>
>> Are like websockets but unidirectional, from the server to the client. 
>> Most modern browsers support it. 
>>
>> It can be combined with XmlHttpRequest / ajax if the client needs to 
>> send events to the server, i.e. "emulate" websockets. 
>>
>> From https://github.com/rwldrn/jquery.eventsource: 
>> "Q. why use EventSource rather than Websockets? 
>> A. EventSource is easier to setup on server (uses http), lighter and 
>> most of the times - that's what you acually need. (via temp01)" 
>>
>> Other resources: 
>>
>> Discussions: 
>> http://www.html5rocks.com/en/tutorials/eventsource/basics/ 
>>
>> http://www.prodigyproductionsllc.com/articles/programming/javascript/avoid-using-eventsource-server-sent-events/
>>  
>>
>> A JS library: https://github.com/Yaffle/EventSource 
>> Implemetation on python2/3: https://github.com/niwibe/sse.git 
>> DJango implementation: https://github.com/niwibe/django-sse.git 
>>
>

-- 





[web2py] Re: accessing to static folder via .load is broken

2012-03-08 Thread smoggy
just submited the ticket in google code.


[web2py] Re: JSON in templates

2011-02-11 Thread smoggy
A json template system :
https://github.com/ruidlopes/minimal.js

Definite win 4 web2py.


[web2py] Re: cube2py not working on GAE

2010-08-22 Thread smoggy
In web2py server it works fine, when running on GAE i get the 404 when
trying to access home. Does GAE need some indexes that need to be
generated to access login ? if so that could be a cyclic
dependency :/ .

Could anybody try making an account in a clean cub2py application and
see if they can login to page/home/ in GAE to reproduce the problem ?

INFO 2010-08-22 09:58:03,192 dev_appserver.py:3275] "GET /init/
default/index HTTP/1.1" 303 -
INFO 2010-08-22 09:58:03,267 gaehandler.py:65]  Request:
59.78ms/60.00ms (real time/cpu time)
INFO 2010-08-22 09:58:03,282 recording.py:327] Saved; key:
__appstats__:083200, part: 117 bytes, full: 36341 bytes, overhead:
0.002 + 0.015; link: http://127.0.0.1:8080/stats/details?time=1282471083207
INFO 2010-08-22 09:58:03,291 dev_appserver.py:3275] "GET /init/
plugin_wiki/page/home HTTP/1.1" 404 -


On Aug 22, 3:57 am, mdipierro  wrote:
> Do you get a traceback in the console?
>
> On Aug 21, 7:03 pm, smoggy  wrote:
>
> > Hi there,
>
> > I'm trying to get cube2py working on GAE(locally) without sucess.
>
> > The browser loads the login page well 
> > :http://127.0.0.1:8080/cube2py/default/user/login
>
> > but when i try to login and the url changes to 
> > :http://127.0.0.1:8080/cube2py/plugin_wiki/page/home
>
> > I get a :
> > 404 NOT FOUND
>
> > What am i doing wrong ?
>
> > I'm using web2py revision 800 from mercurial and the latest cube2py.
>
> > Thanks in advance.


[web2py] cube2py not working on GAE

2010-08-21 Thread smoggy
Hi there,

I'm trying to get cube2py working on GAE(locally) without sucess.

The browser loads the login page well :
http://127.0.0.1:8080/cube2py/default/user/login

but when i try to login and the url changes to :
http://127.0.0.1:8080/cube2py/plugin_wiki/page/home

I get a :
404 NOT FOUND

What am i doing wrong ?

I'm using web2py revision 800 from mercurial and the latest cube2py.

Thanks in advance.