[web2py] Re: web2ruby possible?

2011-09-11 Thread dustin.b
1+ vote for node.js ;)

On 11 Sep., 21:14, David Marko  wrote:
> Or to node.js :-)


[web2py] Re: Time to relax, off topic - Simple IQ Testing.

2010-12-04 Thread dustin.b
took me a while to find my calculator(behind my desk) cuz im not that
bright at mental math ... til ...  i realized im sitting in front of
one .. doohh  did that indicate my intelligence ? :D 'hope not! :)

did python(usage) indicate some kind of intelligence? i hear employers
like that kind of skill, even they seach for java(etc. ) coders :)


[web2py] Re: amfrpc problem

2010-12-01 Thread dustin.b
thx for the quick answer!

on the clintside i have the same error message. i forgot to mention
the w2p ticket

with amfrpc:
Traceback (most recent call last):
  File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon
\restricted.py", line 188, in restricted
exec ccode in environment
  File "D:/DEV/python/web2py/1_89_5/web2py_src/web2py/applications/
FlashSoldat_Server/controllers/default.py", line 63, in 
  File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon
\globals.py", line 96, in 
self._caller = lambda f: f()
  File "D:/DEV/python/web2py/1_89_5/web2py_src/web2py/applications/
FlashSoldat_Server/controllers/default.py", line 61, in call
return service()
  File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon\tools.py",
line 3647, in __call__
return self.serve_amfrpc()
  File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon\tools.py",
line 3520, in serve_amfrpc
context = pyamf.get_context(pyamf.AMF0)
AttributeError: 'module' object has no attribute 'get_context'

amfrpc3:
Traceback (most recent call last):
  File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon
\restricted.py", line 188, in restricted
exec ccode in environment
  File "D:/DEV/python/web2py/1_89_5/web2py_src/web2py/applications/
FlashSoldat_Server/controllers/default.py", line 63, in 
  File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon
\globals.py", line 96, in 
self._caller = lambda f: f()
  File "D:/DEV/python/web2py/1_89_5/web2py_src/web2py/applications/
FlashSoldat_Server/controllers/default.py", line 61, in call
return service()
  File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon\tools.py",
line 3649, in __call__
return self.serve_amfrpc(3)
  File "D:\DEV\python\web2py\1_89_5\web2py_src\web2py\gluon\tools.py",
line 3523, in serve_amfrpc
pyamf_request.clientType)
AttributeError: 'Envelope' object has no attribute 'clientType'


last but not least, what is the meaning of 'domain' in
@service.amfrpc3('domain') in contrast to the one with amfrpc, i
thought its some kind of renaming the function.

On 2 Dez., 00:15, mdipierro  wrote:
> Try use amf3
>
> @service.amfrpc3('domain')
> def service1():
>     return "test"
>
> and
>
> gateway.connect("http://127.0.0.1:8000/FlashSoldat_Server/default/call/
> amfrpc3/");
>
> gateway.connect("http://127.0.0.1:8000/FlashSoldat_Server/default/
> call/amfrpc/");
> On Dec 1, 4:55 pm, "dustin.b"  wrote:
>
>
>
>
>
>
>
> > hi,
> > im stuck in getting flash to work with (web2py) amfrpc. i must confess
> > that i am very limited in my flash knowledge so far.
>
> > i tryed the sample from the book and getting into "import" problems. i
> > think this is related to the flash version. im using flash cs5 and
> > flashdevelop .. with as3.
>
> > i installed pyamf so there is no "missing lib warning" if i invoke the
> > call/amfrpc (3) ; and running w2p from source. im a little confused
> > with the libs an the flash/flex side ... the only version i found
> > which is not causing "import errors" is the following
>
> > public class Main extends MovieClip
> >         {
>
> >                 public function Main() {
>
> >                         var gateway:NetConnection = new NetConnection();
> >                         gateway.addEventListener(NetStatusEvent.NET_STATUS  
> > ,
> > gateway_status);
> >                         
> > gateway.connect("http://127.0.0.1:8000/FlashSoldat_Server/default/
> > call/amfrpc/");
> >                         var resp:Responder = new Responder(show_results, 
> > on_fault);
> >                         gateway.call("service1", resp);
>
> >                         trace("main started");
> >                         stage.stageWidth = 100;
> >                         stage.stageHeight = 100;
>
> >                         var textlabel:TextField = new TextField();
> >                         textlabel.x = (stage.stageWidth - textlabel.width) 
> > / 2;
> >                         textlabel.y = (stage.stageHeight - 
> > textlabel.height) / 2;
>
> >                         textlabel.text = "flex hello wold!";
>
> >                         addChild(textlabel);
> >                 }
>
> >                 private function gateway_status(event:NetStatusEvent):void {
>
> >                         trace("Level 0: "+event.info.level+" Code: 
> > "+event.info.code);
> >                    if 

[web2py] amfrpc problem

2010-12-01 Thread dustin.b
hi,
im stuck in getting flash to work with (web2py) amfrpc. i must confess
that i am very limited in my flash knowledge so far.

i tryed the sample from the book and getting into "import" problems. i
think this is related to the flash version. im using flash cs5 and
flashdevelop .. with as3.

i installed pyamf so there is no "missing lib warning" if i invoke the
call/amfrpc (3) ; and running w2p from source. im a little confused
with the libs an the flash/flex side ... the only version i found
which is not causing "import errors" is the following


public class Main extends MovieClip
{

public function Main() {

var gateway:NetConnection = new NetConnection();
gateway.addEventListener(NetStatusEvent.NET_STATUS  ,
gateway_status);

gateway.connect("http://127.0.0.1:8000/FlashSoldat_Server/default/
call/amfrpc/");
var resp:Responder = new Responder(show_results, 
on_fault);
gateway.call("service1", resp);

trace("main started");
stage.stageWidth = 100;
stage.stageHeight = 100;

var textlabel:TextField = new TextField();
textlabel.x = (stage.stageWidth - textlabel.width) / 2;
textlabel.y = (stage.stageHeight - textlabel.height) / 
2;

textlabel.text = "flex hello wold!";

addChild(textlabel);
}

private function gateway_status(event:NetStatusEvent):void {

trace("Level 0: "+event.info.level+" Code: 
"+event.info.code);
   if (event.info.code == "NetConnection.Connect.Success") {
  trace("--- connected to: " + "hier");
   }
}

private function show_results(event:ResultEvent):void
{
trace(event.result.toString());
}

private function on_fault(event:FaultEvent):void
{
trace(event.fault.message);
}


}

}


on w2p side there is

@service.amfrpc
def service1():
return "test"

in the default controller.

every time i try to connect i get a "Level 0: error Code:
NetConnection.Call.Failed
" from my gateway_status handler

what am i doing wrong?


[web2py] Re: Vote for a new logo

2010-10-15 Thread dustin.b
why is the deadline so early? i really want to post some logos, but it
was not possible to really think about some designs and finally create
some..


[web2py] Re: running web2py on Android?

2010-10-15 Thread dustin.b


i tried to run w2p on android with ASE (android scripting env). It's
been a while since I tried this but i can remember that there was a
problem with threads or something like this. w2p seems to use python
packages that are not avaible on android, didnt remember exactly which
one.



[web2py] Re: welcome app normalize hack ie and html5 ready

2010-09-24 Thread dustin.b
hi, i followed your topic and your work is pleasing to the eye :)
thx for that!

but i also agree with the others about that menu gray visited links
thing.



[web2py] contribute de-de (german) language file

2010-09-24 Thread dustin.b
i only wanna know if there is an interest for a german (admin)
language file?

for a little project i am doing with w2p (a mockup prototype) it is
necessary to translate and change the admin interface. i am almost
done and wonder if it is somehow useful ? (after clearing to be useful
to a normal/unchanged w2p)

its based on the spanish translation. btw i think i've found some
texts which are not modifiable/translatable cuz there is no use of T()
but plain text (thats from my memory i investigate this more accurate
if im at home ) ... But that's another story

suggestions?


[web2py] upgrade from 1.84.1 to 1.85.3 fails due to the following error ..

2010-09-20 Thread dustin.b
hi i simply upgraded from 1.84.1 to 1.85.1 and get a ticket. i
narrowed down the issue to this:

db.py


auth.settings.hmac_key = 'sha512:97655ab8-04d0-4321-
b8fa-84f525fb8fe0'   # before define_tables()

db.define_table(
auth.settings.table_user_name,
Field('username', length=128, default='', unique=True),

Field('password', 'password', length=512,
  readable=False, label='Password'),
Field('registration_key', length=512,
  writable=False, readable=False, default=''),
Field('reset_password_key', length=512,
  writable=False, readable=False, default=''),
Field('registration_id', length=512,
  writable=False, readable=False, default=''))

custom_auth_table = db[auth.settings.table_user_name] # get the
custom_auth_table
custom_auth_table.username.requires =
IS_NOT_EMPTY(error_message=auth.messages.is_empty)

#custom_auth_table.password.requires = [IS_STRONG(), CRYPT()]

auth.settings.table_user = custom_auth_table # tell auth to use
custom_auth_tabl

auth.define_tables()   # creates all needed
tables
.

test.py (controller)

def myLogin():

username = "peter"
password = "pass"

user = auth.login_bare(username, password)
if not user:
return "failed"
else:
return "ok"
...

by invoking the test controllers myLogin function i get :

Traceback (most recent call last):
  File "D:\DEV\python\web2py\stable\web2py_src\web2py\gluon
\restricted.py", line 188, in restricted
exec ccode in environment
  File "D:/DEV/python/web2py/stable/web2py_src/web2py/applications/
error/controllers/test.py", line 23, in 
  File "D:\DEV\python\web2py\stable\web2py_src\web2py\gluon
\globals.py", line 96, in 
self._caller = lambda f: f()
  File "D:/DEV/python/web2py/stable/web2py_src/web2py/applications/
error/controllers/test.py", line 15, in iphoneLogin
user = auth.login_bare(username, password)
  File "D:\DEV\python\web2py\stable\web2py_src\web2py\gluon\tools.py",
line 1306, in login_bare
user = self.db(table_user[userfield] == username).select().first()
UnboundLocalError: local variable 'userfield' referenced before
assignment

in:

 def login_bare(self, username, password):
..
elif 'username' in table_user.fields:
userfield = 'username'
else:
userfield = 'email'
passfield = self.settings.password_field
user = self.db(table_user[userfield] ==
username).select().first() < local variable 'userfield'
referenced before assignment

password = table_user[passfield].validate(password)[0]
if user:
if not user.registration_key and user[passfield] ==
password:
user = Storage(table_user._filter_fields(user,
id=True))

seems to be there is no userfield 'username' anyhow?

interestingly it works with 1.84.1 as expected

for testing here the project if your interested:
http://rapidshare.com/files/420164051/web2py.app.error.w2p


[web2py] custom validator _and in IS_IN_DB doesn't get called

2010-09-15 Thread dustin.b
hi my secound stupid beginner question but i cant get behind it.

i have a list:ref.. to choose multiple values but i need it to be not
empty. the problem when i use the IS_NOT_EMPTY validator is that the
field is not empty but "||" for an empty list i think (thats what i
have in database in this case)

so i started to write my own Validator and check against that. this
isnt my first validator , but this time i doesn't work as i exspect.
every time i submit the form only "INIT IS_NOT_EMPTY_LIST" is printet
out .. but no "CALL IS_NOT_EMPTY_LIST" .. as in my other validators.

if there is an other way around checking empty lists this would be
also fine ..

here's the code

class IS_NOT_EMPTY_LIST(object):
def __init__(self, unused, error_message='failed ..'):
self.unused = unused
self.error_message = error_message
print "INIT IS_NOT_EMPTY_LIST"
def __call__(self, value):
print "CALL IS_NOT_EMPTY_LIST"
try:
if value == "||" and value == "":
return (value, self.error_message)
else:
return (value, None)
except:
return (value, self.error_message)

db.define_table('element', Field('name'))

db.define_table('data', Field('name', 'string'),
Field('elements','list:reference element' ))

db.data.elements.requires = IS_IN_DB(db,'element.id',multiple=True,
_and=IS_NOT_EMPTY_LIST(None, error_message='foo'))


[web2py] Re: value in list:string not "preselected" when updating

2010-09-14 Thread dustin.b
thanks for the quick answer! this works as i expected it to work! i
only want one option to be selectable

but what intention is behind it to not insert the value if one use my
kind of table definition?
is it simply wrong what i typed in and w2p was so kind to ignore my
fault and try its best
in showing it nevertheless.




[web2py] value in list:string not "preselected" when updating

2010-09-14 Thread dustin.b
hi i am new to w2p and a few days ago i came across w2p and simply
want to test it. i came from javaEE and i must say 2 days later i am
addicted to w2p :D

to my question and i hope its not that stupid but i cant find a simple
solution or a way the developers meant to.

db.define_table('data',
Field('name', 'string'),
Field('status', 'list:string',
requires=IS_IN_SET(('solved','pending')))
)

this is my model. i inserted data without any problem, but when i try
to update that data (with  database administration in appadmin), crud
or sqlform the value in status is not preselected. i have to choose
one of these to get a valid form. but this is a problem. if i want to
update a the name (or in real case more other values) i have to choose
the status ( hopefully i can remember that value ) even if i only want
to change the name an not the status. if the status where preselected
there where no problem in only chaning the name.

hopfully i could point out my problem. is there something that i
missed?

regards ..