[web2py] Re: Creating web apps with Web2py in Azure Web Apps

2015-11-13 Thread Niphlod
we're working towards REDUCING scripts/anything_for_deployment because they quickly become unmaintained. If we start to scripts/deploy/any_cloud_provider_out_there I guess it'll suffer for the same issues. IMHO (maybe) we should use gitbook for recipes. On Friday, November 13, 2015 at 1:46:11

[web2py] Web2py and Graph Databases

2015-11-13 Thread Samuel Sowah
Hello all, I'm trying to build an app and the most suitable type of database to work with for what I want to build would be a graph database. I've done some reading around it and ones like neo4j, orientdb, titan, sparksee, seem to be quite popular in the python communities seeing as they have p

[web2py] Re: Dynamic addition of name-value pairs using SQLFORM or CRUD

2015-11-13 Thread 黄祥
i think you are in the right track, please try to fill the cell phones table with some record, then access the config table, you can see the cell phone field can be choosen more than 1 value (press shift). best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documen

[web2py] registratoin fails with extra field

2015-11-13 Thread Alexandru Asimionese
Hi, i have the following code: db = DAL('mysql://user:pass@127.0.1/dbname', pool_size=8, check_reserved=['mysql'], lazy_tables=True, migrate=False) response.generic_patterns = ['*'] if request.is_local else [] import copy db._adapter.types = copy.copy(db._adapter.types) db._adapter.types[

[web2py] Re: web2py flash using bootstrap3 alerts and flash status is way to bothersome to implement

2015-11-13 Thread Anthony
Note, you are not limited to passing just the text of the flash message via response.flash -- instead, you can send any arbitrary HTML. So, a simpler strategy is just to build the entire HTML DOM for the flash message and send that in response.flash. You then just need to make two adjustments in

[web2py] postgis & web2py geo api

2015-11-13 Thread Pierre
Hi all, Do I have to install third-party software to use postgis in web2py or is it only to change the DAL connection string ? used sqlite so far Is there a place where I could find wider documentation concerning web2py geo api /examples? how to define a geography field ? what should be in

[web2py] Re: registratoin fails with extra field

2015-11-13 Thread Anthony
I see your DAL object has migrate=False -- was the 'lang' field added after you turned off migrations (in which case, it won't be in the database)? On Friday, November 13, 2015 at 6:49:17 AM UTC-5, Alexandru Asimionese wrote: > > Hi, i have the following code: > db = DAL('mysql://user:pass@127.0

[web2py] Re: registratoin fails with extra field

2015-11-13 Thread Alexandru Asimionese
Allready fixed, it's required and validator expects a value in "lang" field from at form submit, and i'm using custom form, and didn't include it. I created field mannualy beacause migration when you have a mysql database in most cases fails, especially auth_user table. Anyway thanks :) -- Res

[web2py] Re: Dynamic addition of name-value pairs using SQLFORM or CRUD

2015-11-13 Thread Anthony
web2py does not provide an out-of-the-box solution for this case. If you create a model like this: db.define_table('config2', ...) db.define_table('phone', Field('config2', 'reference config2'), Field('service_type', 'string'), Field('phone_number', 'string')) Then you could use SQL

Re: [web2py] Re: web2py flash using bootstrap3 alerts and flash status is way to bothersome to implement

2015-11-13 Thread Richard Vézina
Thanks Anthony, my needs was to set a flash message from javascript when the use click on a button with onclick attribute... :) Richard On Fri, Nov 13, 2015 at 9:44 AM, Anthony wrote: > Note, you are not limited to passing just the text of the flash message > via response.flash -- instead, you

[web2py] Re: Web2py and Graph Databases

2015-11-13 Thread Anthony
The DAL doesn't support any graph databases, so you'll have to use third-party libraries to handle any interactions with the database. What kind of "support" are you looking for? Are you saying you want to use the DAL methods to handle queries, inserts, etc.? If so, the current set of methods w

[web2py] Re: registratoin fails with extra field

2015-11-13 Thread Anthony
Note, the reason you don't get a nice error reported on the page is that you didn't add requires=IS_NOT_EMPTY(). Instead, you have only set required=True (which is enforced by the DAL) and notnull=True (which is enforced by the database, though irrelevant in this case because you have specified

Re: [web2py] Re: web2py flash using bootstrap3 alerts and flash status is way to bothersome to implement

2015-11-13 Thread Anthony
On Friday, November 13, 2015 at 10:17:54 AM UTC-5, Richard wrote: > > Thanks Anthony, my needs was to set a flash message from javascript when > the use click on a button with onclick attribute... > Got it. I was responding to the original post. -- Resources: - http://web2py.com - http://web2py

[web2py] Re: SQLFORM.grid export and user_signature issue

2015-11-13 Thread Anthony
The problem is that the grid does not include the query string when hashing the URL to create the signature, but by default, @auth.requires_signature expects the query string to be included when hashing. As a result, the signature generated by the grid for the export download has the wrong sign

[web2py] Re: Web2py and Graph Databases

2015-11-13 Thread Samuel Sowah
I need to register users, then keep track of the connections that users make, and be able to tell the shortest path between two users based on the connections they make, and then also be able to tell if they don't connect in anyway at all. The DAL has convenience methods for auth stuff which the

[web2py] Re: Web2py and Graph Databases

2015-11-13 Thread Anthony
On Friday, November 13, 2015 at 11:01:45 AM UTC-5, Samuel Sowah wrote: > > I need to register users, then keep track of the connections that users > make, and be able to tell the shortest path between two users based on the > connections they make, and then also be able to tell if they don't conn

[web2py] Re: Dynamic addition of name-value pairs using SQLFORM or CRUD

2015-11-13 Thread at
Thank you Anthony. I got your point. On Friday, 13 November 2015 20:13:32 UTC+5, Anthony wrote: > > web2py does not provide an out-of-the-box solution for this case. If you > create a model like this: > > db.define_table('config2', ...) > > db.define_table('phone', > Field('config2', 'referen

[web2py] Re: Creating web apps with Web2py in Azure Web Apps

2015-11-13 Thread Paolo Valleri
we can start using github wiki for all things in script/* Paolo On Friday, November 13, 2015 at 9:09:12 AM UTC+1, Niphlod wrote: > > we're working towards REDUCING scripts/anything_for_deployment because > they quickly become unmaintained. > If we start to scripts/deploy/any_cloud_provider_out_

[web2py] Re: postgis & web2py geo api

2015-11-13 Thread Paolo Valleri
have a look at http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer?#PostGIS--SpatiaLite--and-MS-Geo--experimental- and a basic example here: http://www.web2pyslices.com/slice/show/1899/leaflet-and-geojson-with-web2py Paolo On Friday, November 13, 2015 at 3:47:18 PM UTC+

Re: [web2py] Re: web2py and python3

2015-11-13 Thread Jim S
What are the chances that weppy (www.weppy.org) becomes the Python 3 version of web2py? I'm working with the newly available, officially supported Python implementation on IBM i (formerly AS/400) and it is Python version 3.4 so web2py isn't an option for me. Is there any news or direction for

[web2py] New Web2py Materialize CSS Welcome app scaffold

2015-11-13 Thread Mark Graves
Hey everyone, I just put up a new web2py welcome scaffold app based on materializecss. The repository is available at: https://bitbucket.org/MarkGraves/welcome_materialize/ You can preview it at: https://gravesmedical.pythonanywhere.com/welcome/ There are definitely some issues, but I though

Re: [web2py] New Web2py Materialize CSS Welcome app scaffold

2015-11-13 Thread Richard Vézina
Nice!! I am doudtful about the choice for pink color of Materialize home page though :D But I am really happy that we can start to have choice over Bootstrap, I would like also a Semantic UI scalfold alternative some day soon (I should work on it, but simply to buzy at home to be serious at worki

[web2py] Re: postgis & web2py geo api

2015-11-13 Thread Pierre
Thanks Paolo, I'll experiment with that soon Is it easy to deploy a web2py app utilizing postgis ? for instance at pythonanywhere Le vendredi 13 novembre 2015 18:48:57 UTC+1, Paolo Valleri a écrit : > > have a look at > http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer

Re: [web2py] New Web2py Materialize CSS Welcome app scaffold

2015-11-13 Thread Mark Graves
LOL. Gonna have to agree with you about the pink, Richard. I just got it up quickly. -Mark On Fri, Nov 13, 2015 at 12:14 PM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Nice!! > > I am doudtful about the choice for pink color of Materialize home page > though :D > > But I am really

Re: [web2py] registratoin fails with extra field

2015-11-13 Thread 'Diogene Laerce' via web2py-users
Hi, > I have no idea why registration fails, no errors. When i remove extra > field "lang" it works > any suggestions? What does the debug admin page say ? Kind regards, -- “One original thought is worth a thousand mindless quotings.” “Le vrai n'est pas plus sûr que le probable.”

[web2py] invalid literal for long() with base 10: 'cli_wiki'

2015-11-13 Thread Mark Billion
SQLFORM(db.cli_wiki) throws this error. At the same time, when I use a different table in its place, all is okthoughts -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

[web2py] Re: invalid literal for long() with base 10: 'cli_wiki'

2015-11-13 Thread Mark Billion
NM. Im an idiot. On Friday, November 13, 2015 at 3:52:20 PM UTC-5, Mark Billion wrote: > > SQLFORM(db.cli_wiki) throws this error. At the same time, when I use a > different table in its place, all is okthoughts > -- Resources: - http://web2py.com - http://web2py.com/book (Documentati

[web2py] Re: SQLFORM.grid export and user_signature issue

2015-11-13 Thread Carlos Kitu
Thank you so much. Maybe this information should be included in the web2py book. Best regards El viernes, 13 de noviembre de 2015, 16:50:32 (UTC+1), Anthony escribió: > > The problem is that the grid does not include the query string when > hashing the URL to create the signature, but by default

[web2py] Prevent response.flash when there is a session.flash in case of multiples components

2015-11-13 Thread Richard
Hello, I try to manage flash message properly with a bunch of related form components embeded into a web2py controller/page... To me the best option would be to check if session.flash is empty and if so set a response.flash though this is not possible since session.flash seems to get cleared o

[web2py] addMarker

2015-11-13 Thread Laurent Lc
I 'd like to see markers on a Map , i ve folowed a tuto but i do not understand why it does not run. I have only one point in fact. If i delete "new GMaps .." there is no map Could you helpe me thanks My View {{extend 'layout.html'}} https://maps.google.com/maps/api/js?sensor=true";> {{f

[web2py] new connection string in scaffold

2015-11-13 Thread Fabiano Almeida
Hi all, I will create a new app in web2py 2.12.3, and I see: db = DAL(myconf.take('db.uri'), pool_size=myconf.take('db.pool_size', cast=int), check_reserved=['all']) How to configure this to connect with remote mysql database ? Thx! Fabiano -- Resources: - http://web2py.com - http://web2

[web2py] Re: new connection string in scaffold

2015-11-13 Thread 黄祥
please take a look at appconfig.ini file in private folder and change the uri value with your own settings : e.g. private/appconfig.ini [db] uri = mysql://MySQLUser:MySQLPassword@MySQLHost/MySQLDatabase best regards, stifan > -- Resources: - http://web2py.com - http://web2py.com/book (Do

Re: [web2py] Re: new connection string in scaffold

2015-11-13 Thread Fabiano Almeida
thanks! 2015-11-13 23:13 GMT-02:00 黄祥 : > please take a look at appconfig.ini file in private folder and change the > uri value with your own settings : > e.g. > private/appconfig.ini > [db] > uri = mysql://MySQLUser:MySQLPassword@MySQLHost/MySQLDatabase > > best regards, > stifan > >> -- >

[web2py] Why there is a blank option in drop-down and how to avoid it?

2015-11-13 Thread at
Hi, When I create a SQLFORM for a table containing following field, it creates a drop-down listing all specified fields and *additionally a blank option*. How can we avoid it? Field('code', default='F3', requires=IS_IN_SET(['U1', 'F3', 'T9', 'K3', 'S2', 'M1', 'Z5'])), T

[web2py] Re: Why there is a blank option in drop-down and how to avoid it?

2015-11-13 Thread 黄祥
i think you can use zero parameter in IS_IN_SET() validators. ref: http://web2py.com/books/default/chapter/29/07/forms-and-validators#Range--set-and-equality-validators best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2