Re: [web2py] Re: Mobile and Tablets detection

2013-07-17 Thread Angelo Compagnucci
Hi Marcio, I'm planning to grow the supported mobile devices list in web2py, but the support right now is fairly extensive. I got the user agent strings here http://www.useragentstring.com/pages/Mobile%20Browserlist/ and added at least one of the devices for each family to the unit test of gluon/c

[web2py] Implementing the download action in the manual's "images" tutorial application

2013-07-17 Thread REM
Hello, folks. I started back at the top of the manual again and I am understanding much more by progressing slowly and with copious notes. So far, so good. However, I have come across a bit of a puzzling issue with the latter part of the "images" tutorial. After creating the dbases, uploading

[web2py] Re: Mobile and Tablets detection

2013-07-17 Thread Niphlod
ok, you're fond of that php library. But did you take a closer look to what you have right in web2py using request.user_agent() ? web2py uses gluon/contrib/user_agent_parser.py to fill up those fields and it does the exact same thing! Il giorno giovedì 18 luglio 2013 01:05:11 UTC+2, Marcio A

[web2py] Crash Course in web2py. I get this error, but I can't fix it

2013-07-17 Thread jayvandal
I am tryin Form part 3 Crash Course iinweb2py. I get this error, but I can't fix it failed to compile file because: SyntaxError at line 1 at char 21 invalid syntax (C:/web2py/applications/form/views/display_your_form.py, line 1) × Editing file "form/views/ next line is line 1 {{extend 'layout.ht

[web2py] Re: Deadlock found when trying to get lock; try restarting transaction

2013-07-17 Thread vince
actually yes i just need a way to handle this error myself. see the above for the error message i attached, the sample from you didn't work. On Thursday, July 18, 2013 6:56:27 AM UTC+8, Alan Etkin wrote: > > those ticket don't come with request/session info, we have no idea where >> and when di

[web2py] What is the syntax problem with this autocomplete widget statement?

2013-07-17 Thread Alex Glaros
The error is that the field stays blank and doesn't display any choices. ## - db.define_table('ObjectSuperType', ## Lookup table Field('objectDisplayName','string', label='Object Name'), format='%(objectDisplayName)s') ## - db.d

[web2py] Re: How do I pass a query object to a different controller?

2013-07-17 Thread Sarbjit singh
Thanks guys for the help. I followed the approach as suggested by Massimo, so I did the following : @auth.requires_login() def search2(): form,results = dynamic_search(db.customer) if form.process().accepted: session.results = results redirect(URL('results')) return

Re: [web2py] Inject HTML in field definition

2013-07-17 Thread Woody
Ok, here's the format for my select and table creation: In the controller: rows = db_mydb(db_mydb.my_table).select() fields = db_mydb.my_table.fields headers = [list of headers] table = TABLE(THEAD(TR(*[B(header) for header in headers])), TBODY(*[TR(*[TD(row[field]) for fie

Re: [web2py] Inject HTML in field definition

2013-07-17 Thread Richard Vézina
Can you show us you select and the way you make your table and view? Richard On Wed, Jul 17, 2013 at 11:02 PM, Woody wrote: > I don't see 'This is a test'. The table looks exactly the same as it does > without the represent statement. > > It doesn't matter what I put in the represent statemen

[web2py] Inner join and left join in a many to many relationship

2013-07-17 Thread Mark Li
I have an intermediate table representing a many to many relationship between users and songs. Users can like/dislike many songs, and songs can be liked/disliked by many users. I am trying to retrieve a list of 30 songs, that can be any songs except for songs that have been disliked by the user

Re: [web2py] Inject HTML in field definition

2013-07-17 Thread Woody
I don't see 'This is a test'. The table looks exactly the same as it does without the represent statement. It doesn't matter what I put in the represent statement, If I have: db_mydb.my_table.location.represent=lambda location,row: XML(T('This is a test')) 'This is a test' doesn't appear in t

Re: [web2py] Re: Crud.update returning none

2013-07-17 Thread Karel Antonio Verdecia Ortiz
I think you forgot to return locals: def project_edit(): project = db.projects.request.args(0) form = crud.update(db.projects, project , next='projects') *return locals()* def user_edit(): user = db.users(request.args(0)) form = crud.update(db.users, user, next = 'users') *return

[web2py] Re: Micro-framework performance vs Web2py?

2013-07-17 Thread Tim Richardson
I guess it's an obvious point, but you also need to consider developer productivity (which is the reason we code in Python and not assembly). It's almost miraculous what one can do with web2py and a couple of hours. -- --- You received this message because you are subscribed to the Google Gr

Re: [web2py] Inject HTML in field definition

2013-07-17 Thread Richard Vézina
I don't understand... Do you see : This is a test ?? You don't need XML() for use a simple T(), XML serve to escape special caracter and accentuated one, at least that my understanding. And of course there will be not change (all your value will be represent with : This is a test, since you don't t

[web2py] Re: Mobile and Tablets detection

2013-07-17 Thread Marcio Andrey Oliveira
Hi. Thank you for replying. I really don't know all user agents and I prefer to rely on a library that automatically detects whether the users is browsing from a regular computer, a mobile or a tablet. The greatest benefit (IMHO) from mobiledetect is that it's regularly updated to incorporate

[web2py] Re: Deadlock found when trying to get lock; try restarting transaction

2013-07-17 Thread Alan Etkin
> > those ticket don't come with request/session info, we have no idea where > and when did this problem occur. does that mean that web2py already handle > the retry? > AFAIK, web2py does not retry db I/O commands. The tickets are created when the request generates an uncaught exception (in y

Re: [web2py] Inject HTML in field definition

2013-07-17 Thread Woody
'represent' is not working for me. Here's my code: --- db_mydb.define_table('my_table', Field('ROWID', 'id'), Field('location', 'string'), Field('other_field', 'string'), migrate=False) db_mydb.my_table.location.

[web2py] Re: Mobile and Tablets detection

2013-07-17 Thread Niphlod
whoops. request.user_agent() On Wednesday, July 17, 2013 11:50:10 PM UTC+2, Niphlod wrote: > > because response.user_agent doesn't work for you ? > > On Wednesday, July 17, 2013 8:12:47 PM UTC+2, Marcio Andrey Oliveira wrote: >> >> Hi. >> >> I'm wondering whether exists a python project that detec

[web2py] Re: Mobile and Tablets detection

2013-07-17 Thread Niphlod
because response.user_agent doesn't work for you ? On Wednesday, July 17, 2013 8:12:47 PM UTC+2, Marcio Andrey Oliveira wrote: > > Hi. > > I'm wondering whether exists a python project that detect mobiles and > tables that be as good and as up to date as http://mobiledetect.net/ > > Thanks. > --

[web2py] Re: Function for downloading files

2013-07-17 Thread lesssugar
Thanks Alan! On Wednesday, July 17, 2013 10:05:14 PM UTC+2, Alan Etkin wrote: > > >> def download_file(): >> file = db(db.files.user_id == int(request.args(0))).select() >> for f in file: >> name = f.name >> return response.download(name,db) >> >> I think that the call to download should be respo

[web2py] Re: Deadlock found when trying to get lock; try restarting transaction

2013-07-17 Thread Niphlod
ehm, sorry. are you blaming web2py or the galera cluster ? web2py doesn't do anything special unless sending SQL queries down the pipe. If your galera cluster goes into deadlocks executing queries, fix the cluster ^_^ -- --- You received this message because you are subscribed to the Google G

[web2py] Re: Deadlock found when trying to get lock; try restarting transaction

2013-07-17 Thread vince
i am using mariadb galera cluster and we did not implement any locking. been testing this cluster for long and it will return locking error during node lag. heres the error i got. Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. Traceback (most recent call last): File "/home/web2

[web2py] Re: Relative links inside builtin wiki pages

2013-07-17 Thread peibol
Thanks! But... then is no way to escape the markmin in the wiki pages to embed some python code or javascript? Now I'm thinking for example to load some google chart images (javascript). Perhaps I shouldn't wikify my app and remain in multiple views, so they allow everything. However, I'd lose

[web2py] Re: Function for downloading files

2013-07-17 Thread Alan Etkin
> > > def download_file(): > file = db(db.files.user_id == int(request.args(0))).select() > for f in file: > name = f.name > return response.download(name,db) > > I think that the call to download should be response.download(request, db) and you could customize the request args so the method get

[web2py] Re: Crud.update returning none

2013-07-17 Thread Alan Etkin
def project_edit(): project = db.projects.request.args(0) print project form = crud.update(db.projects, project , next='projects') def user_edit(): user = db.users(request.args(0)) print user form = crud.update(db.users, user, next = 'users') Try this new functions an

[web2py] Re: Relative links inside builtin wiki pages

2013-07-17 Thread dhmorgan
you can, in your controller, call auth.wiki() with your needed variables: return auth.wiki(env=dict(host=lambda h:request.env.http_host,islocal= lambda l:request.is_local) and in the wiki page body, use @{host:} to construct your link: [[ @{host:/someapp/some/path} ]] this works for me

Re: [web2py] Inject HTML in field definition

2013-07-17 Thread Richard Vézina
represent!! represent=lambda value, row: XML(...) if value is not None else T('N/A') Richard On Wed, Jul 17, 2013 at 3:24 PM, Woody wrote: > I have a table definition that uses virtual fields with XML: > > db_mydb.define_table('my_table', > Field('ROWID', 'id'), >

Re: [web2py] web2py roadmap

2013-07-17 Thread Niphlod
try on the extended one https://trello.com/b/d3aqBbBl/web2py-roadmap On Wednesday, July 17, 2013 9:06:16 PM UTC+2, greaneym wrote: > > Hi, > > I get a blank screen also on that url link. > > margaret > > On Tuesday, July 16, 2013 11:10:32 AM UTC-5, jjs0sbw wrote: >> >> I get a blank screen??? >>

[web2py] Re: How do I pass a query object to a different controller?

2013-07-17 Thread Dmitri Husti
Hi, Is it possible to pass the request vars and call the function dynamic_search twice? redirect(URL("test",vars=request.vars)) Am Mittwoch, 17. Juli 2013 18:46:07 UTC+2 schrieb Massimo Di Pierro: > > You can store the results in session then. > > session.rows = db(...).select() > > Passing to

[web2py] Inject HTML in field definition

2013-07-17 Thread Woody
I have a table definition that uses virtual fields with XML: db_mydb.define_table('my_table', Field('ROWID', 'id'), Field('location', 'string'), Field('description', 'string', required=False), Field.Virtual('description_formatted', la

Re: [web2py] web2py roadmap

2013-07-17 Thread greaneym
Hi, I get a blank screen also on that url link. margaret On Tuesday, July 16, 2013 11:10:32 AM UTC-5, jjs0sbw wrote: > > I get a blank screen??? > > > On Sun, Jul 14, 2013 at 1:30 PM, Niphlod >wrote: > >> web2py's developers work often "behind the curtain" and users are not >> able to see what

[web2py] Crud.update returning none

2013-07-17 Thread gkuffel22
Hi Everyone, I am brand new to web2py and I am definitely still learning. I am trying to build a simple application that allows me store, edit, and delete projects and users. I have made some progress but when I cannot get the method crud.update to function as expected. I have pasted my code be

[web2py] Re: Is there an issue with my web2py install? "can't pickle function objects"

2013-07-17 Thread Joe Magaro
Hi Mossimo - Where would I look for this? I haven't done sessions in my apps yet, but maybe one of the projects I loaded might have. Also, why would an app affect the admin site? On Tuesday, July 16, 2013 10:44:46 PM UTC-4, Joe Magaro wrote: > Hi, Lately when I'm in the admin section, when I

[web2py] Re: better calendar.js?

2013-07-17 Thread Annet
I had a look at the datetime picker, I miss the month and year menus and the week of the year. Furthermore I find the display of dates in other months distracting, the styling could be a bit more calendar like. Kind regards, Annet. -- --- You received this message because you are subscrib

[web2py] Mobile and Tablets detection

2013-07-17 Thread Marcio Andrey Oliveira
Hi. I'm wondering whether exists a python project that detect mobiles and tables that be as good and as up to date as http://mobiledetect.net/ Thanks. -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and st

[web2py] Re: Micro-framework performance vs Web2py?

2013-07-17 Thread greenpoise
Excellent.. Thanks On Wednesday, July 17, 2013 9:27:28 AM UTC-7, greenpoise wrote: > > Total ignorant question here but is there any difference at all between > these two in terms of performance? Any experiences from users out there? > > -- --- You received this message because you are subsc

[web2py] Re: is there a way for user to populate a field using a wildcard search for "requires = IS_IN_DB"?

2013-07-17 Thread Derek
also check out these: http://dev.s-cubism.com/web2py_plugins On Wednesday, July 17, 2013 10:40:10 AM UTC-7, Derek wrote: > > Try the builtin autocomplete widget... > > http://web2py.com/book/default/chapter/07#Autocomplete-widget > > > On Wednesday, July 17, 2013 10:30:06 AM UTC-7, Alex Glaros wro

[web2py] Re: is there a way for user to populate a field using a wildcard search for "requires = IS_IN_DB"?

2013-07-17 Thread Derek
Try the builtin autocomplete widget... http://web2py.com/book/default/chapter/07#Autocomplete-widget On Wednesday, July 17, 2013 10:30:06 AM UTC-7, Alex Glaros wrote: > > There will be thousands of records to choose from, so a dropdown selection > list would be inconvenient. > > By wildcard sea

[web2py] is there a way for user to populate a field using a wildcard search for "requires = IS_IN_DB"?

2013-07-17 Thread Alex Glaros
There will be thousands of records to choose from, so a dropdown selection list would be inconvenient. By wildcard search, I mean a partial string search, or search by ID or other field alternatives like in sqlForm, that would replace the dropdown. If not, are there other ways to get around the

[web2py] Re: How to make app setup / is it possible to have modelless app?

2013-07-17 Thread dhmorgan
you may want to look at how tiny_website ( https://github.com/espern/tiny_website) handles its setup at first run of application On Tuesday, July 16, 2013 5:34:55 PM UTC-5, Dragan Matic wrote: > > What would be the best way to create an app setup? After > uploading/installing an app to a server

[web2py] Re: how to use auth.wiki "extra" and "env"

2013-07-17 Thread Alan Etkin
El miércoles, 17 de julio de 2013 12:14:25 UTC-3, Massimo Di Pierro escribió: > > I agree. It should also support the use of variable already passed to the > MARKMIN environment. Yet it should not support expressions and python code. > All of this may not be easy since we do not want to user ev

[web2py] Re: Micro-framework performance vs Web2py?

2013-07-17 Thread Massimo Di Pierro
Microframework is often used as a marketing buzzword. For example web2py core consists of only the files web2py.py and gluon/*.py. All together they have less size then some "micro frameworks". Speedwise the bottle neck for everybody is DB IO. If you use a database than all frameworks perform m

[web2py] Re: How do I pass a query object to a different controller?

2013-07-17 Thread Massimo Di Pierro
You can store the results in session then. session.rows = db(...).select() Passing to much data in request.vars can be a problem. For example nginx limits the size of the query string. On Wednesday, 17 July 2013 10:48:15 UTC-5, Dmitri Husti wrote: > > HI, > you can pass results to the next p

[web2py] Function for downloading files

2013-07-17 Thread lesssugar
There's default/download function, usually used like this on files that were uploaded: Download In this case, I do not want to keep the full download path in my tag. Instead, when the link is clicked, I would like to redirect to another function, which will proceed with the download based on

[web2py] Re: Submit several records to a table from one form

2013-07-17 Thread Andrey Oleynik
Massimo, thank you for reply. Initially I thought about adding input fields to the form like here and then save their values to table authors in the loop right after saving the rest part of the form to table book. среда, 17 июля 2013 г., 16:22

[web2py] Micro-framework performance vs Web2py?

2013-07-17 Thread greenpoise
Total ignorant question here but is there any difference at all between these two in terms of performance? Any experiences from users out there? -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop rece

[web2py] Re: AWS Elastic Beanstalk installation Recipe

2013-07-17 Thread Aladdin Teng
Hi! Is there an update on this demo? I am looking into AWS deployment too. Thanks. On Saturday, October 13, 2012 9:52:03 AM UTC+8, Massimo Di Pierro wrote: > > I will try a demo asap but I do not have an account so it will take a > tille time. In principle everything in eb is not django specifi

Re: [web2py] Re: Minify (compress) response HTML

2013-07-17 Thread Kernc
Can you elaborate what JavaScript code is that? I had problems with e.g. recaptcha module, which starts the script with: > > and when minimized, this became: >