Re: [web2py] Re: Cloning SQLlite into PostgreSQL
But I don't understand, how is it possible? The id's stay same as in source database ---or--- web2py creates a mapping based on db model and changes foreign keys with primary keys together? Dne čtvrtek 2. dubna 2015 9:08:55 UTC+2 Gael Princivalle napsal(a): Well it's always a shame to see that the answer was in the web2py book. So shame on me, and thanks to all. CSV all tables at once works perfectly. Il giorno giovedì 2 aprile 2015 08:39:42 UTC+2, Mirek Zvolský ha scritto: export the whole database to csv and import it through web2py, the integrity of the references will be preserved. What for magic...? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
Re: [web2py] Re: Cloning SQLlite into PostgreSQL
export the whole database to csv and import it through web2py, the integrity of the references will be preserved. What for magic...? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] High Memory usage due to uploads_in_blob
Hi, I have an application that uses uploads_in_blob feature as follows : db._adapter.uploads_in_blob = True This creates an additional column of BYTEA type at the DB Level (I am using postgres, if it matters) Here is a sample table (This is just to give you the idea, this is not the exact definition): db.define_table('uploaded_docs', Field('document_name', 'string', default=''), Field('doc', 'upload', label=T('Document'), uploadfield=True, requires=IS_NOT_EMPTY( error_message=T('Select a document to upload'))), Field('doc_property1', 'string'), Field('doc_property2', 'string'), Field('document_date', 'date'), Field('status', 'string', default='Open', requires=IS_IN_SET(['Draft', 'Approved', 'Under Review'])), Field('remarks', 'string', default='') ) 1. User can upload documents in the doc field (which is the upload field) 2. There is some meta data as described by other fields. 3. There is *no restriction on the size* of the document (Customer requirement, can't negotiate) These documents are shown using SQLFORM.grid widget (automatic pagination, search, all the cool things) *Here is the problem* : Each time a DB query is run (and results returned to web2py), the *size of each row returned also includes the size of the uploaded document*. e.g. If each row has a document of say 5MB, then 20 rows that are returned by default pagination, consumes 100MB (I am not sure when this memory is released/GC'ed) So after going thru say 5 such queries, memory consumed is 500MB I have deployed the app on webfaction, with default memory block of 512MB So at this point, the app is killed, resulting into 502-Bad gateway error to the end user. Customer may not always download the file, customer may be just looking at the records' metadata, so access to the BLOB isn't needed till user clicks the download link (denoted by file URL) When NOT using uploads_in_blob, the uploads folder only contains a filename, and the file actually resides on the disk. IMO the filesystem is accessed only when needed. Is there a way to handle BLOB field in similar fashion ? (Access only when needed) *Are there any suggestions on how to limit the memory usage ?* (The app is already in production, so if I handle this via code changes, this is definitely preferred over data migration) Thanks, -Mandar -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
Re: [web2py] Re: Cloning SQLlite into PostgreSQL
On 31 March 2015 at 20:19, Gael Princivalle gaelprinciva...@gmail.com wrote: Thanks Ron but:with CSV export: auth_user_iduser 3 John 7 Sally And then you import your CSV file you will have: auth_user_iduser 1 John 2 Sally And so all relations between tables will be broken. Someone have a solution? Search the book for CSV (all tables at once) and you wil see that if you export the whole database to csv and import it through web2py, the integrity of the references will be preserved. Regards Johann -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] How to properly connect to .css and .js ?
Hi, I like the approach not start the application from scratch, but to use the scaffolding application: db.py, layout.html, web2py_ajax.html. To have good possibility to upgrade between web2py versions, it is good to do no or minimal changes to previous files. So I try to make my own database model: db_model.py, isntead of change the db.py, and so on. Some minimum changes in previous files are still neccesary - which is bad :( - but I mark them with some comments like ### my_patch ###. My question is: How (where) to properly call my javascript and my css files? For own javascript it can be done inside the view inside the body, maybe on the top, and maybe with help of {{include...}} Am I correct? But what about own css layout? Is it possible to connect it outside of the files above? Lets say in own model file? Maybe this will help to other people too. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
Re: [web2py] Re: Cloning SQLlite into PostgreSQL
Well it's always a shame to see that the answer was in the web2py book. So shame on me, and thanks to all. CSV all tables at once works perfectly. Il giorno giovedì 2 aprile 2015 08:39:42 UTC+2, Mirek Zvolský ha scritto: export the whole database to csv and import it through web2py, the integrity of the references will be preserved. What for magic...? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
Re: [web2py] Re: Cloning SQLlite into PostgreSQL
Hi Mirek, On 02/04/15 09:35, Mirek Zvolský wrote: But I don't understand, how is it possible? The id's stay same as in source database ---or--- web2py creates a mapping based on db model and changes foreign keys with primary keys together? New IDs are assigned, so links (e.g. FKs) will be maintained, but the actually identifier will change - see: - http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#CSV--all-tables-at-once- ...and especially the note about duplicate checking using UUIDs and upsert behaviour. HTH -- Regards, PhilK 'a bell is a cup...until it is struck' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] error: generic_patterns = []
When I make new app by Wizard if make in db.py response.generic_patterns = ['*'] if request.is_local else [] and all others controllers is disabled! please insert this code instead in db.py: response.generic_patterns = ['*'] if request.is_local else ['html'] -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] AlterEgo
Hi, Just a quick note to report that AlterEgo is throwing tickets for me: - http://www.web2py.com/AlterEgo/default/index HTH -- Regards, PhilK 'a bell is a cup...until it is struck' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: Facing problem of settingup web2py project in Eclipse.
were you able to resolve that problem ? On Friday, July 20, 2012 at 10:49:29 AM UTC+5:30, Amit wrote: Hi, I followed below link to configure Web2py project in eclipse: http://allisterx.blogspot.in/2009/06/using-web2py-framework-on-eclipse.html but after setting up when i open my application which is there inside application folder of web2py_src folder, I saw so many errors on the module. once i open default.py module, it showing error on import modules which are inside Modules folder(for e.g.: i have userconf.py module inside modules but when i import it in default.controller it giving error saying Unresolved import:userconf) , similar problem with when i am trying to use function of db.py, its giving error undefined variable. can anyone please help me to figure out what wrong i did? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] For a beginner
Hello all, I wil be doing a project in Python elasticsearch.. I need to create a web application Can you pl guide me as to whether I should choose Flask or web2py? with regards to all, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] route.py I added the route.py and edit it , but it didn't work
I wrote it like this. routers = dict( # base router BASE=dict( default_application='Home', ), ) did I miss something? Thanks Wei -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Possible bug report - unicode strings in list:string field generating encode errors
Hi - I am working with some unicode lists that I am inserting into a postgres database. From the documentation I see that fields of type list:string are converted to | separated strings before being inserted into the db. When attempting to insert a list of values that contains unicode charactyers: 'pl1_guest_list': [u'Ren\xe9e Marino', u'Renee Marino'], I get the error: 'ascii' codec can't encode character u'\xe9' in position 3: ordinal not in range(128) This leads me to base.py, line 1337 where I see: if field_is_type('list:string'): obj = map(str,obj) My initial thought is that str needs to be replaced with unicode but I am sure that there are additional repercussions if the database encoding is set to something other than unicode - and there is the 8 vs. 16 issues as well. I am guessing that there is some ability to introspect the database to see what encoding has been declared but I have not been into the web2py source before and I know this is going to take me a long time to uncover. Anyone out there on the core team care to suggest a starting point - or maybe this is a simple fix? Tom -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] From prototype to a real application. Need professional programming help
I've just started a new business in the northern part of the Netherlands (www.skarp.nl). Someone build mij idea into a web2py application, as a proof of concept. Now it needs to become a real, multi tenant, secure application with an user friendly interface. Are there professional web2py developers available? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] selected values in widget SQLFORM.widgets.multiple.widget and SQLFORM.widgets.checkboxes.widget
Hi, I do not know if this is bug or not but I am not able to get multiselect widgets to work properly. I have this kind of lines in my table definition: Field('methodsA', type='string', requires=IS_IN_SET(['method1','method2','method3'], multiple=True, zero='-- choose --'), widget=SQLFORM.widgets.multiple.widget) Field('methodsB, type='string', requires=IS_IN_SET(['method1','method2','method3'], multiple=True, zero='-- choose --'), widget=SQLFORM.widgets.checkboxes.widget) These correctly translate into select and multiple checkbox widgets both in my app and admin interface. They also correctly stores my multiple selections into the database (in form |method1|method2| etc.). However if I try to modify records later on the edit form does not show previously selected and stored selections. In form view it looks like previous selections were empty set! And if I submit the form without selecting proper list items again the form will store empty set into the database. I made numerous google searched and found suggestion how this should be fixed: http://git.net/web2py/msg108396.html. The suggestion applies only to SQLFORM.widgets.multiple.widget and this small change hasn't been integrated into web2py source tree yet. Does this small change break something? This small change seems to fix selection issues in form view. Do I use gluon.sqlhtml.MultipleOptionsWidget incorrectly or is this real bug? If I am using this widget inappropriately could someone show me how this widget should be used. I am also curious to know how SQLFORM.widgets.checkboxes.widget should be fixed to make it work correctly. I am using web2py version: 2.9.12-stable+timestamp.2015.03.19.06.51.11 on linux. Teemu -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: Compute expiry date
On Thursday, April 2, 2015 at 6:46:30 AM UTC-7, Annet wrote: I a table I defined the following field: Field('expiryDate', type='date', requires=IS_EMPTY_OR(IS_DATE(format='%d-%m-%Y')) By default the expiryDate is set to request.now, since there's no need to monthly update the expiry date, I want to calculate it when the user actually updates or cancels his account. So if expiryDate is set to 28-11-2014 and the user updates his account on 6-04-2015, the expiryDate is 28-04-2015, and when the user updates his account on 30-04-2015, the expiryDate is 28-05-2015 I had a look at relativedelta to solve this problem, but I wonder whether there is an easier way to solve this problem within web2py. I'd use the standard python datetime.timedelta, to wit: stuff= db.executesql(SELECT logstuff, logtime FROM logtable WHERE logstuff LIKE '% + request.something ) newstuff = db.executesql(SELECT logstuff, logtime FROM logtable WHERE id == + id ) if stuff: stuffdelta = newstuff[0][1] - stuff[-1:][0][1] if (stuffdelta datetime.timedelta(minutes=10)): res2 = db.boottable.insert(stufftime=now, time2stuff=stuffdelta. total_seconds) If you need it in the query, I've used something like (but I'm not, now): results = db.executesql(SELECT * FROM logtable where logtime date('now','-0 day') , ORDER BY logtime DESC ;) (that's for sqlite, but other DBs should have something similar) I'd think your calculations to be along those lines, give or take a few details. /dps -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: how to display foreign language symbols
okay, have been approaching the wrong way. Can you please help me write the correct code? Here's first attempt: def import_a_tab_file(): rows = open(filename, 'cities1000.txt') ## question: what directory is source file in? for row in rows: db.City.insert(city_name = line.split('\t'), city_population = line.split('\t')) ## or should above literally copy what you typed and field values are automatically inserted in sequential order? values = line.split('\t') thanks, Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] web2py 2.10.3 si OUT
I posted a new version to address some minor issues. If you upgrade from 2.9.11 or 2.9.12 the auto update may not work and you have to delete the file: web2py/gluon/dal -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: how to display foreign language symbols
why do you need appadmin ? it doesn't import any csv you have lying around.. code a loop over your nicely tab separated lines that inserts into your table. On Thursday, April 2, 2015 at 9:03:07 PM UTC+2, Alex Glaros wrote: am trying to import geonames.org cites/countries files, which are tab delimited I guess the linux tr command is a good choice tr '\t' ',' cities1000.txt comma-delimited-file Question: is CSV the only format appadmin accepts? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: how to display foreign language symbols
I'm not going to give you the complete solution... a) use https://docs.python.org/2/library/codecs.html to open the file b) use os.path.join to concatenate pieces of paths to build the file location c) assuming splitted = line.split('\t') you're going to get a list of values for every row. geonames format uses 19 fields for every row, so you'll get back a list with 19 fields in it. Your first field would then be splitted[0], the second splitted[1] and so on. e.g. the first line would be something like splitted = ['3039154', 'El Tarter', 'El Tarter', ] you can then insert every piece to its own field pretty easily. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: mod_wsgi error caused (maybe) by css transferred with MIME type text/plain
I think that Weheh may be on to something. I had been using Apache 2.2.22 and just grabbed a fresh copy of 2.2.29 from Apache Lounge https://www.apachelounge.com/download/additional/ and tried it out on my desktop and it appears that static files are now being served directly by Apache rather than running through web2py (no more x-powered-by: web2py headers). Will have to try it on the server next week and see if an Apache error happens to cut down on errors there too (or at least speed things up a bit). -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: How to properly connect to .css and .js ?
ok first of all, you work with your application and you should just modify your db.py, layout.html and etc. You should not worry about not having the same thing as in the scaffolding in the latest versions, because as you are aware, web2py is fully backwards compatible. So if your application works today in whatever version you are in, it should work with web2py 2.99 or whatever in the future. second, they are called scaffolding that allow you to build off it. It's like you are building a car with a toothbrush with detachable bristles in case someone builds a better handle. Can't commit to a handle so the bristles sometimes fall off but it can be called a toothbrush. Look, just grab hold of that scaffolding and tear it to shreds and use it all up like the little piece of kindling that it is. It's just there to get you off the ground, it's not meant to be a foundation from which to build. You should build that, and the good news is 'web2py is backwards compatible' you aren't going to be left in the cold when a new version of web2py comes out... On Wednesday, April 1, 2015 at 11:54:52 PM UTC-7, Mirek Zvolský wrote: Hi, I like the approach not start the application from scratch, but to use the scaffolding application: db.py, layout.html, web2py_ajax.html. To have good possibility to upgrade between web2py versions, it is good to do no or minimal changes to previous files. So I try to make my own database model: db_model.py, isntead of change the db.py, and so on. Some minimum changes in previous files are still neccesary - which is bad :( - but I mark them with some comments like ### my_patch ###. My question is: How (where) to properly call my javascript and my css files? For own javascript it can be done inside the view inside the body, maybe on the top, and maybe with help of {{include...}} Am I correct? But what about own css layout? Is it possible to connect it outside of the files above? Lets say in own model file? Maybe this will help to other people too. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: selected values in widget SQLFORM.widgets.multiple.widget and SQLFORM.widgets.checkboxes.widget
What happens if you change the type to list:string? On Thursday, April 2, 2015 at 4:25:49 PM UTC-4, Teemu wrote: Hi, I do not know if this is bug or not but I am not able to get multiselect widgets to work properly. I have this kind of lines in my table definition: Field('methodsA', type='string', requires=IS_IN_SET(['method1','method2','method3'], multiple=True, zero='-- choose --'), widget=SQLFORM.widgets.multiple.widget) Field('methodsB, type='string', requires=IS_IN_SET(['method1','method2','method3'], multiple=True, zero='-- choose --'), widget=SQLFORM.widgets.checkboxes.widget) These correctly translate into select and multiple checkbox widgets both in my app and admin interface. They also correctly stores my multiple selections into the database (in form |method1|method2| etc.). However if I try to modify records later on the edit form does not show previously selected and stored selections. In form view it looks like previous selections were empty set! And if I submit the form without selecting proper list items again the form will store empty set into the database. I made numerous google searched and found suggestion how this should be fixed: http://git.net/web2py/msg108396.html. The suggestion applies only to SQLFORM.widgets.multiple.widget and this small change hasn't been integrated into web2py source tree yet. Does this small change break something? This small change seems to fix selection issues in form view. Do I use gluon.sqlhtml.MultipleOptionsWidget incorrectly or is this real bug? If I am using this widget inappropriately could someone show me how this widget should be used. I am also curious to know how SQLFORM.widgets.checkboxes.widget should be fixed to make it work correctly. I am using web2py version: 2.9.12-stable+timestamp.2015.03.19.06.51.11 on linux. Teemu -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: sorting ip address
Wrong again. You really should just go to sleep. First, you need to convert your IP addresses to decimal representation, then sort them. import socket, struct def ip2long_1(ip): return struct.unpack(!L, socket.inet_aton(ip))[0] On Tuesday, March 31, 2015 at 3:52:51 PM UTC-7, Niphlod wrote: nope, wrong... sorry, I reaally need some bed time ^_^ You NEED to convert triplets to integers before sorting. no worries though... what_you_want = sorted(myips, key=lambda x:tuple(map(int, x.split('.' is the correct one. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: [web2py:22132] Re: another web2py powered
So there is another web2py site? On Thursday, April 2, 2015 at 11:34:22 AM UTC-4, peter wrote: Powereby is down today, it gives a ticket -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: For a beginner
You can build a web application involving Elasticsearch using either framework. You should probably spend a little time playing with each framework to get a sense of which you prefer. Especially if you are new to web application development, you will likely find it easier to get going with web2py, particularly if you require any non-trivial functionality, as web2py is a much more comprehensive framework than Flask (which is described as a microframework). Anthony On Thursday, April 2, 2015 at 4:25:40 PM UTC-4, Hema wrote: Hello all, I wil be doing a project in Python elasticsearch.. I need to create a web application Can you pl guide me as to whether I should choose Flask or web2py? with regards to all, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
Re: [web2py] From prototype to a real application. Need professional programming help
Can you be little bit more specific? On Thursday, April 2, 2015 at 11:09:37 PM UTC-4, Kiran Subbaraman wrote: You could contact one of these companies / developers to partner with you on this: http://web2py.com/init/default/support Kiran Subbaramanhttp://subbaraman.wordpress.com/about/ On Fri, 03-04-2015 12:28 AM, Richard van der Zee wrote: I've just started a new business in the northern part of the Netherlands ( www.skarp.nl). Someone build mij idea into a web2py application, as a proof of concept. Now it needs to become a real, multi tenant, secure application with an user friendly interface. Are there professional web2py developers available? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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+un...@googlegroups.com javascript:. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] StackShare
Just pointing out that web2py should be on StackShare http://stackshare.io/, same as Django and other frameworks. It's not really my place to build web2py's vendor profile http://stackshare.io/vendors# so I'll leave that to it's founders (@MassimoDiPierro) I'm using it (as text for now, since it isn't registered) in my own stacks and I'm adding badges on my GitHub repos to promote the framework as well as the other tools I regularly use in my dev stacks :) Cheers, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: route.py I added the route.py and edit it , but it didn't work
Did you remember to restart web2py? See: http://www.ridgesolutions.ie/index.php/2013/02/20/web2py-make-your-app-the-default-web-application/ And there is also a reload routes button in the admin interface. Hope that helps. On Thursday, April 2, 2015 at 1:25:43 PM UTC-7, 朱伟 wrote: I wrote it like this. routers = dict( # base router BASE=dict( default_application='Home', ), ) did I miss something? Thanks Wei -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: From prototype to a real application. Need professional programming help
I guess that is a relative question. Depends on how much you willing to pay. lol. On Thursday, April 2, 2015 at 4:25:49 PM UTC-4, Richard van der Zee wrote: I've just started a new business in the northern part of the Netherlands ( www.skarp.nl). Someone build mij idea into a web2py application, as a proof of concept. Now it needs to become a real, multi tenant, secure application with an user friendly interface. Are there professional web2py developers available? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: For a beginner
http://vschart.com/compare/flask/vs/web2py On Thursday, April 2, 2015 at 4:25:40 PM UTC-4, Hema wrote: Hello all, I wil be doing a project in Python elasticsearch.. I need to create a web application Can you pl guide me as to whether I should choose Flask or web2py? with regards to all, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
Re: [web2py] From prototype to a real application. Need professional programming help
You could contact one of these companies / developers to partner with you on this: http://web2py.com/init/default/support Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Fri, 03-04-2015 12:28 AM, Richard van der Zee wrote: I've just started a new business in the northern part of the Netherlands (www.skarp.nl). Someone build mij idea into a web2py application, as a proof of concept. Now it needs to become a real, multi tenant, secure application with an user friendly interface. Are there professional web2py developers available? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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 mailto:web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: how to display foreign language symbols
hint on this error? type 'exceptions.IndexError' list index out of range def import_a_tab_file(): tabbed_file = open(os.path.join(request.folder,'static','cities1000.txt')).read() for line in tabbed_file: splitted = line.split('\t') db.TempCity.insert(geoNamesID = splitted[0], cityName = splitted[1], asciiCityName = splitted[2], alternativeNames = splitted[3], latitude = splitted[4], longitude = splitted[5], featureClass = splitted[6], featureCode = splitted[7], countryCode = splitted[8], altCountryCode = splitted[9], admin1Code = splitted[10], admin2Code = splitted[11], admin3Code = splitted[12], admin4Code = splitted[13], population = splitted[14], elevation = splitted[15], dem = splitted[16], timeZone = splitted[17], geoNamesModDate = splitted[18]) return locals() -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: How to properly connect to .css and .js ?
Best way to call javascript and css files are from layout. and then include the layout like a sandwich inside index.html (or whatever pages you are wishing to use the jss and css). On Thursday, April 2, 2015 at 7:58:29 PM UTC-4, Derek wrote: ok first of all, you work with your application and you should just modify your db.py, layout.html and etc. You should not worry about not having the same thing as in the scaffolding in the latest versions, because as you are aware, web2py is fully backwards compatible. So if your application works today in whatever version you are in, it should work with web2py 2.99 or whatever in the future. second, they are called scaffolding that allow you to build off it. It's like you are building a car with a toothbrush with detachable bristles in case someone builds a better handle. Can't commit to a handle so the bristles sometimes fall off but it can be called a toothbrush. Look, just grab hold of that scaffolding and tear it to shreds and use it all up like the little piece of kindling that it is. It's just there to get you off the ground, it's not meant to be a foundation from which to build. You should build that, and the good news is 'web2py is backwards compatible' you aren't going to be left in the cold when a new version of web2py comes out... On Wednesday, April 1, 2015 at 11:54:52 PM UTC-7, Mirek Zvolský wrote: Hi, I like the approach not start the application from scratch, but to use the scaffolding application: db.py, layout.html, web2py_ajax.html. To have good possibility to upgrade between web2py versions, it is good to do no or minimal changes to previous files. So I try to make my own database model: db_model.py, isntead of change the db.py, and so on. Some minimum changes in previous files are still neccesary - which is bad :( - but I mark them with some comments like ### my_patch ###. My question is: How (where) to properly call my javascript and my css files? For own javascript it can be done inside the view inside the body, maybe on the top, and maybe with help of {{include...}} Am I correct? But what about own css layout? Is it possible to connect it outside of the files above? Lets say in own model file? Maybe this will help to other people too. Thanks. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: how to display foreign language symbols
ran a display of data there is only one value: splitted[0] = '9' which causes list index out of range error how can I get the rest of the values in the line? thanks Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: New modular DAL!
I see. Thank you Anthony:-) On Wednesday, April 1, 2015 at 11:50:03 PM UTC-4, Anthony wrote: The functionality/API hasn't changed. The DAL has simply been moved to its own repository (so it can more easily be used outside of web2py), and it has been divided up into separate modules instead of being one big file. Anthony On Wednesday, April 1, 2015 at 11:37:33 PM UTC-4, Ron Chatterjee wrote: Hello all, I am looking at the changelog for 2.10.1 and it says, new modular dal Can someone give me a simple example of what new modular dal is as oppose to regular DAL that we are used to, like db.define_table('table_name',Field('field_name',...))? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: For a beginner
On Thursday, April 2, 2015 at 9:52:40 PM UTC-4, Ron Chatterjee wrote: http://vschart.com/compare/flask/vs/web2py Somewhat misleading -- many of the features attributed to Flask are available only via third-party extensions, not as part of the framework. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: 2.10.1 / Windows errors / cache
Thank you for trying to replicate the issue - am guessing you replicated the cleaning up of the cache issue, and not the issue while using the cache itself? No no, I solved both issues that's why I had to have a multitude of browser tabs opens auto-refreshing to replicate the issue. Here is the screenshot of the message I see, when I try to clean the app, via the admin app. This is not something that I see all the time, but does occur frequently enough Kiran that's ok, it's supposed to happen. In an application that's online and being used, sometimes you won't be able to delete every file. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
Re: [web2py] Re: Cloning SQLlite into PostgreSQL
Hi Philip. Using UUIDs make the db slower right? http://simononsoftware.com/how-to-store-uuids-in-postgresql/ And you can't store a record like that: my_record = db.my_table(1) Il giorno giovedì 2 aprile 2015 10:52:20 UTC+2, Philip Kilner ha scritto: Hi Mirek, On 02/04/15 09:35, Mirek Zvolský wrote: But I don't understand, how is it possible? The id's stay same as in source database ---or--- web2py creates a mapping based on db model and changes foreign keys with primary keys together? New IDs are assigned, so links (e.g. FKs) will be maintained, but the actually identifier will change - see: - http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#CSV--all-tables-at-once- ...and especially the note about duplicate checking using UUIDs and upsert behaviour. HTH -- Regards, PhilK 'a bell is a cup...until it is struck' -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: SQLFORM question of formstyle and hidden inputs
They should be there. Can you show your code? What version of web2py? On Thursday, April 2, 2015 at 7:24:46 AM UTC-4, lucas wrote: hey everyone, just a quick question. when i do SQLFORM of default formstyle (table3cols) i get these hidden inputs: input name=_formkey type=hidden value=91a85b0c-8b34-41bb-b8b2-3725e7717e30 input name=_formname type=hidden value=customers/create and i get that when the form is submitted, it uses these to properly id the form and such. however, why is it that when i do an SQLFORM of formstyle='divs' that these hidden inputs do not show up in the final html page? doesn't web2py need these using the divs style also? thanx in advance, lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] SQLFORM question of formstyle and hidden inputs
hey everyone, just a quick question. when i do SQLFORM of default formstyle (table3cols) i get these hidden inputs: input name=_formkey type=hidden value=91a85b0c-8b34-41bb-b8b2-3725e7717e30 input name=_formname type=hidden value=customers/create and i get that when the form is submitted, it uses these to properly id the form and such. however, why is it that when i do an SQLFORM of formstyle='divs' that these hidden inputs do not show up in the final html page? doesn't web2py need these using the divs style also? thanx in advance, lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: error: generic_patterns = []
The code included in the scaffolding app is intended to disable all generic views by default unless the requests are local (this is for security reasons, as the generic views can expose data not intended to be exposed). We do not want to enable generic.html by default either. Are you finding generic views disabled even with local requests? Anthony On Thursday, April 2, 2015 at 4:17:52 AM UTC-4, Dmitry Ermolaev wrote: When I make new app by Wizard if make in db.py response.generic_patterns = ['*'] if request.is_local else [] and all others controllers is disabled! please insert this code instead in db.py: response.generic_patterns = ['*'] if request.is_local else ['html'] -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: For a beginner
I was being brief. Here is an idea, there is a book called realpython.com. It has a comprehensive tutorial starting with flask, then web2py and finally django. If you are unsure, you may just want to get the book and follow through the examples in the and see which framework you are most comfortable using. If I were you, I will not worry about micro or macro because there are ways around it. I will use the framework I am most comfortable using. On Thursday, April 2, 2015 at 10:07:11 PM UTC-4, Anthony wrote: You can build a web application involving Elasticsearch using either framework. You should probably spend a little time playing with each framework to get a sense of which you prefer. Especially if you are new to web application development, you will likely find it easier to get going with web2py, particularly if you require any non-trivial functionality, as web2py is a much more comprehensive framework than Flask (which is described as a microframework). Anthony On Thursday, April 2, 2015 at 4:25:40 PM UTC-4, Hema wrote: Hello all, I wil be doing a project in Python elasticsearch.. I need to create a web application Can you pl guide me as to whether I should choose Flask or web2py? with regards to all, -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Stupid Question - how do I run the pydal test suite?
I have google for the last hour to try and figure out how to run the unittests in the tests folder for pydal and have come up short. Is there something simple I am missing? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: Possible bug report - unicode strings in list:string field generating encode errors
Update - I found the bug reported here: https://github.com/web2py/web2py/issues/697 I have also suggested a fix but I am not deep enough into the code to know if it might break other behaviors. See the bug tracker for my suggested fix and let me know here if you have any thoughts about what else might need to be changed. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: [web2py:22132] Re: another web2py powered
No. there is one. the app was down because of I mistake in upgrade. On Thursday, 2 April 2015 20:55:41 UTC-5, Ron Chatterjee wrote: So there is another web2py site? On Thursday, April 2, 2015 at 11:34:22 AM UTC-4, peter wrote: Powereby is down today, it gives a ticket -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: From prototype to a real application. Need professional programming help
Hi Richard, Me and Mr. Massimo work together for project development using Web2py. I have gone through the site and we both willing to contribute in the project. Before going ahead, could you please provide some documentation or we can discuss over internet conferencing. For development its really most important to understand exact requirement and analysis. *Feel free to reach me using +919845999698 * *or skype: ramkrishanbhatt* *or gmail: ramkrishan.bh...@gmail.com* waiting for your response... Thanks and regards Ramkrishan Bhatt On Friday, 3 April 2015 01:55:49 UTC+5:30, Richard van der Zee wrote: I've just started a new business in the northern part of the Netherlands ( www.skarp.nl). Someone build mij idea into a web2py application, as a proof of concept. Now it needs to become a real, multi tenant, secure application with an user friendly interface. Are there professional web2py developers available? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: selected values in widget SQLFORM.widgets.multiple.widget and SQLFORM.widgets.checkboxes.widget
Ya its must working with type='list:string' On Friday, 3 April 2015 01:55:49 UTC+5:30, Teemu wrote: Hi, I do not know if this is bug or not but I am not able to get multiselect widgets to work properly. I have this kind of lines in my table definition: Field('methodsA', type='string', requires=IS_IN_SET(['method1','method2','method3'], multiple=True, zero='-- choose --'), widget=SQLFORM.widgets.multiple.widget) Field('methodsB, type='string', requires=IS_IN_SET(['method1','method2','method3'], multiple=True, zero='-- choose --'), widget=SQLFORM.widgets.checkboxes.widget) These correctly translate into select and multiple checkbox widgets both in my app and admin interface. They also correctly stores my multiple selections into the database (in form |method1|method2| etc.). However if I try to modify records later on the edit form does not show previously selected and stored selections. In form view it looks like previous selections were empty set! And if I submit the form without selecting proper list items again the form will store empty set into the database. I made numerous google searched and found suggestion how this should be fixed: http://git.net/web2py/msg108396.html. The suggestion applies only to SQLFORM.widgets.multiple.widget and this small change hasn't been integrated into web2py source tree yet. Does this small change break something? This small change seems to fix selection issues in form view. Do I use gluon.sqlhtml.MultipleOptionsWidget incorrectly or is this real bug? If I am using this widget inappropriately could someone show me how this widget should be used. I am also curious to know how SQLFORM.widgets.checkboxes.widget should be fixed to make it work correctly. I am using web2py version: 2.9.12-stable+timestamp.2015.03.19.06.51.11 on linux. Teemu -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: route.py I added the route.py and edit it , but it didn't work
its routes.py just rename it and restart the application. On Friday, 3 April 2015 04:09:54 UTC+5:30, Tom Stratton wrote: Did you remember to restart web2py? See: http://www.ridgesolutions.ie/index.php/2013/02/20/web2py-make-your-app-the-default-web-application/ And there is also a reload routes button in the admin interface. Hope that helps. On Thursday, April 2, 2015 at 1:25:43 PM UTC-7, 朱伟 wrote: I wrote it like this. routers = dict( # base router BASE=dict( default_application='Home', ), ) did I miss something? Thanks Wei -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: how to display foreign language symbols
am trying to import geonames.org cites/countries files, which are tab delimited I guess the linux tr command is a good choice tr '\t' ',' cities1000.txt comma-delimited-file Question: is CSV the only format appadmin accepts? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
Fw: [web2py] Compute expiry date
El Thu, 2 Apr 2015 06:46:30 -0700 (PDT) Annet anneve...@googlemail.com escribió: I a table I defined the following field: Field('expiryDate', type='date', requires=IS_EMPTY_OR(IS_DATE(format='%d-%m-%Y')) By default the expiryDate is set to request.now, since there's no need to monthly update the expiry date, I want to calculate it when the user actually updates or cancels his account. So if expiryDate is set to 28-11-2014 and the user updates his account on 6-04-2015, the expiryDate is 28-04-2015, and when the user updates his account on 30-04-2015, the expiryDate is 28-05-2015 I had a look at relativedelta to solve this problem, but I wonder whether there is an easier way to solve this problem within web2py. Kind regards, Annet Could you show or tell if there are more tables related to the one you want to work expirations in?. I can only think in a updates table related to users and expirations, so when an update occurs this should trigger a function that works on expirations table. I'll try to elaborate an example. Marco. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: [web2py:22132] Re: another web2py powered
Powereby is down today, it gives a ticket -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: SQLFORM question of formstyle and hidden inputs
omg, i am a dumba$$. they are there, they are under a different div south of the submit. it escaped my eye. sorry anthony. lucas -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: how to display foreign language symbols
is a tool really needed ? for line in file: values = line.split('\t') . On Thursday, April 2, 2015 at 12:33:54 AM UTC+2, Alex Glaros wrote: Niphlod, I don't know how to apply that information to this web2py upload project. avoiding Excel, I edited with vi editor (replaced commas with semicolons, then replaced tabs with commas) that worked and web2py imported symbols correctly but now I get this error: field larger than field limit (131072) did not get it from Excel-created file Error occurs around row 130,747 in a 144,000 row table. Tried deleting 3 rows above and 3 rows below several times in case it was one bad record but error persists. What other tools to people use convert tab delimited to CSV? thanks, Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: manually update password
with the default widget, a password is holds an 8 asterisks signs string (). When you receive them, you shouldn't assume password changed. if you're not receiving 8 asterisks back, than that var is holding the password the user has set. On Thursday, April 2, 2015 at 1:52:31 AM UTC+2, José Eloy wrote: Hello Niphlod. *B*ecause I've modified the presentation of the form (I use check boxes to represent multiselect box) and save another variables that they aren't part of the form*.* All I need is to know how to recover the password value and save if this changed. Regards. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Github tagged releases
Dear Massimo, Developers, I'm in the process of proposing a package for inclusion in buildroot. Buildroot unfortunately doesn't embrace the concept of rolling release so and I'm wondering for a solution. The basic idea is that if I download the buildroot release 2015.02 in a year or two, it should download, build and install the same exact version of software as two year before, so the build could be reproducible. Actually, we haven't a policy for older versions of web2py not considering github tagged releases. What I'm proposing here is to attach to github releases a working copy of the web2py sources (with subrepos of course!) so everyone can download older versions without to much of a hassle. Unfortunately we cannot rely on github to make that thing for us, so we should build manually the package and upload it to the release. Or alternatively, is there another way to have a stable link to web2py older releases? Thank you very much! -- Profile: http://it.linkedin.com/in/compagnucciangelo -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Compute expiry date
I a table I defined the following field: Field('expiryDate', type='date', requires=IS_EMPTY_OR(IS_DATE(format='%d-%m-%Y')) By default the expiryDate is set to request.now, since there's no need to monthly update the expiry date, I want to calculate it when the user actually updates or cancels his account. So if expiryDate is set to 28-11-2014 and the user updates his account on 6-04-2015, the expiryDate is 28-04-2015, and when the user updates his account on 30-04-2015, the expiryDate is 28-05-2015 I had a look at relativedelta to solve this problem, but I wonder whether there is an easier way to solve this problem within web2py. Kind regards, Annet -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: High Memory usage due to uploads_in_blob
That is a bug because Grid selects the 'hidden' doc_blob field. Please open an issue on github Paolo On Thursday, April 2, 2015 at 11:03:15 AM UTC+2, Mandar Vaze wrote: Hi, I have an application that uses uploads_in_blob feature as follows : db._adapter.uploads_in_blob = True This creates an additional column of BYTEA type at the DB Level (I am using postgres, if it matters) Here is a sample table (This is just to give you the idea, this is not the exact definition): db.define_table('uploaded_docs', Field('document_name', 'string', default=''), Field('doc', 'upload', label=T('Document'), uploadfield=True, requires=IS_NOT_EMPTY( error_message=T('Select a document to upload' ))), Field('doc_property1', 'string'), Field('doc_property2', 'string'), Field('document_date', 'date'), Field('status', 'string', default='Open', requires=IS_IN_SET(['Draft', 'Approved', 'Under Review'])), Field('remarks', 'string', default='') ) 1. User can upload documents in the doc field (which is the upload field) 2. There is some meta data as described by other fields. 3. There is *no restriction on the size* of the document (Customer requirement, can't negotiate) These documents are shown using SQLFORM.grid widget (automatic pagination, search, all the cool things) *Here is the problem* : Each time a DB query is run (and results returned to web2py), the *size of each row returned also includes the size of the uploaded document*. e.g. If each row has a document of say 5MB, then 20 rows that are returned by default pagination, consumes 100MB (I am not sure when this memory is released/GC'ed) So after going thru say 5 such queries, memory consumed is 500MB I have deployed the app on webfaction, with default memory block of 512MB So at this point, the app is killed, resulting into 502-Bad gateway error to the end user. Customer may not always download the file, customer may be just looking at the records' metadata, so access to the BLOB isn't needed till user clicks the download link (denoted by file URL) When NOT using uploads_in_blob, the uploads folder only contains a filename, and the file actually resides on the disk. IMO the filesystem is accessed only when needed. Is there a way to handle BLOB field in similar fashion ? (Access only when needed) *Are there any suggestions on how to limit the memory usage ?* (The app is already in production, so if I handle this via code changes, this is definitely preferred over data migration) Thanks, -Mandar -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: High Memory usage due to uploads_in_blob
Try to change https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L2151 with filter1 = lambda f: isinstance(f, Field) and f.type != 'blob' Paolo On Thursday, April 2, 2015 at 4:20:29 PM UTC+2, Paolo Valleri wrote: That is a bug because Grid selects the 'hidden' doc_blob field. Please open an issue on github Paolo On Thursday, April 2, 2015 at 11:03:15 AM UTC+2, Mandar Vaze wrote: Hi, I have an application that uses uploads_in_blob feature as follows : db._adapter.uploads_in_blob = True This creates an additional column of BYTEA type at the DB Level (I am using postgres, if it matters) Here is a sample table (This is just to give you the idea, this is not the exact definition): db.define_table('uploaded_docs', Field('document_name', 'string', default=''), Field('doc', 'upload', label=T('Document'), uploadfield=True, requires=IS_NOT_EMPTY( error_message=T('Select a document to upload' ))), Field('doc_property1', 'string'), Field('doc_property2', 'string'), Field('document_date', 'date'), Field('status', 'string', default='Open', requires=IS_IN_SET(['Draft', 'Approved', 'Under Review'])), Field('remarks', 'string', default='') ) 1. User can upload documents in the doc field (which is the upload field) 2. There is some meta data as described by other fields. 3. There is *no restriction on the size* of the document (Customer requirement, can't negotiate) These documents are shown using SQLFORM.grid widget (automatic pagination, search, all the cool things) *Here is the problem* : Each time a DB query is run (and results returned to web2py), the *size of each row returned also includes the size of the uploaded document*. e.g. If each row has a document of say 5MB, then 20 rows that are returned by default pagination, consumes 100MB (I am not sure when this memory is released/GC'ed) So after going thru say 5 such queries, memory consumed is 500MB I have deployed the app on webfaction, with default memory block of 512MB So at this point, the app is killed, resulting into 502-Bad gateway error to the end user. Customer may not always download the file, customer may be just looking at the records' metadata, so access to the BLOB isn't needed till user clicks the download link (denoted by file URL) When NOT using uploads_in_blob, the uploads folder only contains a filename, and the file actually resides on the disk. IMO the filesystem is accessed only when needed. Is there a way to handle BLOB field in similar fashion ? (Access only when needed) *Are there any suggestions on how to limit the memory usage ?* (The app is already in production, so if I handle this via code changes, this is definitely preferred over data migration) Thanks, -Mandar -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: how to display foreign language symbols
this looks like something that would be very valuable to me but I don't know what it is. Can you please explain explicitly? is it replacing all tabs with a comma? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
Re: [web2py] Re: High Memory usage due to uploads_in_blob
Paolo, On Thu, Apr 2, 2015 at 7:58 PM, Paolo Valleri paolo.vall...@gmail.com wrote: Try to change https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L2151 with filter1 = lambda f: isinstance(f, Field) and f.type != 'blob' Thanks for the workaround. On Thursday, April 2, 2015 at 4:20:29 PM UTC+2, Paolo Valleri wrote: That is a bug because Grid selects the 'hidden' doc_blob field. Please open an issue on github Yes, I will. -Mandar On Thursday, April 2, 2015 at 11:03:15 AM UTC+2, Mandar Vaze wrote: Hi, I have an application that uses uploads_in_blob feature as follows : db._adapter.uploads_in_blob = True This creates an additional column of BYTEA type at the DB Level (I am using postgres, if it matters) Here is a sample table (This is just to give you the idea, this is not the exact definition): db.define_table('uploaded_docs', Field('document_name', 'string', default=''), Field('doc', 'upload', label=T('Document'), uploadfield=True, requires=IS_NOT_EMPTY( error_message=T('Select a document to upload' ))), Field('doc_property1', 'string'), Field('doc_property2', 'string'), Field('document_date', 'date'), Field('status', 'string', default='Open', requires=IS_IN_SET(['Draft', 'Approved', 'Under Review'])), Field('remarks', 'string', default='') ) 1. User can upload documents in the doc field (which is the upload field) 2. There is some meta data as described by other fields. 3. There is *no restriction on the size* of the document (Customer requirement, can't negotiate) These documents are shown using SQLFORM.grid widget (automatic pagination, search, all the cool things) *Here is the problem* : Each time a DB query is run (and results returned to web2py), the *size of each row returned also includes the size of the uploaded document*. e.g. If each row has a document of say 5MB, then 20 rows that are returned by default pagination, consumes 100MB (I am not sure when this memory is released/GC'ed) So after going thru say 5 such queries, memory consumed is 500MB I have deployed the app on webfaction, with default memory block of 512MB So at this point, the app is killed, resulting into 502-Bad gateway error to the end user. Customer may not always download the file, customer may be just looking at the records' metadata, so access to the BLOB isn't needed till user clicks the download link (denoted by file URL) When NOT using uploads_in_blob, the uploads folder only contains a filename, and the file actually resides on the disk. IMO the filesystem is accessed only when needed. Is there a way to handle BLOB field in similar fashion ? (Access only when needed) *Are there any suggestions on how to limit the memory usage ?* (The app is already in production, so if I handle this via code changes, this is definitely preferred over data migration) Thanks, -Mandar -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to a topic in the Google Groups web2py-users group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/7K4hAcOiEfg/unsubscribe. To unsubscribe from this group and all its topics, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: High Memory usage due to uploads_in_blob
On Thursday, April 2, 2015 at 7:50:29 PM UTC+5:30, Paolo Valleri wrote: That is a bug because Grid selects the 'hidden' doc_blob field. Please open an issue on github https://github.com/web2py/web2py/issues/896 -Mandar -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: how to display foreign language symbols
nope. if you need to parse a tab separated file, why on earth would you want to convert it to a csv ? On Thursday, April 2, 2015 at 6:31:45 PM UTC+2, Alex Glaros wrote: this looks like something that would be very valuable to me but I don't know what it is. Can you please explain explicitly? is it replacing every tab with a comma? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.
[web2py] Re: Please report here upgrading issues to web2py 2.10.2
Version 2.10.1-stable+timestamp.2015.04.01.03.27.40 I have one table with record versioning turned on. I get the following in my nginx setup... nginx 502 Bad Gateway Looking in the nginx log I see: 2015/04/02 15:37:13 [error] 1040#0: *67 upstream prematurely closed connection while reading response header from upstream, client: 10.10.2.126, server: ss15, request: POST /contacts/index/edit/contact/5221?district_id=0search_text=steiltag_id=0_signature=81d4b0ab8a5bf5f05de6ed17c6203596d5883f76 HTTP/1.1, upstream: uwsgi://unix:///tmp/web2py.socket:, host: ss15, referrer: https://ss15/contacts/index/edit/contact/5221?district_id=0search_text=steiltag_id=0_signature=81d4b0ab8a5bf5f05de6ed17c6203596d5883f76; If I comment out this line: db.contact._enable_record_versioning() Then it works fine. It works fine on my production server running Version 2.9.5-stable+timestamp.2014.03.16.02.35.39 nginx 1.4.6 on both systems uwsgi version 2.0.6 on the system that works uwsgi version 2.0.10 on the system exhibiting the problem If I run with the built-in rocket server, I see the same behavior. Here is the traceback when running on rocket: ERROR:Rocket.Errors.Thread-2:Traceback (most recent call last): File C:\prod\web2py\gluon\rocket.py, line 1337, in run self.run_app(conn) File C:\prod\web2py\gluon\rocket.py, line 1838, in run_app output = self.app(environ, self.start_response) File C:\prod\web2py\gluon\main.py, line 652, in app_with_logging ret[0] = wsgiapp(environ, responder2) File C:\prod\web2py\gluon\main.py, line 563, in wsgibase return wsgibase(new_environ, responder) File C:\prod\web2py\gluon\main.py, line 533, in wsgibase if request.body: File C:\prod\web2py\gluon\globals.py, line 268, in body self._body = copystream_progress(self) File C:\prod\web2py\gluon\globals.py, line 125, in copystream_progress copystream(source, dest, size, chunk_size) File C:\prod\web2py\gluon\fileutils.py, line 426, in copystream data = src.read(size) ValueError: I/O operation on closed file Please let me know if you need more information to help with this issue. -Jim On Wednesday, April 1, 2015 at 11:03:20 AM UTC-5, Massimo Di Pierro wrote: Please report here upgrading issues to web2py 2.10.2 from which version? which os? which python version? what is the problem? complete traceback -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- 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/d/optout.