[web2py] Re: Plugin_JqGrid long-polling

2010-11-07 Thread AsmanCom
Can I include the var server_time in the vars=dict somehow? THX

[web2py] Re: Routes.py on GAE

2010-11-07 Thread Richard
I was having the same problem with robots.txt on GAE. Thanks for the tip Michael. Does anyone know a better way to do it? On Sep 17, 8:35 am, howesc wrote: > i have no idea myself, and got it working and so that's what i use. > if i ever try and run multiple web2py apps on the same app engine >

Re: [web2py] Re: Web2py Application Exhibition ( Version 2.0 )

2010-11-07 Thread Branko Vukelic
On Fri, Nov 5, 2010 at 11:50 AM, NetAdmin wrote: > Ramjee, > > Yes the app must be opensource. ( Like Web2py ) Frankly, I think including closed-source (binary even) apps would be better PR. You CAN use web2py to build them, so why not show them off? Not everyone is hot on open-source, despite th

Re: [web2py] Re: Routes.py on GAE

2010-11-07 Thread Boris Manojlovic
Hello, reason for those kind of problems is that GAE separates application code from static data. so if you try from application do level redirects it will fail with that cryptic message as it does not have direct access to files , workaround is to use special function in application that will do

[web2py] Re: Web2py Application Exhibition ( Version 2.0 )

2010-11-07 Thread NetAdmin
I'm not sure what the requirements are, but you could try getting your application listed on http://www.web2py.com/appliances There are many really nice applications listed there. Mr.NetAdmin

[web2py] Re: Web2py Application Exhibition ( Version 2.0 )

2010-11-07 Thread Stefaan Himpe
Frankly, I think including closed-source (binary even) apps would be better PR. You CAN use web2py to build them, so why not show them off? Can't closed-source applications already be shown off? I'm thinking about http://www.appliedstacks.com/PoweredBy/web2py I don't think it is our job to dete

[web2py] html mail broken on GAE

2010-11-07 Thread Richard
When trying to send HTML mail on GAE I get: >>> mail.send(message='message') False Mail.send failure:May not set empty value for 'body' >>> mail.send(message=('dummy content', html)) True

[web2py] Re: html mail broken on GAE

2010-11-07 Thread Richard
Seems the problem is GAE expects text to have content, even though it is not used: gluon/tools.py: elif message.strip().startswith(''): text=None html=message I have fixed that by setting text=message On Nov 8, 1:00 am, Richard wrote: > When trying to send HTML mail on

[web2py] Re: RFC

2010-11-07 Thread mr.freeze
I totally agree Kevin. From the Zen of Python: "There should be one-- and preferably only one --obvious way to do it." On Nov 6, 8:15 pm, Kevin wrote: > Systems get harder to learn when there are seemingly multiple ways to > do things.  It's not always clear that alternatives are really > optiona

[web2py] Re: Plugin_JqGrid long-polling

2010-11-07 Thread mr.freeze
Anything that is put in the vars dict of a URL will end up in request.vars when navigated to. For example: URL(vars=dict(server_time=request.now)) will be request.vars.server_time. Is that what you're asking? On Nov 7, 3:12 am, AsmanCom wrote: > Can I include the var server_time in the vars=dict

[web2py] Re: cSans CSS framework

2010-11-07 Thread Kevin
Very promising. Indeed, their simplification of floating, positioning, and alignment issues into a small set of classes makes cross-browser issues for all of the difficult stuff go away. It used to be easier to make something only FF compatible (only IE compatibility, even from the start, is still

Re: [web2py] Re: RFC

2010-11-07 Thread Branko Vukelic
On Sun, Nov 7, 2010 at 3:10 PM, mr.freeze wrote: > I totally agree Kevin. From the Zen of Python: "There should be one-- > and preferably only one --obvious way to do it." Zen of Python is best for quoting. I don't know any Python developer that hasn't broken at least one of the commandments (and

Re: [web2py] Re: cSans CSS framework

2010-11-07 Thread Branko Vukelic
I'm using it for web2py admin right now, and the buttons stuff is just too easy, too. I wish it supported features to ease styling of form elements (if such a thing is possible at all). On Sun, Nov 7, 2010 at 3:26 PM, Kevin wrote: > Very promising. Indeed, their simplification of floating, positi

[web2py] Re: SQLTABLE linkto

2010-11-07 Thread villas
> I think that's identical to: > SQLTABLE(rows, linkto=lambda rep,t,tn: URL(r=request, args=[rep])) Hi J, Yes you are right and that seems the best way to manipulate 'linkto' (for those not using 'represents'). Thanks! -D

[web2py] issue with list of validators

2010-11-07 Thread Marco Prosperi
hi all, still have problems with validators. Why a field defined so in db.py .. Field('myfield','string',requires=[IS_NOT_EMPTY(error_message=T('my custom message')),IS_IN_LIST(['first','second'])]), .. doesn't show a drop down list in a SQLFORM but shows 'my custom message' after submit if left

[web2py] Re: Different register procedures multiple databases.

2010-11-07 Thread mdipierro
On Nov 4, 3:26 am, annet wrote: > In an application I defined the following connection string and > tables: > > db = DAL('postgres://...) > > auth.settings.table_user = db.define_table('auth_user', >     Field(...), > > Field('company_id',db.company,default='',notnull=True,ondelete='CASCADE',wri

[web2py] Re: Interesting developments...

2010-11-07 Thread mdipierro
thought you may enjoy this discussion... http://www.reddit.com/r/Python/comments/e22ol/pyramid_is_a_small_fast_downtoearth_python_web/c14omr0 Massimo On Nov 7, 12:02 am, Luther Goh Lu Feng wrote: > On Nov 7, 5:55 am, Branko Vukelic wrote: > > > > > On Sat, Nov 6, 2010 at 10:41 PM, Anthony wr

[web2py] Re: issue with list of validators

2010-11-07 Thread mdipierro
requires=[IS_NOT_EMPTY(error_message=T('my custom message')),IS_IN_LIST(['first','second'])] should be just requires=IS_IN_LIST(['first','second']) if you require the value to be in a list, it cannot be empty. This will give you the dropdown. On Nov 7, 9:31 am, Marco Prosperi wrote: > hi all,

[web2py] Re: Different register procedures multiple databases.

2010-11-07 Thread annet
Massimo, Thanks, for taking the time to answer my questions. Now that I know it's possible, I'll take up building the two apps that each have different ways of access control. Kind regards, Annet

[web2py] GAE orderby reverse ID

2010-11-07 Thread MicLee
Hi, On GAE, .select(orderby=~db.table.id) is treated as .select(orderby=db.table.id) I think there are 2 parts in gql.py to be patched: In gql.py:Expression:__or__, the new Expression should be: return Expression((self.name if self.type!='id' else ('- __key__' if self.name.start

[web2py] example app that finds out recent fb public status

2010-11-07 Thread mdipierro
In * appengine * flask * web.py * juno * bottle * itty * django + web2py http://www.reddit.com/r/Python/comments/e2iik/comparing_python_web_micro_frameworks_writing_a/

Re: [web2py] Re: Difference Between JSONRPC vs .JSON?

2010-11-07 Thread Phyo Arkar
Ok Is there any detail example of all capabilities of jsonrpc ? Need i read RFC for JSONRPC? On 11/7/10, mdipierro wrote: > .json siply renders the returned dictionary as json > > jsonrpc is more like xmlrpc or soap. Both input and output follow a > strict rpc protocol and uses json for encoding.

[web2py] Re: GAE orderby reverse ID

2010-11-07 Thread mdipierro
Thank you good catch. On Nov 7, 10:56 am, MicLee wrote: > Hi, > > On GAE, >     .select(orderby=~db.table.id) > is treated as >     .select(orderby=db.table.id) > > I think there are 2 parts in gql.py to be patched: > > In gql.py:Expression:__or__, the new Expression should be: > >         return

[web2py] How to get session's Unique ID?

2010-11-07 Thread Phyo Arkar
A simple question.. I cannot find it anywhere.. How can i retrieve Session's unique Key?

[web2py] Re: How to get session's Unique ID?

2010-11-07 Thread mr.freeze
I believe it lives in response.session_id. On Nov 7, 11:50 am, Phyo Arkar wrote: > A simple question.. I cannot find it anywhere.. > > How can i retrieve Session's unique Key?

Re: [web2py] Re: How to get session's Unique ID?

2010-11-07 Thread Phyo Arkar
haha i was looking inside session and pulling my hairs out LOL , Thanks Mr.Freeze! Ajax requests also uses the same session key right? On 11/8/10, mr.freeze wrote: > I believe it lives in response.session_id. > > On Nov 7, 11:50 am, Phyo Arkar wrote: >> A simple question.. I cannot find it anywh

[web2py] Re: How to get session's Unique ID?

2010-11-07 Thread mr.freeze
That would be the logical place to look :) Yes to your question. On Nov 7, 11:58 am, Phyo Arkar wrote: > haha i was looking inside session and pulling my hairs out LOL , > Thanks Mr.Freeze! > Ajax requests also uses the same session key right? > > On 11/8/10, mr.freeze wrote: > > > I believe it

[web2py] Re: Difference Between JSONRPC vs .JSON?

2010-11-07 Thread mdipierro
there is a pyjamas example in the book. On Nov 7, 11:41 am, Phyo Arkar wrote: > Ok Is there any detail example of all capabilities of jsonrpc ? > Need i read RFC for JSONRPC? > > On 11/7/10, mdipierro wrote: > > > .json siply renders the returned dictionary as json > > > jsonrpc is more like xml

[web2py] Re: Date widget - calendar onUpdate function

2010-11-07 Thread villas
I was in fact hoping that there may be a better way than my suggestion. However, for those who wish to ponder this because it is a good example, I would mention the calendar callback is extremely useful for... * changing dates in other related date fields e.g. choosing a date range. * firing some

[web2py] Re: GAE orderby reverse ID

2010-11-07 Thread mdipierro
in trunk. Can you please check it is ok? On Nov 7, 10:56 am, MicLee wrote: > Hi, > > On GAE, >     .select(orderby=~db.table.id) > is treated as >     .select(orderby=db.table.id) > > I think there are 2 parts in gql.py to be patched: > > In gql.py:Expression:__or__, the new Expression should be:

[web2py] CLEANUP validator

2010-11-07 Thread villas
Hi All, I believe this is the correct way to remove leading and trailing spaces from strings. Q1. db.define_table('test', Field('name','string', requires=CLEANUP() ) ) But I need regex in there? Sorry I couldn't figure the solution :( Q2. So, at the moment I am doing this instead: if requ

[web2py] Re: Using DAL the web2py way

2010-11-07 Thread Eduardo
Thank you for your time, Massimo; obrigado pela ajuda, Bruno. Massimo, as for the way I posed the question, Ortega Y Gasset, the great Spanish philosopher, once wrote that "clarity is the courtesy of the philosopher". I strive for clarity! Anyone can greatly benefit from the study of analytical a

[web2py] Create an Image from webpage

2010-11-07 Thread Andrew Evans
Hello! I was wondering if anyone could recommend a method for creating an image from a web site using web2py. For example say someone enters a url in a form the script executes and grabs an image/screen shot of the web site entered in the form. Any ideas Cheers

Re: [web2py] Create an Image from webpage

2010-11-07 Thread Branko Vukelic
On Sun, Nov 7, 2010 at 10:20 PM, Andrew Evans wrote: > Hello! > > I was wondering if anyone could recommend a method for creating an image > from a web site using web2py. > > For example say someone enters a url in a form the script executes and grabs > an image/screen shot of the web site entered

[web2py] Upload form in web2py component

2010-11-07 Thread Luther Goh Lu Feng
I have an upload form that is rendered in a web2py component view. Unfortunately this does not work likely because of the limitations of javascript as suggested here: http://groups.google.com/group/web2py/msg/e7f6ce0a87aaf92b I believe this is still valid but am more than happy to be proven wrong.

[web2py] Re: Create an Image from webpage

2010-11-07 Thread villas
Myabe this doesn't answer your question, but have you seen services like this? http://www.thumbalizr.com/ I believe you can get an API key to access the service programatically. On Nov 7, 9:20 pm, Andrew Evans wrote: > Hello! > > I was wondering if anyone could recommend a method for creating an

[web2py] Re: issue with list of validators

2010-11-07 Thread Marco Prosperi
thank you, but is there any hook to customize the error message if I don't choose an item (sorry, it was IS_IN_SET, not IS_IN_LIST)? On 7 Nov, 17:30, mdipierro wrote: > requires=[IS_NOT_EMPTY(error_message=T('my > custom message')),IS_IN_LIST(['first','second'])] > > should be just > > requires

[web2py] Re: Upload form in web2py component

2010-11-07 Thread Luther Goh Lu Feng
Just found this http://groups.google.com/group/web2py/browse_thread/thread/9c57e74da996303e/61df7879ee1236f7?lnk=gst&q=upload+return#61df7879ee1236f7 On Nov 8, 5:43 am, Luther Goh Lu Feng wrote: > I have an upload form that is rendered in a web2py component view. > Unfortunately this does not wor

[web2py] Obtaining the download url of uploaded files

2010-11-07 Thread Luther Goh Lu Feng
I have a simple table that holds uploaded images db.define_table('image', Field('image', 'upload', notnull=True), ) I would like to obtain the download url for uploaded images. How can I obtain that in the action, and then render it in t

[web2py] Re: issue with list of validators

2010-11-07 Thread mdipierro
No. there is a single error_message On Nov 7, 4:00 pm, Marco Prosperi wrote: > thank you, but is there any hook to customize the error message if I > don't choose an item (sorry, it was IS_IN_SET, not IS_IN_LIST)? > > On 7 Nov, 17:30, mdipierro wrote: > > > requires=[IS_NOT_EMPTY(error_message=T

Re: [web2py] Re: Upload form in web2py component

2010-11-07 Thread Dr Schmulge
Its work http://www.web2pyslices.com/main/slices/take_slice/103 2010/11/8 Luther Goh Lu Feng : > Just found this > http://groups.google.com/group/web2py/browse_thread/thread/9c57e74da996303e/61df7879ee1236f7?lnk=gst&q=upload+return#61df7879ee1236f7 > > On Nov 8, 5:43 am, Luther Goh Lu Feng wrote:

Re: [web2py] Re: Interesting developments...

2010-11-07 Thread Branko Vukelic
On Sun, Nov 7, 2010 at 5:20 PM, mdipierro wrote: > thought you may enjoy this discussion... > > http://www.reddit.com/r/Python/comments/e22ol/pyramid_is_a_small_fast_downtoearth_python_web/c14omr0 Discussion about the "MV" framework was really interesting, though. And Massimo is absolutely right

[web2py] Re: Help with picture default

2010-11-07 Thread CesarBustios
Thanks a lot! I'll try both :) On Nov 6, 3:25 pm, Branko Vukelic wrote: > On Sat, Nov 6, 2010 at 7:32 AM, CesarBustios wrote: > > Hi, please in my database i have an 'upload' type Field and i want to > > make some picture ('pic.jpg') the default picture when the form load, > > how can i do that?

[web2py] Password Field it's not encrypting :(

2010-11-07 Thread CesarBustios
Hi! I wrote the following: db.define_table('User', Field(...), Field(...), Field('pass', 'password', requires=IS_NOT_EMPTY(error_message='Campo obligatorio'), label='Contraseña')) But when i look at the inserted row the passw

[web2py] Re: Password Field it's not encrypting :(

2010-11-07 Thread mr.freeze
There is a validator called CRYPT that will do it for you. http://web2py.com/book/default/docstring/CRYPT On Nov 7, 4:32 pm, CesarBustios wrote: > Hi! I wrote the following: > > db.define_table('User', >                         Field(...), >                         Field(...), >                  

Re: [web2py] Re: Interesting developments...

2010-11-07 Thread rochacbruno
I am a Pylons user too, at our company the main product is made with Pylons. We had extra work migrating from 0.9 to Pylons 1.0 because they broke compatibility. After all the months of work, we are now lost with this new change. Even creators saying that Pylons API will be always there, wha

[web2py] Re: Obtaining the download url of uploaded files

2010-11-07 Thread mr.freeze
Given this model: db.define_table('pics',Field('image','upload')) And this controller: def index(): form = SQLFORM(db.pics) if form.accepts(request.vars,session): response.flash = form.vars.image return dict(form=form) The file name of the uploaded file will be in form.vars.im

[web2py] Re: Password Field it's not encrypting :(

2010-11-07 Thread CesarBustios
Thank you mr.freeze i'll try that! On Nov 7, 6:54 pm, "mr.freeze" wrote: > There is a validator called CRYPT that will do it for > you.http://web2py.com/book/default/docstring/CRYPT > > On Nov 7, 4:32 pm, CesarBustios wrote: > > > > > > > > > Hi! I wrote the following: > > > db.define_table('Us

Re: [web2py] RFC: Why web2py rocks

2010-11-07 Thread Bruno Rocha
Nice! great work! I think you should mention the web2py community. Also, Important thing is that web2py can run on every O.S, and even in Jython, Another important thing is the fact that web2py rns very well on Google App Engine and Amazon. The web2py template system is another key-feature, and

[web2py] Re: CLEANUP validator

2010-11-07 Thread Niphlod
Hi, the method is correct, in the sense that CLEANUP() actually removes leading and trailing space. You should use .strip() only if you need to "preserve" special characters in the field. Actually CLEANUP removes any special character and newlines from the field (it applies the regex "[^ \n\w]" and

[web2py] Re: RFC: Why web2py rocks

2010-11-07 Thread mdipierro
I really like. About the 80 objects to get started. I just counted them again. I would say 13 objects + 31 validators + 60 helpers (which map 1-1 to HTML tags) + 3 tools (Auth, Crud, Service). The 13 objects are request response session cache T redirect DAL Field SQLFORM SQLTABLE LOAD local_imp

[web2py] Re: RFC: Why web2py rocks

2010-11-07 Thread mdipierro
I forgot URL and XML which technically are a helpers. So request response session cache T redirect DAL Field SQLFORM SQLTABLE XML URL adds up to 12. On Nov 7, 8:37 pm, mdipierro wrote: > I really like. About the 80 objects to get started. > > I just counted them again. I would say 13 objects +

[web2py] Re: RFC: Why web2py rocks

2010-11-07 Thread luismurciano
Theres a typo in full-stack section its says "pick trhough" instead "pick through" great jobs anyways!

[web2py] Selecting from dropdown using Ajax

2010-11-07 Thread oneroler
I'm trying to learn to use the ajax functionality and am having trouble getting it to work correctly. I am trying to use a dropdown of firms to show the related strategies. Currently this doesn't return anything to the div, but I do know that the onchange is working. It seems like the request.va

[web2py] Re: RFC: Why web2py rocks

2010-11-07 Thread Anthony
Very cool, Branko. And good suggestions, Bruno, especially mentioning the community and great support. A few other distinctives: - web2py is built for security - very active development - constant stream of enhancements/ improvements - plugin_wiki Regarding Rocket, although I suppose it is "produ

[web2py] Re: Password Field it's not encrypting :(

2010-11-07 Thread CesarBustios
It works just fine! :D On Nov 7, 8:03 pm, CesarBustios wrote: > Thank you mr.freeze i'll try that! > > On Nov 7, 6:54 pm, "mr.freeze" wrote: > > > > > > > > > There is a validator called CRYPT that will do it for > > you.http://web2py.com/book/default/docstring/CRYPT > > > On Nov 7, 4:32 pm, Ce

[web2py] Re: Learning Management System survey

2010-11-07 Thread noel
what do you think about google cloudcourse? On Nov 5, 9:09 pm, Tom Atkins wrote: > I can volunteer time and input for the LMS idea.  I'm not experienced enough > with Python and web2py yet to contribute good code but can help with > frontend UI, design, jQuery and documentation. > > Assuming the

[web2py] Re: Learning Management System survey

2010-11-07 Thread mdipierro
At my school we have two systems: 1) peoplesoft (PS) which we use to manage accounting and class enrollments 2) the learning management system (LMS) The LMS gets enrollments from PS. This is because enrollments must be tied to accounting. There are rules on how students are billed, drop dates wi

[web2py] Re: Plugin_JqGrid long-polling

2010-11-07 Thread AsmanCom
THX mr.freeze Yeah request.vars, but the vars=dict is already set in "callback =", how can I add the Javascript var to the vars=dict? On loadComplete: I set the server_time var("last successful relaod") and * 1000..after 1 seconds * the ReloadGrid calls the URL with the included server_time var,

Re: [web2py] Re: RFC: Why web2py rocks

2010-11-07 Thread Branko Vukelic
Thanks everyone for the input. I'll revise, and then post it here tonite. :) On Mon, Nov 8, 2010 at 4:44 AM, Anthony wrote: > Very cool, Branko. And good suggestions, Bruno, especially mentioning > the community and great support. > > A few other distinctives: > - web2py is built for security > -