[web2py] my web2py domain sometimes redirects to 'welcome' or 'myapp'. Any fix for this?

2012-11-17 Thread Kenny
I changed the routes_in to redirect one of my domains to some application, 
it sometimes redirects to welcome.
Anyone knows why it does this?

-- 





Re: [web2py] Re: request args

2012-11-17 Thread Vasile Ermicioi
2 errors

1) args should be an array
 form.add_button("Print_Tag", URL("tagprint",
args=[record.bike_identifier]))
instead of
 form.add_button("Print_Tag", URL("tagprint", args=record.bike_identifier))


2) if you pass it to args then retrieve it from args, not from vars
req = request.args(0)
instead of
req = request.vars['bike_identifier']


do you understand differences between request.args and request.vars ?


*
*
*
*
*
*
*
*

-- 





Re: [web2py] Sending and Recieving JSON data...

2012-11-17 Thread Marin Pranjić
JSONRPC should be used if you want to implement RPC service but if you only
need to send json data, you can do it that way or another.

How would you send the data? Something that works in the background or
manually, from web browser?

Anyway, the issue can be how to do it on your mobile device (depends or
your needs), not the web2py as a server :)


On Sun, Nov 18, 2012 at 6:06 AM, Jason Brower  wrote:

> I have a mobile device that sends various data using json to a server.
> I would like this server to be web2py.
> How would I do this?
> Am I on the right track here?
> http://web2py.com/books/**default/chapter/29/10#JSONRPC
> Or am I looking in the wrong place.
> There will be a large amount of data sent.
> BR,
> Jason Brower
>
> --
>
>
>
>

-- 





[web2py] Sending and Recieving JSON data...

2012-11-17 Thread Jason Brower

I have a mobile device that sends various data using json to a server.
I would like this server to be web2py.
How would I do this?
Am I on the right track here?
http://web2py.com/books/default/chapter/29/10#JSONRPC
Or am I looking in the wrong place.
There will be a large amount of data sent.
BR,
Jason Brower

--





[web2py] Re: wxpython app using web2py username and password

2012-11-17 Thread Dave
Jim,

If your windows users are logging in via active directory you could just 
make your web2py app authenticate through ldap to AD.  That would ensure AD 
is your source of truth fo user authentication and management.

Just a thought.

On Thursday, November 15, 2012 12:32:03 PM UTC-5, Jim S wrote:
>
> Sounds like there is no easy way to do it.  I looked through that code and 
> it seems pretty involved.  I was hoping to do this without needing the 
> web2py libs and such.
>
> -Jim
>
> On Thursday, November 15, 2012 11:14:09 AM UTC-6, Niphlod wrote:
>>
>> https://github.com/web2py/web2py/blob/master/gluon/tools.py#L1776
>> that basically calls the validators attached by default to a password 
>> field 
>> https://github.com/web2py/web2py/blob/master/gluon/tools.py#L1479
>> i.e. you just have to import the validator CRYPT and check with that 
>> passing the correct parameters
>> https://github.com/web2py/web2py/blob/master/gluon/validators.py#L2659
>>
>> PS: CRYPT was easier to follow before the introduction of the pdfbk2 
>> algo, but it's quite straightforward if you are willing to cut off 
>> backward-compatibility
>>  (that required lazycrypt 
>> https://github.com/web2py/web2py/blob/master/gluon/validators.py#L2581)
>>
>>

-- 





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>