[web2py] Is there anyway to register a user manually just like login_bare? I am using it in the mobile app.

2012-09-13 Thread Kenny


login_bare is so useful for accessing the database manually in mobile 
application, is there anyway to let the users to register the website via 
mobile application?

ex) register_bare(id,password) -> Save it in the database -> user is registered.

I wasn't able to find how I should make this registration step for mobile app + 
web2py.

Thank you



-- 





[web2py] Is it possible to remove row from rows result created from DB?

2012-09-17 Thread Kenny
Basically, I get the place data with longitude and latitude, calculate it 
if it's more than 3000 miles, remove that row from Rows. 
I am sure that this is wrong. If I can remove the row from fetch rows, how 
can I add extra columns to the rows for distance between two points?
P.S the result has to be Jsoned.

Here's the code

def tester():
items = db(db.dine_promotion.place_id==db.place.id).select()

latitude =float(23.790457)
longitude =float(-47.602542)
for row in items:
if row.place.latitude:
a=float(row.place.latitude)
b=float(row.place.longitude)
dist="%.2f" % calc_distance(latitude,longitude,a,b)
if  dist > 3000:
items.remove(row)
return dict(restaurants = items)

-- 





[web2py] Is there anyone using Linode to host Web2py??

2012-04-05 Thread Kenny
I just registered for Linode to host web2py. after playing it for few 
hours, It doesnt seem too easy to deploy..

I followed
https://groups.google.com/forum/?fromgroups#!topic/web2py/kd_A86Qwz6w

by creating a script and run it. (init.deb.sh files are relocated)

I think everything's followed nicely but not working.

Is there anyone who can help me out by giving me instruction or info? 

Thank you.



[web2py] Re: Is there anyone using Linode to host Web2py??

2012-04-05 Thread Kenny
By the way, the setup I was looking at was wsgi+ nginx

On Thursday, April 5, 2012 9:14:07 PM UTC-7, Kenny wrote:
>
> I just registered for Linode to host web2py. after playing it for few 
> hours, It doesnt seem too easy to deploy..
>
> I followed
> https://groups.google.com/forum/?fromgroups#!topic/web2py/kd_A86Qwz6w
>
> by creating a script and run it. (init.deb.sh files are relocated)
>
> I think everything's followed nicely but not working.
>
> Is there anyone who can help me out by giving me instruction or info? 
>
> Thank you.
>
>

Re: [web2py] Is there anyone using Linode to host Web2py??

2012-04-05 Thread Kenny
i am following their tut right now. It caused "502 Bad Gateway"

any idea?


On Thursday, April 5, 2012 9:39:13 PM UTC-7, rochacbruno wrote:
>
> I use Linode and I just run web2py/scripts/nginx+uwsgi and t works like a 
> charm!
>
> On Fri, Apr 6, 2012 at 1:14 AM, Kenny  wrote:
>
>> I just registered for Linode to host web2py. after playing it for few 
>> hours, It doesnt seem too easy to deploy..
>>
>> I followed
>> https://groups.google.com/forum/?fromgroups#!topic/web2py/kd_A86Qwz6w
>>
>> by creating a script and run it. (init.deb.sh files are relocated)
>>
>> I think everything's followed nicely but not working.
>>
>> Is there anyone who can help me out by giving me instruction or info? 
>>
>> Thank you.
>>
>>
>
>
> -- 
>
> Bruno Rocha
> [http://rochacbruno.com.br]
>
>

Re: [web2py] Is there anyone using Linode to host Web2py??

2012-04-05 Thread Kenny
Rocha! What just happened?!!! 
wow! I was looking at the codes falling down on the screen for few mins. I 
was like "What's this script doing? " and then.. boom! done and done. Thank 
you!
 
I have one more question. Did this script install PIL? It was too many 
lines. I wasn't able to catch up. haha
good night!

On Thursday, April 5, 2012 10:12:24 PM UTC-7, rochacbruno wrote:
>
> go to your shell, download web2py, unzip it and run the script
>
> ~/$  wget http://www.web2py.com/examples/static/web2py_src.zip
> ~/$ unzip web2py_src.zip
> ~/$ cd web2py/scripts
> ~/web2py/scripts$ chmod +x setup-web2py-nginx-uwsgi-ubuntu.sh
> ~/web2py/scripts $ ./setup-web2py-nginx-uwsgi-ubuntu.sh
>
> just follow the steps in script
>
> On Fri, Apr 6, 2012 at 2:06 AM, Kenny  wrote:
>
>> i am following their tut right now. It caused "502 Bad Gateway"
>>
>> any idea?
>>  
>>
>> On Thursday, April 5, 2012 9:39:13 PM UTC-7, rochacbruno wrote:
>>>
>>> I use Linode and I just run web2py/scripts/nginx+uwsgi and t works like 
>>> a charm!
>>>
>>> On Fri, Apr 6, 2012 at 1:14 AM, Kenny  wrote:
>>>
>>>> I just registered for Linode to host web2py. after playing it for few 
>>>> hours, It doesnt seem too easy to deploy..
>>>>
>>>> I followed
>>>> https://groups.google.com/**forum/?fromgroups#!topic/**
>>>> web2py/kd_A86Qwz6w<https://groups.google.com/forum/?fromgroups#%21topic/web2py/kd_A86Qwz6w>
>>>>
>>>> by creating a script and run it. (init.deb.sh files are relocated)
>>>>
>>>> I think everything's followed nicely but not working.
>>>>
>>>> Is there anyone who can help me out by giving me instruction or info? 
>>>>
>>>> Thank you.
>>>>
>>>>
>>>
>>>
>>> -- 
>>>
>>> Bruno Rocha
>>> [http://rochacbruno.com.br]
>>>
>>>
>
>
> -- 
>
> Bruno Rocha
> [http://rochacbruno.com.br]
>
>

[web2py] this might be out of Web2py topic. I am trying to change the time on Ubuntu. It kept showing me UTC

2012-04-13 Thread Kenny
I am trying to change the time on Ubuntu. It kept showing me UTC time. I 
tried all the method.
ln -sf /usr/share/zoneinfo/UTC /etc/localtime

and

dpkg-reconfigure tzdata 

but no luck

I even changed rcS to UTC=no but no goal

Any Idea? I am using linode.

I am sorry for unrelated topic. but after googling to find some solutions, this 
group is where I am at now. ;) 




[web2py] Re: this might be out of Web2py topic. I am trying to change the time on Ubuntu. It kept showing me UTC

2012-04-13 Thread Kenny
ignore this post. My letc/localtime was corrupted. Just deleted and 
resymbolinked it.

On Friday, April 13, 2012 9:39:02 PM UTC-7, Kenny wrote:
>
> I am trying to change the time on Ubuntu. It kept showing me UTC time. I 
> tried all the method.
> ln -sf /usr/share/zoneinfo/UTC /etc/localtime
>
> and
>
> dpkg-reconfigure tzdata 
>
> but no luck
>
> I even changed rcS to UTC=no but no goal
>
> Any Idea? I am using linode.
>
> I am sorry for unrelated topic. but after googling to find some solutions, 
> this group is where I am at now. ;) 
>
>
>

[web2py] How can I combine Facebook login and regular login?

2012-04-26 Thread Kenny
So I think I successfully implemented Facebook login. However, I have a 
problem combining with regular login.

Because as the book stated, I did
auth.settings.actions_disabled=['register','change_password','request_reset_password','profile']

so I can't use regular register/login

How can I combine them together? Thank you.


[web2py] Re: How can I receive oauth/access tokens with the Oauth library in Web2py?

2013-03-26 Thread Kenny
I was able to manage this issue. Tweepy was the one I used and used 
redirect to get tokens from callback. I guess it's better to leave 
login_form function as is. :) Have a nice day!

On Tuesday, March 26, 2013 8:51:09 AM UTC-5, Kenny wrote:
>
> Yesterday, I wanted to get the tokens from Facebook and Twitter for users 
> and using the Web2py normal login system at same time. I only wanted to use 
> their APIs not for implementing oauth login into my website.
> I was able to get tokens from Facebook API by using Facebook JavaScript 
> SDK. I chose this route since I don't know how to separate the Web2py given 
> library(login_form) for getting only tokens instead of creating auth users 
> and signing in. 
> If I can separate the login_form, how should I do it? Or is there any 
> other way around?
>
> Thank you!
>

-- 

--- 
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] Re: Uploadify what am I doing wrong

2012-11-17 Thread Kenny
Thank you for sharing. I am getting IOerror from this.  It seems to me that 
it's working on your server and not on mine. very weird.

On Wednesday, July 4, 2012 3:29:11 PM UTC-5, Relsi Hur wrote:
>
> here a very fast example.
>
> Em quarta-feira, 4 de julho de 2012 16h40min45s UTC-3, cheer10s escreveu:
>>
>> thank you for helping me
>>
>> I looked at some of the documentation and figured out some things but I 
>> get an IORERROafter uploading any ideas
>>
>> here is my modified controller and my uploadify script I am using 
>> uploadify version 3
>>
>> def myUpload():
>> form = SQLFORM(db.music)
>> if form.accepts(request.vars,session):
>> mySong=request.post_vars.Filedata
>> db.music.insert(song = db.music.song.store(mySong.file, 
>> mySong.filename))
>> response.flash = 'Your info has been submitted'
>> return dict(form=form)
>> elif form.errors:
>> response.flash = 'Please correct the highlighted fields'
>> return dict(form=form)
>> else:
>> return dict(form=form)
>>
>>
>> myUpload.html
>>
>> 
>>
>>
>> jQuery('document').ready(function() {
>> jQuery('#music_song').uploadify({
>> 'swf' : '{{=URL("static", "uploadify/uploadify.swf")}}',
>> 'script' : '{{=URL("default", "myUpload")}}',
>> 'cancelImg' : '{{=URL("static", 
>> "uploadify/uploadify-cancel.png")}}',
>> 'buttonText': 'Upload Song',
>> 'folder' : '/uploads/music',
>> 'auto'  : true,
>> 'multi' : false,
>> 'checkExisting' : false
>> });
>> });
>> 
>>
>> {{=form}}
>>
>>
>>
>>
>> On Wed, Jul 4, 2012 at 11:11 AM, Relsi Hur < > wrote:
>>
>>> here is working fine, but my script is a little different, see if 
>>> something helps:
>>>
>>> http://pastebin.com/tKLSC9Uw
>>>
>>> Em quarta-feira, 4 de julho de 2012 14h05min40s UTC-3, cheer10s escreveu:
>>>
 Hello I am trying to use uploadify in my web2py app but I am having a 
 bit of difficulty no errors occur it just doesn't work


 These are my controllers

 def index():
 return dict() 

 def myUpload():
 form = SQLFORM(db.music)
 if form.accepts(request.vars, session):
 response.flash = 'Your info has been submitted'
 return dict(form=form)
 elif form.errors:
 response.flash = 'Please correct the highlighted fields'
 return dict(form=form)
 else:
 return dict(form=form)


 my index view

 {{extend "template.html"}}
 

 {{=LOAD('default','myUpload',**ajax=False)}}

 

 myUpload view (its not a load file)

 
 $(document).ready(function() {
   $('#music_song').uploadify({
 "uploader"  : "{{=URL('static', 'uploadify/uploadify.swf')}}",
 "script": "{{=URL('default', 'index')}}",
 "cancelImg" : "{{=URL('static', 'uploadify/uploadify-cancel.**
 png')}}",
 "auto"  : true
   });
 });
 

 {{=form}}



 and this is in template.html 


 >>> type="text/css" rel="stylesheet" />

 {{include "web2py_ajax.html"}}

 <**/script>