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] Database drivers available does not show psycopg2

2019-12-20 Thread 'Annet' via web2py-users
On Mac OS X Catalina with psycopg2 installed in the /Python/2.7/site-packages web2py does not find the psycopg2 driver: Database drivers available: sqlite3, imaplib, pyodbc, pymysql, pg8000 It did on lower versions of Mac OS X, is there a way to solve this issue? Best, Annet -- Resources: -

[web2py] Database reference issue

2019-12-07 Thread Josh Butterworth
Hi everyone, this is probably a trivial issue but I'm struggling with it! When I try and reference a field from another table I can get it to reference the id of the desired row, however I can't get it to reference the name associated with that id. I've highlighted the lines of code that are c

[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: >

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

2019-07-13 Thread Constanza Lagunas
Hi! I'm a beginner on web programming and just started with web2py. So I was wondering how should I connect from my web2py site to a SQL Server Database? I need to mention that my connection string uses *Trusted_Connection**=True*, so I don't connect with user nor password. I'm sorry! It may be

[web2py] database queries

2019-04-05 Thread learthurjoly
Hello everybody. I ask you because I can’t make queries in my database with the DAL as I wish. Here my context. I have two tables like this: db.define_table(‘spare_parts’, Field('name',…), Field(‘best_price’,…) Field(‘best_delay’,…) db.define_table(‘supplier_choice’,

[web2py] database field is added and deleted immediately afterwards

2018-09-03 Thread Yebach
Hello When I add a field to my db.py I get an error saying field does not exist. If I check the sql log file there is timestamp: 2018-09-03T12:08:38.256000 ALTER TABLE counters ADD c_total_difference INTEGER; success! timestamp: 2018-09-03T12:08:38.381000 ALTER TABLE counters DROP COLUMN c_total

[web2py] Database question: 60 boolean fields + string:list or all string:list?

2018-05-09 Thread Management Backoffice
App has a venue listing feature. Many boolean fields (let's say it's 60, not sure whether it'll be 12 or 30 or 60, so I'll guess high) exist from the start: Has pool, has changing room, has washer/dryer, etc. These will be part of the model schema for venus. On top of that the user will be abl

[web2py] database update not executed in Exception

2018-01-30 Thread Yebach
Hello In my try-Except block I have a db update to update database back to initial value if code fail. Looks like update is not executed. except Exception as e: "Če je napaka pri ustavljanju woshi engina" #db.rollback() db(db.scripts.id == scriptId).update(sc_status = 10) db.comm

[web2py] Database administration error

2018-01-22 Thread SR
When I try to open my Database Administration window I am getting this error ticket: Error ticket for "cryoem"Ticket ID 10.51.133.94.2018-01-22.17-44-57.ddaeb556-9bc8-46b4-8dde-99a3c6eee6e7 (1025, "Error on rename of './db_cryoem/#sql-6313_9e' to './db_cryoem/auth_user' (errno: 150)")Version we

[web2py] Database question, problem adding column

2017-02-07 Thread Martin
Still having this issue! Do the migration not work for mysql databases? I never had this problem with sqlite, but for various reasons I cannot use an sqlite database. I have now also tried manually adding the field by altering the table in the database and can then start the app. However, when

[web2py] Database question, problem adding column

2017-02-05 Thread martin
Hi, I have an app in production to which I am trying to add a new column to an existing table. I have done this kind of thing before but now I am getting (1054, u"Unknown column 'product.category_tags' in 'field list'") (category_tags being the new column name) I have tried combinations of migr

[web2py] Database error: month must be in 1..12

2016-12-28 Thread Nabil Ontour
Hello, I can't access my web2py page anymore, as it is showing the following error: month must be in 1..12 Variables datetime.date val '2016-14-12' global datetime builtinint val.split builtinmap I am using SQLite. I can't access the database from the admin frontend either, as a query t

[web2py] Publishing inserted data of web2py database to Amazon SNS topic

2016-09-09 Thread madhu nomula
(stored tables data of web2py database) will be handled in SNS? Thank you and appreciate your help. Regards, MC -- 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

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

[web2py] database updation error

2016-07-10 Thread parulsharmma
whenever we are updating values in a database, we encounter previous values instead of getting updated values.. why is it happing?? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issue

[web2py] Re: Filling web2py database from an external listening process using DAL

2016-05-10 Thread Adam Drzewiecki
W dniu wtorek, 10 maja 2016 20:18:09 UTC+2 użytkownik Dave S napisał: > > On Tuesday, May 10, 2016 at 9:39:38 AM UTC-7, Adam Drzewiecki wrote: >> >> Hi Gavin, >> >> Yes, you need to define tables again, but only in your "homemade task >> queues". >> Mayby i'm wrong, because i'm new in web2py, but

[web2py] Re: Filling web2py database from an external listening process using DAL

2016-05-10 Thread Dave S
On Tuesday, May 10, 2016 at 9:39:38 AM UTC-7, Adam Drzewiecki wrote: > > Hi Gavin, > > Yes, you need to define tables again, but only in your "homemade task > queues". > Mayby i'm wrong, because i'm new in web2py, but that works for my app. > I think that's not define in database way (like CREATE

[web2py] Re: Filling web2py database from an external listening process using DAL

2016-05-10 Thread Adam Drzewiecki
Hi Gavin, Yes, you need to define tables again, but only in your "homemade task queues". In db.py you define tables only once. In your external app you have to define every time you use it. Mayby i'm wrong, because i'm new in web2py, but that works for my app. I think that's not define in databa

[web2py] Re: Filling web2py database from an external listening process using DAL

2016-05-10 Thread Gavin Kenny
Hi Adam, I am suprised you need to define the tables again. I would expect you would open access to the database via a call to the DAL and then use an insert command to add more information, or is that what you meant? regards Gavin On Tuesday, 10 May 2016 09:54:53 UTC+1, Adam Drzewiecki wrote

[web2py] Re: Filling web2py database from an external listening process using DAL

2016-05-10 Thread Adam Drzewiecki
Hi. I'm writing a similar application - i'm logging clients events in database. I used homemade task queues to run listener. I start whole project with bat: start C:\Python27\python.exe web2py.py -S Test -M -R applications/Test/ private/s.py start C:\Python27\python.exe web2py.py Point of using

[web2py] Filling web2py database from an external listening process using DAL

2016-05-08 Thread Gavin Kenny
Hi, I have been watching web2py for some time and really like it. I have worked through a few basic examples but this is my first "real" project. I am looking at making a simple Log manager, where I have a python listener that parses incoming logs and then loads them into the database and then

Re: [web2py] Re: Accessing / connecting to web2py database with GUI

2015-12-10 Thread Richard Vézina
The purpose of web2py is not actually to build form to create/update/read/deletet database value? If you want to connect to another database then the default one that is definte in application/welcome/models/db.py connection string which should be sqlite if you don't have change the welcome app, y

Re: [web2py] Re: Accessing / connecting to web2py database with GUI

2015-12-10 Thread Dave S
On Thursday, December 10, 2015 at 3:39:07 PM UTC-8, Dave S wrote: > > [...] SQLite3 is a fairly robustly featured DB, but is best suited for small > databases and development work. Note that this has to do with scaling, not features. It's built to use a conventional filesystem, and uses

Re: [web2py] Re: Accessing / connecting to web2py database with GUI

2015-12-10 Thread Dave S
On Thursday, December 10, 2015 at 3:03:23 PM UTC-8, Sam Heather wrote: > > Just the kind of tweaks where I might want to edit a value. I'm trying to > allow that kind of admin access to non-techies who don't know SQL, so the > kind of GUI that allows them to view the database like a spreadsheet

Re: [web2py] Re: Accessing / connecting to web2py database with GUI

2015-12-10 Thread Sam Heather
Just the kind of tweaks where I might want to edit a value. I'm trying to allow that kind of admin access to non-techies who don't know SQL, so the kind of GUI that allows them to view the database like a spreadsheet (as is available for MySQL) would ideal. I read I can actually switch Web2PY to us

Re: [web2py] Re: Accessing / connecting to web2py database with GUI

2015-12-10 Thread Dave S
On Thursday, December 10, 2015 at 2:38:23 PM UTC-8, Sam Heather wrote: > > Thanks for the tip. I'm specifically looking for a GUI, but as far as I > can tell you have to install one on the local server - it can't be done > remotely without downloading the db, editing it, and re-uploading it :( >

Re: [web2py] Re: Accessing / connecting to web2py database with GUI

2015-12-10 Thread Sam Heather
ursday, December 10, 2015 at 11:41:27 AM UTC+1, Sam Heather wrote: >>> >>> Hi there, >>> Is it possible to access the Web2Py database remotely using a GUI tool? >>> Web2Py doesn't seem to use the normal instance of sqlite (which isn't >>> installed

[web2py] Re: Accessing / connecting to web2py database with GUI

2015-12-10 Thread Dave S
dard SQLite3 command line tool. I've not tried GUI tools, but I can vouch that SQLite3 seems happy (Fedora 16, Centos 65, and Windows 7 so far). /dps > On Thursday, December 10, 2015 at 11:41:27 AM UTC+1, Sam Heather wrote: >> >> Hi there, >> Is it possible to access

[web2py] Re: Accessing / connecting to web2py database with GUI

2015-12-10 Thread Niphlod
if you're using sqlite, by default the file is stored under the databases/ directory of your app. On Thursday, December 10, 2015 at 11:41:27 AM UTC+1, Sam Heather wrote: > > Hi there, > Is it possible to access the Web2Py database remotely using a GUI tool? > Web2Py doesn&

[web2py] Accessing / connecting to web2py database with GUI

2015-12-10 Thread Sam Heather
Hi there, Is it possible to access the Web2Py database remotely using a GUI tool? Web2Py doesn't seem to use the normal instance of mysql installed on the server - how can I find that instance and connect to it via an SSH tunnel using the SQL GUIs on my Mac? I don't want to hav

[web2py] database is locked

2015-11-24 Thread Pierre
Hi everyone, I tried to unlock with db.executesql('PRAGMA journal_mode=WAL') import sqlite3 >print sqlite3.sqlite_version >3.8.2 Ticket ID 127.0.0.1.2015-11-24.17-39-38.f55ca936-a038-42

[web2py] database query parsing

2015-08-11 Thread Iancic Bogdan
I have the following query: available_designs = db(db.component.id==db.component_stock.fk_stock_component)(db.stock.fk_componentstock_authuser==auth.user).select() which returns me a row: in view I want to print a table having the following columns: name, component_description, prints_available

[web2py] Database migration problem

2015-06-05 Thread Julien Courteau
Hello, (1) I use sqlite (2) In development I made the following change to a given table: db.define_table(... Field('description', 'text'), ... ) becomes: db.define_table(... Field('description_en', 'text'), Field('description_fr', 'text'), ... ) Everything went well. (3) Then I tri

[web2py] Database

2015-05-27 Thread Nico de Groot
Hello Dan, You can only see and use tables and fields you define in a model file, see the web2py book for details. Nico de Groot -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/li

[web2py] Database

2015-05-27 Thread Dan Hett
When I connect to an existing database, do I need to define the tables in DB.py? -- 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 messag

[web2py] Database Update of Encrypted Fields

2015-05-25 Thread Anthony
Validators apply to forms. If you want to run validators when doing a manual insert or update (i.e., not via a form), you have to use .validate_and_insert or .validate_and_update. Anthony -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2

[web2py] Database Update of Encrypted Fields

2015-05-25 Thread horridohobbyist
I have the following table definition: db.define_table('person', Field('email',requires=IS_NOT_IN_DB(db,'person.email')), Field('password',requires=[CRYPT(salt=False)]), Field('reg_key')) I have the following function definition for a REST service:

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

[web2py] database chema recommendations needed

2015-04-21 Thread John
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/app for my sister. Genealogical resources. Lots of records that will need to be added via csv and also via forms. Will also need to be

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

[web2py] Database

2015-04-05 Thread Ron Chatterjee
I would say u want to start with sqlite n before deployment u can choose something more applicableble to ur requirents. There r no right or wrong ans. If performance n security is huge use mysql. Otherwise the open source -- Resources: - http://web2py.com - http://web2py.com/book (Documentatio

[web2py] Database

2015-04-05 Thread Wellington Faria
Hi! I would like to know wich is better database to use in web2py? Mysql or postgre? 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 recei

[web2py] database table/class/model functions

2015-01-25 Thread uday saraf
Say I have a "persons" table, which has the following columns- "Firstname", "Lastname", "DateOfBirth". Now assuming many different parts of the application display information from these three columns together. Is there a way I can define a function *persons.information *that returns the conca

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] database select from set encoding

2014-12-29 Thread Yebach
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 endoed as 'Moj\xc4\x8dca' where it should write Mojčca How do i set the enc

[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

[web2py] web2py database

2014-10-09 Thread T.R.Rajkumar
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://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (

[web2py] Database Access Layer (Not to be confused with database abstraction layer)

2014-10-02 Thread David Freedman
In one of my web2py apps, I’ve got a dynamic database calls sprinkled throughout my controllers. While I don’t yet want to factor database access out into a restful api, I do want to factor it out into a resource design of a similar style even though it will use native python objects rather

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

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

2014-09-11 Thread Jan Beilicke
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 I would be glad if somebody could point me into the right direction. I created a small sample ER diagram to illustrate my problem, only the impo

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

[web2py] web2py database migration workflow

2014-08-30 Thread Diogo Munaro
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, but by now only git) and databases (by now only mysql and postgres, but extensib

[web2py] Database per subdomain

2014-07-29 Thread Ruud Schroen
Hi list, I'm working on a portal where people can look for healthcare in a given municipality. Imagine if each municipality has it's own portal, for example: leudal.zorgloketlimburg.nl maas.zorgloketlimburg.nl What would be the most efficient way to fetch a different database for different su

[web2py] Database query using exclude or "Does not contain"

2014-06-26 Thread Douglas Campbell
Hello, I am trying to filter out specific values in an SQLFORM.grid but I can not figure out how to do this in the Query. Right now I have something like: (cd.value.contains(filter_value_inc, all=False)) And this gets the values that I want to be included. filter_value_inc holds a li

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

[web2py] Database help

2014-05-27 Thread jimbo
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 lines of code, this has worked very well. Now the database has grown, that is it/they hav

[web2py] Database compute fields

2014-04-13 Thread Anthony
I believe you have to provide the price field in your update as well. -- 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 yo

[web2py] Database compute fields

2014-04-13 Thread horridohobbyist
I have the following table: db.define_table('cart', Field('quantity','integer'), Field('in_stock','integer',writable=False,represent=lambda v, r: 'Pre-ordered' if v < 0 else '√'), Field('price','float',writable=False,represent=lambda v, r: 'C'+loca

[web2py] Database access without DAL but with connection pool

2014-03-18 Thread tech . uz
Dear Sirs, I understand it's possible to use databases without DAL. For example function in controller: def values(): client = pymongo.MongoClient('localhost', 27017) db = client.mybase mytable = db["mytable"] res = mytable.find() . return dict() And of course i

[web2py] database callback return an error when using bulk_insert

2014-03-14 Thread 黄祥
hi, i have a database callback when using bulk_insert it return an error : db(db.product.id == f.product).update(quantity = db.product(f.product).quantity + f.quantity) AttributeError: 'list' object has no attribute 'product' here is the code that produce error above: *# error traceback* *mode

Re: [web2py] REF: Web2py database issue

2014-01-14 Thread Richard Vézina
Notice migrate_neabled=False as notting to do with read only, it only tell to web2py to not migrate apply to the models in models.py. It is more of a complement. You may also consider to use auth permissions and set them to read and select for every objects in your database for more sercure read o

Re: [web2py] REF: Web2py database issue

2014-01-14 Thread Anthony
On Tuesday, January 14, 2014 9:56:25 AM UTC-5, Richard wrote: > > Notice migrate_neabled=False as notting to do with read only, it only tell > to web2py to not migrate apply to the models in models.py. It is more of a > complement. > The point is that if two applications are accessing the databa

Re: [web2py] REF: Web2py database issue

2014-01-13 Thread Teddy Nyambe
Brilliant, am using mural db...have found an inbuilt replication feature in mysql. So will try out the dam(..., migrate_enabled=False) feature for read only. And of course will use only select statements in the read only app. Thanx On 13 Jan 2014 21:42, "Anthony" wrote: > Also, set DAL(..., migr

Re: [web2py] REF: Web2py database issue

2014-01-13 Thread Anthony
Also, set DAL(..., migrate_enabled=False) to prevent migrations. Anthony On Monday, January 13, 2014 2:35:40 PM UTC-5, Richard wrote: > > web2py readonly : > You implement select only in your app function everywhere : > > db().select() > > SQLFORM(..., readonly=True) > > SQLFORM.grid(..., deletab

Re: [web2py] REF: Web2py database issue

2014-01-13 Thread Richard Vézina
web2py readonly : You implement select only in your app function everywhere : db().select() SQLFORM(..., readonly=True) SQLFORM.grid(..., deletable=False, editable=False, create=Flase, details=True, selectable=True) Replication : An audit trail on your table that received the new data should be

  1   2   3   >