Re: [web2py] Database drivers available does not show psycopg2

2019-12-21 Thread Lovedie JC
Had the same issues. Found out that python was looking for the drivers in anaconda folder instead. Had to rename anaconda. Still then same problems persisted with python 3.6. I had to download the psycopg2 and put the folder in site packages or modules folder. Problem solved. Regards On Fri, Dec 2

[web2py] Re: Web2py Database Connection with SQL Server and Trusted Connection?

2019-07-19 Thread Massimo Di Pierro
Hello Costanza, sorry for the late reply. I am not too familiar with mssql but your database should be identified by a connection string also known as DSN https://www.connectionstrings.com/sql-server/ In web2py you would use: db = DAL('mssql://...') where ... is your dsn string. nas wrote: >

Re: [web2py] database updation error

2016-07-11 Thread Kiran Subbaraman
Are you inserting values into the database from within the python / ipython console? If so, perform a db.commit() after the update. If you are inserting values into the db, while running within the web application, then it will be good to see the code that you use to do this. The db.commit() is

Re: [web2py] database chema recommendations needed

2015-04-21 Thread Richard Vézina
? Richard On Tue, Apr 21, 2015 at 2:29 PM, Ron Chatterjee wrote: > Is this the link that takes to genealogical research? > > On Tuesday, April 21, 2015 at 12:04:29 PM UTC-4, Richard wrote: >> >> And what about just using Gramps (https://gramps-project.org/features/)?? >> >> Richard >> >> On Tue

Re: [web2py] database chema recommendations needed

2015-04-21 Thread Ron Chatterjee
Is this the link that takes to genealogical research? On Tuesday, April 21, 2015 at 12:04:29 PM UTC-4, Richard wrote: > > And what about just using Gramps (https://gramps-project.org/features/)?? > > Richard > > On Tue, Apr 21, 2015 at 2:08 AM, John > > wrote: > >> New to programming and web2py.

Re: [web2py] database chema recommendations needed

2015-04-21 Thread Richard Vézina
And what about just using Gramps (https://gramps-project.org/features/)?? Richard On Tue, Apr 21, 2015 at 2:08 AM, John wrote: > New to programming and web2py. Been dabbling in web design for a while, > building sites with wordpress, plugging things in. My first real project > will be a site/ap

Re: [web2py] Database

2015-04-08 Thread Dave S
On Wednesday, April 8, 2015 at 2:09:02 PM UTC-7, Ron Chatterjee wrote: > > Yes. I had the same issue. I am under the impression I need to: > > (1) install pygraphviz separately and add that to my local python > (canopy/anaconda) compiler/interpreter > > (2) install Graphviz2.38 and add the path

Re: [web2py] Database

2015-04-08 Thread Ron Chatterjee
Yes. I had the same issue. I tried to install it and added the path of "Graphviz2.38" to my windows path (using 8). So, I need to restart (to set the path). Thats why haven't tried again. But I got the same error. I am under the impression I need to install separately and add that to my local

Re: [web2py] Database

2015-04-08 Thread Dave S
On Wednesday, April 8, 2015 at 1:43:57 PM UTC-7, Richard wrote: > > Maybe coming from this : > https://bitbucket.org/al14s/rawr/issue/2/rhel-centos-fedora-pip-pygraphviz-does-not > > ?? > h /dps > > Richard > > On Wed, Apr 8, 2015 at 4:25 PM, Dave S > > wrote: > >> >> On Wednesday, Apr

Re: [web2py] Database

2015-04-08 Thread Richard Vézina
Maybe coming from this : https://bitbucket.org/al14s/rawr/issue/2/rhel-centos-fedora-pip-pygraphviz-does-not ?? Richard On Wed, Apr 8, 2015 at 4:25 PM, Dave S wrote: > > On Wednesday, April 8, 2015 at 8:43:32 AM UTC-7, Richard wrote: >> >> Write model and see the schema with web2py graph model

Re: [web2py] Database

2015-04-08 Thread Dave S
On Wednesday, April 8, 2015 at 8:43:32 AM UTC-7, Richard wrote: > > Write model and see the schema with web2py graph model that rely > on pygraphviz... The rest is a waste of time!! > > :) > Punching the graph button says pygraphviz not found, which just means it isn't bundled with web2py or

Re: [web2py] Database

2015-04-08 Thread Ron Chatterjee
Thank you for your feedback Richard. I will try the graphe model button and let you know. For the time being I start with sql designer despite its fault. On Wednesday, April 8, 2015 at 12:22:28 PM UTC-4, Richard wrote: > > Reverse engineer is easy and commercial product have that... I don't kn

Re: [web2py] Database

2015-04-08 Thread Richard Vézina
Reverse engineer is easy and commercial product have that... I don't know open source schema designer that is enough mature to butter with it... If you wrote your schema all by yourself you will have it in mind and you can refer rapidly to your models when you have a doubt or use Graphe model butto

Re: [web2py] Database

2015-04-08 Thread Ron Chatterjee
I agree with you. And I can understand why no one is interested in data base schema. That said, there are some advantage of using schema. Here is a quote: "Ownership of schemas and schema-owned objects is transferable and Overall, maintenance of database become easier and I will recommend the us

Re: [web2py] Database

2015-04-08 Thread Richard Vézina
Write model and see the schema with web2py graph model that rely on pygraphviz... The rest is a waste of time!! :) On Wed, Apr 8, 2015 at 11:32 AM, Ron Chatterjee wrote: > Because I ran across this link: > > > http://www.vertabelo.com/blog/vertabelo-news/visual-design-of-sqlalchemy-models-in-

Re: [web2py] Database

2015-04-08 Thread Ron Chatterjee
Because I ran across this link: http://www.vertabelo.com/blog/vertabelo-news/visual-design-of-sqlalchemy-models-in-6-steps So I was curious. If I use vertabelo or sqldesigner and save the database as an XML format, is there way to use sqlachemy to generate DAL syntax. I know I am making it more

Re: [web2py] Database

2015-04-08 Thread José Ricardo Borba
Ron, XML is a data interchange format (like JSON, ASCII,...), not suitable to storage data. To storage data, use a database (of your choice). Best regards, 2015-04-08 11:54 GMT-03:00 Kiran Subbaraman : > Won't a lxml based solution do? Am just trying to understand why you want > DAL support for

Re: [web2py] Database

2015-04-08 Thread Kiran Subbaraman
Won't a lxml based solution do? Am just trying to understand why you want DAL support for XML based file-storage? Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Wed, 08-04-2015 7:14 PM, Ron Chatterjee wrote: Speaking of database, if I have

Re: [web2py] Database

2015-04-08 Thread Ron Chatterjee
Speaking of database, if I have the xml file for the database, does anyone know how to use in web2py? fo I need yo use sqlachamy? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/

Re: [web2py] Database

2015-04-07 Thread Richard Vézina
Postgres! On Mon, Apr 6, 2015 at 2:00 PM, Philip Kilner wrote: > Hi Ron, > > On 06/04/15 18:38, Ron Chatterjee wrote: > >> Also, open source product wouldn't be >> as secured as MYSQL since its open source. But I do agree with the rest. >> >> > I don't agree that open source products are inheren

Re: [web2py] Database

2015-04-06 Thread Philip Kilner
Hi Ron, On 06/04/15 18:38, Ron Chatterjee wrote: Also, open source product wouldn't be as secured as MYSQL since its open source. But I do agree with the rest. I don't agree that open source products are inherently less secure then proprietary ones, but in this case both Postgres and MySQL (

Re: [web2py] Database

2015-04-06 Thread Derek
I get what you are saying, GoDaddy is not my choice of a host. In fact, I'd recommend you stay away from them. Openshift is very fast and has competitive rates, and it has PostgreSQL support. In any case, no they apparently don't support Python so yea... On Monday, April 6, 2015 at 10:38:36 AM

Re: [web2py] Database

2015-04-06 Thread Philip Kilner
Hi Derek, On 06/04/15 17:52, Derek wrote: I have to take issue with your 'not for production' criticism of sqlite. OK, but... https://www.sqlite.org/whentouse.html ...just to be clear, that comment was in the context of web2py use, not generally. It has changed a lot since 2009 and y

Re: [web2py] Database

2015-04-06 Thread Ron Chatterjee
Lot of hosting doesn't support Postgres. For example, go daddy. https://support.godaddy.com/help/category/67/web-hosting-databases That said, I realize, go daddy is not a typical python hosting platform. Just playing devils advocate here. Also, open source product wouldn't be as secured as MYSQ

Re: [web2py] Database

2015-04-06 Thread Derek
I have to take issue with your 'not for production' criticism of sqlite. https://www.sqlite.org/whentouse.html It has changed a lot since 2009 and you should really get familiar with it if you are going to use it. Also, concerning the data types, SQLITE only supports 4 data types. NULL, INTEG

Re: [web2py] Database

2015-04-06 Thread Ron Chatterjee
I said, "start with sqlite" before deployment. Means, to get something going pretty quick and prototype. While in deployment or "production", other database is more suitable. I am not a d-base expert. So I can't say which one is better, but since Postgres is an open source, common sense tells m

Re: [web2py] Database

2015-04-06 Thread Philip Kilner
Hi, On 05/04/15 12:07, Wellington Faria wrote: I would like to know wich is better database to use in web2py? Mysql or postgre? I would suggest very strongly that Postgres is a better option. The reason for this is that Postgres runs its migrations (e.g. DDL) inside a transaction, so migrat

Re: [web2py] database select from set encoding

2015-01-02 Thread Paolo Valleri
Postgres adapter sets client_adapter to UTF8 https://github.com/web2py/pydal/blob/master/pydal/adapters/postgres.py#L147 Do you have the same problem without the as_dict? If you have direct (command line) access to the db, post the content of the field. Paolo On Friday, January 2, 2015 4:03:41

Re: [web2py] database select from set encoding

2015-01-02 Thread Vid Ogris
decode('utf-8') crashes my view. and I can't find the error 2014-12-30 19:37 GMT+01:00 Michele Comitini : > the string is a utf-8 encoded string not unicode object > > >>> print 'Moj\xc4\x8dca'.decode('utf-8') > Mojčca > > > > 2014-12-30 15:32 GMT+01:00 Niphlod : > >> let's tackle the problem fr

Re: [web2py] database select from set encoding

2014-12-30 Thread Michele Comitini
the string is a utf-8 encoded string not unicode object >>> print 'Moj\xc4\x8dca'.decode('utf-8') Mojčca 2014-12-30 15:32 GMT+01:00 Niphlod : > let's tackle the problem from another side: if you avoid using DAL and > resort to "pure" psycopg2, does it work ? If yes, can you post the code ? > F

Re: [web2py] database select from set encoding

2014-12-30 Thread Niphlod
let's tackle the problem from another side: if you avoid using DAL and resort to "pure" psycopg2, does it work ? If yes, can you post the code ? >From there we can compare what DAL does and pinpoint the root cause accordingly. On Tuesday, December 30, 2014 8:41:56 AM UTC+1, Yebach wrote: > > He

Re: [web2py] database select from set encoding

2014-12-29 Thread Vid Ogris
Hello Setting db_codec changes nothing 2014-12-29 17:21 GMT+01:00 Marco Mansilla : > El Mon, 29 Dec 2014 05:53:37 -0800 (PST) > Yebach escribió: > > > hello > > > > I have a postgres dabatabase with utf8 encoding > > > > after executing > > workersDb = db(db.worker.w_organisation == org).select

Re: [web2py] database select from set encoding

2014-12-29 Thread Marco Mansilla
El Mon, 29 Dec 2014 05:53:37 -0800 (PST) Yebach escribió: > hello > > I have a postgres dabatabase with utf8 encoding > > after executing > workersDb = db(db.worker.w_organisation == org).select(db.worker.id, > db.worker.w_nick_name).as_list() > > I get a list of dict where my strings are e

[web2py] Re: web2py database

2014-10-09 Thread Derek
I've used it with SQL 2000. Don't try to use legacy tables though. On Wednesday, October 8, 2014 10:46:08 PM UTC-7, T.R.Rajkumar wrote: > > Can I user web2py with mssql server 7? Its an old version of mssql and > web2py connects but could not do any crud. Thank you. > -- Resources: - http://we

Re: [web2py] Database design question regarding the usage of supertypes for a web2py project

2014-09-16 Thread Richard Vézina
You are welcome! Richard On Mon, Sep 15, 2014 at 3:45 PM, Jan Beilicke wrote: > I chose approach B and it works fine. Thanks for mentioning drop downs. > > Kind regards, > > Jan > > Am Donnerstag, 11. September 2014 17:24:40 UTC+2 schrieb Richard: >> >> B will help you filter your drop down of

Re: [web2py] Database design question regarding the usage of supertypes for a web2py project

2014-09-15 Thread Jan Beilicke
I chose approach B and it works fine. Thanks for mentioning drop downs. Kind regards, Jan Am Donnerstag, 11. September 2014 17:24:40 UTC+2 schrieb Richard: > > B will help you filter your drop down of component package if you can only > have in a package the same supertype component. > > Diffic

Re: [web2py] Database design question regarding the usage of supertypes for a web2py project

2014-09-11 Thread Richard Vézina
B will help you filter your drop down of component package if you can only have in a package the same supertype component. Difficults to say without concrete example. Richard On Thu, Sep 11, 2014 at 9:58 AM, Jan Beilicke wrote: > These are just sample names. In reality they are separate busine

Re: [web2py] Database design question regarding the usage of supertypes for a web2py project

2014-09-11 Thread Jan Beilicke
These are just sample names. In reality they are separate business/use case entities sharing only the same supertype, they are not enumerated. Am Donnerstag, 11. September 2014 15:42:47 UTC+2 schrieb Richard: > > Why component_a, _b, _c... You will end up create new table all the time... > > Rich

Re: [web2py] Database design question regarding the usage of supertypes for a web2py project

2014-09-11 Thread Richard Vézina
Why component_a, _b, _c... You will end up create new table all the time... Richard On Thu, Sep 11, 2014 at 7:04 AM, Jan Beilicke wrote: > Hi everyone, > > I'm working on a web2py project which requires a complex relationship > model. I want to use a model that works well with web2py's DAL and

Re: [web2py] Re: web2py database migration workflow

2014-09-02 Thread Diogo Munaro
Hey guys, I updated developers readme: https://github.com/dmvieira/web2py-migrate/blob/master/README.md#for-developers 2014-09-02 17:29 GMT-03:00 Diogo Munaro : > Thank you Dave! > > Hey!! The project have an issue about mercurial [1] and you can help a lot > with sqlite too! > > You just need t

Re: [web2py] Re: web2py database migration workflow

2014-09-02 Thread Diogo Munaro
Thank you Dave! Hey!! The project have an issue about mercurial [1] and you can help a lot with sqlite too! You just need to follow developers guide that I wrote in README: "There are dummy files inside folders version_control and databases. These dummy files are useful if you want to extend th

[web2py] Re: web2py database migration workflow

2014-09-02 Thread Dave S
On Saturday, August 30, 2014 9:15:37 PM UTC-7, Diogo Munaro wrote: > > Hey guys, I was thinking about web2py migrates and how control database > version. > > I did a workflow that take care of database version control and it's > extensible for a lot of version controls (like git or mercurial, bu

Re: [web2py] Database help

2014-05-27 Thread Carlos Correia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Em 27-05-2014 16:42, jimbo escreveu: > Newbie stuff. A few months ago I asked about using web2py to run a simple > internal database, with contact details such as tel number address etc. > Anthony > came up with a brilliant solution using just a few

Re: [web2py] Database help

2014-05-27 Thread Richard Vézina
Would help to know what you want to stored (the other columns) and what you model so far... Richard On Tue, May 27, 2014 at 11:42 AM, jimbo wrote: > Newbie stuff. A few months ago I asked about using web2py to run a simple > internal database, with contact details such as tel number address et

Re: [web2py] database shootout

2013-05-27 Thread Ricardo Cárdenas
Among RDBMSs, I personally prefer Postgres too, for many of the reasons mentioned - quality of build and add-ons, platform availability, SQL compliance, optional commercial support, Oracle compatibility. But another factor to consider is deployment on IaaS/PaaS options. Heroku and OpenShift can

[web2py] Re: web2py database drivers

2013-03-14 Thread Daniel Verdú
Hi Alan, Thanks for your response. It's a windows installation. The PYTHONHOME is pointing to C:\Python27 and the PYTHONPATH is pointing to C:\Python27\Lib. Yes both should be using the same interpreter, I have C:\Python27 in system PATH. It seems that some change made by mapproxy is making that

[web2py] Re: web2py database drivers

2013-03-13 Thread Alan Etkin
> Hi, i have a trouble with database drivers. The problem begins after > installing MapProxy http://mapproxy.org/ using easy_install MapProxy > on the same machine i runs web2py. > > AFAIK, sqlite ships with a standard python installation, there's something wrong about the interpreter module lo

Re: [web2py] database shootout

2013-03-07 Thread Massimo Di Pierro
I have not run my own tests but as I understand it the claim that MySQL is speedier is only true when using it without transactions. If one looks at the web2py dal adapters one can see that the PostgreSQL adapter is the smallest. that is because it is the closest with the standard SQL and has t

Re: [web2py] database shootout

2013-03-07 Thread Richard Vézina
Also you should consider that DAL adapter are not all equal on quality, quality for a given adapter is "correlated" to the user base for a given (my interpretation) and since Postgres is largely used it adapter is really good. Notice that there is two adapter for postgres psycopg2 and pg8000 the fo

Re: [web2py] database shootout

2013-03-07 Thread BlueShadow
Thanks Richard. Postgres Pros: Many User in web2py, open source Cons: Speed MySQL Pros: Speed On Thursday, March 7, 2013 9:57:48 PM UTC+1, Richard wrote: > > Postgres, full open source, supported by a consortium, commercial support > available (ex.: Enterprise DB), build-in Foreing key constra

Re: [web2py] database shootout

2013-03-07 Thread Richard Vézina
Postgres, full open source, supported by a consortium, commercial support available (ex.: Enterprise DB), build-in Foreing key constraint, PL SQL (so you can migrate to Oracle), Still with commercial build you are still at one/ten the price of Oracle DB... Also, I think many serious web2py user he

Re: [web2py] Database table prefix

2012-11-27 Thread Andrew W
What about a "prefix" column, and filter all selects on the prefix. A single database ctructure sounds more scalable and logically you're partitioning the data based on login or context. Prefixing table names doesn't sound like a good idea. --

Re: [web2py] Database table prefix

2012-11-27 Thread Chr_M
No, in some specific cases I can not create another db, because of restrictive permissions of client systems. In worst case I will have to search and replace prefixes in the files. I thought that maybe there is an easier solution that I did not know of. Thanks for all the suggestions! Regards,

Re: [web2py] Database table prefix

2012-11-26 Thread Niphlod
On Monday, November 26, 2012 7:38:31 PM UTC+1, Richard wrote: > > You can't create more db? > > If you use postgres database, you could have look at schema, they serves > that purpose, and I am not sure but I think I read that web2py now support > postgres schemas. > > no schema support in web2

Re: [web2py] Database table prefix

2012-11-26 Thread Richard Vézina
You can't create more db? If you use postgres database, you could have look at schema, they serves that purpose, and I am not sure but I think I read that web2py now support postgres schemas. Richard On Fri, Nov 23, 2012 at 3:09 PM, Chr_M wrote: > That, but even the same app using different ta

Re: [web2py] Database table prefix

2012-11-26 Thread Chr_M
Well, ideal for me would be to define a prefix in the model file and this is automatically added to every defined table and all queries (no idea if it is possible). But this multi-tenancy looks interesting as well, so I will look into it... Thanks! Regards, Chris On Monday, November 26, 2012

Re: [web2py] Database table prefix

2012-11-26 Thread Anthony
Do you have a proposal for how an easier implementation should work? Also, rather than separate tables for different clients, have you considered either multi-tenancyor just using separate databases (in the latter ca

Re: [web2py] Database table prefix

2012-11-26 Thread Chr_M
I guess that nobody has ever had a need for this and that there is not really a solution for it? Regards, Chris On Friday, November 23, 2012 9:09:24 PM UTC+1, Chr_M wrote: > > That, but even the same app using different tables in the same db (but for > different cliënts)... > > Regards, Chris

Re: [web2py] Database table prefix

2012-11-24 Thread Chr_M
That, but even the same app using different tables in the same db (but for different cliënts)... Regards, Chris On Friday, November 23, 2012 7:00:28 PM UTC+1, Richard wrote: > > Why exactly you change prefix? Installing differents apps dbs in the same > db? > > Richard > > On Fri, Nov 23, 2012

Re: [web2py] Database table prefix

2012-11-23 Thread Richard Vézina
Why exactly you change prefix? Installing differents apps dbs in the same db? Richard On Fri, Nov 23, 2012 at 10:57 AM, Chr_M wrote: > Hi, > > I am new to web2py and am migrating an application to web2py. All the > tables have a prefix that changes for the different deployments of the > applica

Re: [web2py] Database interaction with custom html in web2py.

2012-08-23 Thread Amit
Thanks Anthony for your response, it looks like this will generate UI based on the record but I have my own custom html on which I have to perform submit operation , second thing i have to display all inserted records in different custom html with some extra information also how to achieve it in we

Re: [web2py] Database interaction with custom html in web2py.

2012-08-22 Thread Anthony
Note, you don't necessarily need to do this with two separate actions: def copy_record(): form = FORM('Enter record ID:', INPUT(_name='id', _type='integer'), INPUT(_type='submit', _value='Submit')) if request.post_vars.id: record = db.table1(request.post_vars.id)

Re: [web2py] Database interaction with custom html in web2py.

2012-08-21 Thread Amit
Thanks Khalil for providing solution with example..I will write as per below instruction and let you know the result. Thanks once again :) Amit On Wed, Aug 22, 2012 at 11:42 AM, Khalil KHAMLICHI < khamlichi.kha...@gmail.com> wrote: > 1) controller page1: controllers/default.py > > def page1: >

Re: [web2py] Database interaction with custom html in web2py.

2012-08-21 Thread Khalil KHAMLICHI
1) controller page1: controllers/default.py def page1: return dict() 2) view page1: views/default/page1.html page1.html content : Please Enter ID: 3) controller page2: controllers/default.py def page2(): EnteredID = request.vars['EnteredID'] # 1 - check if record exists record = db(db.Yo

Re: [web2py] Database connections speed issue

2012-04-13 Thread Bruce Wade
Ok I fixed the Major slow problem. It was a coding bug, where a session variable was checked and if it was not set the database would be queried to count all adviews currently over 12 million. however the session variable was never updated so this query was always called on every link click :( Tha

Re: [web2py] Database connections speed issue

2012-04-13 Thread Bruce Wade
Ok I want to add when I go to admin/app/database administration it is also slow On Fri, Apr 13, 2012 at 4:17 PM, Bruce Wade wrote: > psql -h connection was instant > psql query was very fast no delay > > python web2py.py -S yaw -M connected without any problems and was fast. > > Think it maybe r

Re: [web2py] Database connections speed issue

2012-04-13 Thread Bruce Wade
psql -h connection was instant psql query was very fast no delay python web2py.py -S yaw -M connected without any problems and was fast. Think it maybe related to rotating banners, new feature. On Fri, Apr 13, 2012 at 12:30 PM, Michele Comitini < michele.comit...@gmail.com> wrote: > To debug do

Re: [web2py] Database connections speed issue

2012-04-13 Thread Michele Comitini
To debug do some tests on the web2py machine using psql with -h check for the time it takes to connect to the remote postgresql server and the time to process a query. If the connection takes a long time to setup, it is most likely some dns related problem. If the queries are slow to complete, the

Re: [web2py] Database connections speed issue

2012-04-13 Thread Bruce Wade
Linode same datacenter different nodes On Apr 13, 2012 11:53 AM, "Bruno Rocha" wrote: > are you connecting by internal private network or over the internet? there > are firewall filtering the packages? > > On Fri, Apr 13, 2012 at 2:33 PM, Bruce Wade wrote: > >> Hi, >> >> When I was running the s

Re: [web2py] Database connections speed issue

2012-04-13 Thread Bruno Rocha
are you connecting by internal private network or over the internet? there are firewall filtering the packages? On Fri, Apr 13, 2012 at 2:33 PM, Bruce Wade wrote: > Hi, > > When I was running the site and database on the same server there were not > speed problems. However as soon as I switched

Re: [web2py] Database trigger like django save ?

2012-03-10 Thread nick name
Le vendredi 9 mars 2012 23:48:30 UTC+1, rochacbruno a écrit : > > To do what Django does we need to have some "hooks' for that 3 events >> (dbset.insert, dbsert.update and Row.update_record) >> >> I can see that if you extend DAL it is possible to redefine via monkey >> patching the .insert metho

Re: [web2py] Database trigger like django save ?

2012-03-09 Thread bussiere adrien
Thanks i will look forward to it. regards Bussiere Le vendredi 9 mars 2012 23:48:30 UTC+1, rochacbruno a écrit : > > in web2py's DAL there is no "save" you have only two ways to store/update > data and it is by using a dbset method such as .update or .insert and using > a update_record functio

Re: [web2py] Database trigger like django save ?

2012-03-09 Thread Bruno Rocha
in web2py's DAL there is no "save" you have only two ways to store/update data and it is by using a dbset method such as .update or .insert and using a update_record functions that is stored in every Row object. To do what Django does we need to have some "hooks' for that 3 events (dbset.insert, d

[web2py] Re: web2py database administration

2011-02-27 Thread Christopher Steel
Hi Stargate, I think what you want is called the DAL or Database Abstraction Layer. The DAL does all of this for you for all of the databases that Web2py support. You create your database schema in Web2py and the DAL sets up whatever database backend you are using. So for example you create this

[web2py] Re: web2py database administration

2011-02-25 Thread stargate
It worked I commented out the following line and I can insert a user. Thanks everybody for the help db.auth_user.registration_id.requires = IS_NOT_IN_DB(db,db.auth_user.registration_id) and On Feb 25, 2:27 pm, Anthony wrote: > On Friday, February 25, 2011 2:19:17 PM UTC-5, stargate wrote: > > >

[web2py] Re: web2py database administration

2011-02-25 Thread Anthony
On Friday, February 25, 2011 2:19:17 PM UTC-5, stargate wrote: > > Thanks for all the help it triggered a idea I will try No problem. Let us know what you do and how it works. Anthony

[web2py] Re: web2py database administration

2011-02-25 Thread stargate
Thanks for all the help it triggered a idea I will try On Feb 25, 1:30 pm, Anthony wrote: > On Friday, February 25, 2011 11:50:40 AM UTC-5, stargate wrote: > > But how do you make it so that it will generate a Registration ID > > automatically.  When i create a new application with the db wizard

[web2py] Re: web2py database administration

2011-02-25 Thread Anthony
On Friday, February 25, 2011 11:50:40 AM UTC-5, stargate wrote: > But how do you make it so that it will generate a Registration ID > automatically. When i create a new application with the db wizard and > connect to the sqllite database I don't have any of these problems. I > can create a n

[web2py] Re: web2py database administration

2011-02-25 Thread stargate
But how do you make it so that it will generate a Registration ID automatically. When i create a new application with the db wizard and connect to the sqllite database I don't have any of these problems. I can create a new user with out giving a registration id On Feb 25, 10:25 am, Anthony wrot

[web2py] Re: web2py database administration

2011-02-25 Thread Anthony
On Friday, February 25, 2011 10:04:36 AM UTC-5, stargate wrote: > > Thanks for all the help I hope i can solve this problem What problem do you still need to solve -- is it just the issue with the "Registration Id" error in appadmin? As far as I can tell, the "registration_id" field is used

[web2py] Re: web2py database administration

2011-02-25 Thread stargate
Thanks for all the help I hope i can solve this problem On Feb 25, 6:53 am, stargate wrote: > Maybe Massimo might need to jump on this. It could be a bug that we > aren't even aware of. > > On Feb 25, 1:58 am, pbreit wrote: > > > I take that back. Appears to be used for approving > > registratio

[web2py] Re: web2py database administration

2011-02-25 Thread stargate
Maybe Massimo might need to jump on this. It could be a bug that we aren't even aware of. On Feb 25, 1:58 am, pbreit wrote: > I take that back. Appears to be used for approving > registrations:http://web2py.com/book/default/chapter/08?search=registration_key

[web2py] Re: web2py database administration

2011-02-24 Thread pbreit
I take that back. Appears to be used for approving registrations: http://web2py.com/book/default/chapter/08?search=registration_key

[web2py] Re: web2py database administration

2011-02-24 Thread pbreit
Is "registration_key" still in use? I took a quick look at source and it didn't look like it was used for anything.

[web2py] Re: web2py database administration

2011-02-24 Thread pbreit
Oh, wow, I totally forgot about the wizard. My apologies. On one hand, I like that auth_user is explicitly defined in the app. But that auth_table looks quite a bit different from what I've seen elsewhere. I wonder which is considered more current? And which is a better base: a Wizard App with

[web2py] Re: web2py database administration

2011-02-24 Thread Anthony
I just tried the wizard, and sure enough, it does generate that custom auth_user table. On Thursday, February 24, 2011 10:49:04 PM UTC-5, stargate wrote: > I know it's weird I just used the web2py application wizard and during > the wizard process it creates a database but I change the connecti

[web2py] Re: web2py database administration

2011-02-24 Thread stargate
I know it's weird I just used the web2py application wizard and during the wizard process it creates a database but I change the connection string to a mysql database then web2py creates the tables with no problems so I am not sure what is going on On Feb 24, 10:44 pm, pbreit wrote: > Hmmm...that

[web2py] Re: web2py database administration

2011-02-24 Thread pbreit
Hmmm...that's weird. New apps usually do not have a custom auth_user table as you have. And custom auth_user tables normally should look more like the one in the web2py doc.

[web2py] Re: web2py database administration

2011-02-24 Thread stargate
Nothing custom. I just created the site using the wizard then change the database connection string to point to mySQL database that is all On Feb 24, 8:42 pm, pbreit wrote: > Also, here's how to create a custom auth_user table if that's what you > want:http://web2py.com/book/default/chapter/08#

[web2py] Re: web2py database administration

2011-02-24 Thread pbreit
Also, here's how to create a custom auth_user table if that's what you want: http://web2py.com/book/default/chapter/08#Customizing-Auth You typically would not include an "id" field in your model since Web2py takes care of that. Are you starting your project from scratch? Where did you get all t

[web2py] Re: web2py database administration

2011-02-24 Thread Anthony
On Thursday, February 24, 2011 7:39:42 PM UTC-5, stargate wrote: > > Here is a copy of the db.py model > > http://www.p3x984.com/db/db.txt > > Not sure if i am missing something It looks like you're using a custom auth_user table. Did you create it yourself or copy it from somewhere? Do you

[web2py] Re: web2py database administration

2011-02-24 Thread stargate
Here is a copy of the db.py model http://www.p3x984.com/db/db.txt Not sure if i am missing something On Feb 24, 12:35 pm, stargate wrote: > I will post my model thanks everybody for all the help. > > On Feb 24, 11:27 am, pbreit wrote: > > > We need to see your model so we can see how "Registra

[web2py] Re: web2py database administration

2011-02-24 Thread stargate
I will post my model thanks everybody for all the help. On Feb 24, 11:27 am, pbreit wrote: > We need to see your model so we can see how "Registration ID" is specified. > It looks like Registration ID may be specified as a unique or non-empty > field and you are leaving it blank or there is alrea

[web2py] Re: web2py database administration

2011-02-24 Thread pbreit
We need to see your model so we can see how "Registration ID" is specified. It looks like Registration ID may be specified as a unique or non-empty field and you are leaving it blank or there is already a record with an empty field in the DB. Also note that Web2py automatically creates an "id"

Re: [web2py] Re: web2py database administration

2011-02-24 Thread Richard Vézina
Forget about it I completly wrong... On Thu, Feb 24, 2011 at 11:02 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > I think you have to add this line at the bottom of your model file after > the table you want to saw in appadmin : > > db.auth_permission.table_name.requires = IS_IN_SET(d

[web2py] Re: web2py database administration

2011-02-24 Thread Anthony
On Wednesday, February 23, 2011 6:56:08 PM UTC-5, stargate wrote: > > > Take a look at the following image when I am creating a user I get the > following error refer to the screen shot. This is connecting to a > mySQL database > > http://www.p3x984.com/images/error/dberror.png Can you show

Re: [web2py] Re: web2py database administration

2011-02-24 Thread Richard Vézina
I think you have to add this line at the bottom of your model file after the table you want to saw in appadmin : db.auth_permission.table_name.requires = IS_IN_SET(db.tables) Richard On Thu, Feb 24, 2011 at 10:56 AM, stargate wrote: > Web2py did create the tables no problem but the problem i

[web2py] Re: web2py database administration

2011-02-24 Thread stargate
Web2py did create the tables no problem but the problem is in this screen shot here http://www.p3x984.com/images/error/dberror.png On Feb 24, 9:53 am, pbreit wrote: > The one thing you have to do separately is create the database (except for > SQLite). After you create the database and put in yo

[web2py] Re: web2py database administration

2011-02-24 Thread pbreit
The one thing you have to do separately is create the database (except for SQLite). After you create the database and put in your db connection string (ex: mysql://username:password@localhost/test) Web2py will create all the tables and fields.

[web2py] Re: web2py database administration

2011-02-24 Thread stargate
I deleted the mySQL database and still get the following error when adding a new user value already in database or empty in the Registration ID. When I created my mySQL database web2py creates the tables with no problem. Here is a screen shot of the database being created http://www.p3x984.com/i

  1   2   >