Re: [web2py] Re: Unable to connect to mssql database

2013-11-10 Thread Cacpacific O
Hi Ross, This is my first time to connect web2py with mssql using pyodbc, Cloud you please advice me how to set it up. Currently I got error message ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)') when I try to

[web2py] Re: Best practice when making downloads more private.

2013-11-10 Thread Alan Etkin
I need a way to make downloads private/one time for the user. What is the best practice for this? Some tools I'd use: - File blob storage fields - File group ownership list:reference auth_group field You could check for empty group ownership in case of no authentication needed. This

[web2py] uploading images without page refresh

2013-11-10 Thread Harish Krishna
My model is this: db.define_table('images', Field('image', 'upload'), Field('title', 'text')) What must my views and controllers be to upload a new image without reloading the page? My knowledge of jquery, php, XML is just about nil. Thanks in advance. -- Resources: - http://web2py.com -

[web2py] Re: uploading images without page refresh

2013-11-10 Thread 黄祥
i think you can achieve it using jquery (onsubmit) and ajax. please check the web2py book about jquery and ajax. ref: http://web2py.com/books/default/chapter/29/11/jquery-and-ajax best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Best practice when making downloads more private.

2013-11-10 Thread 黄祥
* Should I need a special download script? My guess is yes. hm, not sure about the special one. what do you want to achieve using the special download script? * Should I have a special directory and how would I best do that? if you want to store it on directory, you can check it on

[web2py] Verbose output is printed to console after clicking on any button in my application in 2.7.4

2013-11-10 Thread Rahul
Hi All, Recently I upgraded to latest web2py 2.7.4 from 2.5.4. After doing that whenever I click on any of the button in my app ( which calls a function), verbose output for the results of the function are printed on the console and this includes queries. I am not sure if that is a new

[web2py] Re: uploading images without page refresh

2013-11-10 Thread Harish Krishna
I did try it based on the example in the book. What must the return in the controller be? I want a delete button next to the image in the views to delete that specific image without refreshing as well. On Sunday, November 10, 2013 4:06:09 PM UTC+5:30, 黄祥 wrote: i think you can achieve it

[web2py] Re: retrieve auth_group.role from auth_user table

2013-11-10 Thread 黄祥
is there a way to make the auth query (membership, group, and user) run on smartgrid? i've tried the simpler method but got the same error: e.g. def report_doctor(): query = ( (db.auth_user.id == db.auth_membership.user_id) (db.auth_membership.group_id == 3 http://db.auth_group.id/) ) )#

[web2py] Re: uploading images without page refresh

2013-11-10 Thread 黄祥
for a delete button next to the image in the views, i think you can achieve it using A built in helpers. e.g. not tested in views for delete button {{=SPAN(A(I(_class='icon-remove'), callback=URL('function_callback', args=image.id)), delete='tr', _title='Remove Image' % p.name, _class='btn

[web2py] Re: uploading images without page refresh

2013-11-10 Thread Niphlod
you can't upload files with a simple ajax POST, and that's why web2py doesn't support it right out of the box. There is a zillion of javascript plugin to make file uploads working, but they needs adjustment on the receiving part too and careful thinking about browser's support of the needed

[web2py] Re: Best practice when making downloads more private.

2013-11-10 Thread Niphlod
On Sunday, November 10, 2013 7:49:00 AM UTC+1, Encompass solutions wrote: I need a way to make downloads private/one time for the user. What is the best practice for this? * Should I need a special download script? My guess is yes. * Should I have a special directory and how would I best do

[web2py] Re: AD LDAP Auth without creating Auth tables

2013-11-10 Thread Niphlod
Very strange, since fdb is included as an adapter for some time now. I guess firebird adoption is definitely not widespread. This should be addressed in DAL at creation time. Can you provide the syntax that web2py should use vs the sintax that it actually uses ? Maybe open a ticket on google

Re: [web2py] Re: Best practice when making downloads more private.

2013-11-10 Thread Jason (spot) Brower
Great input! I think I will try the following: Create a special directory to store the data. Setup a special controller with the needed permissions and conditions. Have fun and do a little dance. Does this sound sensible? BR, Jason On Sun, Nov 10, 2013 at 2:43 PM, Niphlod niph...@gmail.com

[web2py] Re: Form fields in DB showing a 0 value

2013-11-10 Thread raferbop
When I remove the auto complete widget, the data saves in the database is it should. On Saturday, November 9, 2013 7:34:39 PM UTC-5, 黄祥 wrote: oopss, sorry didn't notice that you are using SQLFORM.widgets.autocomplete, yes, it should. basically the reference type of field is refer to

[web2py] Re: AD LDAP Auth without creating Auth tables

2013-11-10 Thread GregD
Niphlod, I manually defined the auth tables. However, system is now saying auth_user already exist. class 'fdb.fbcore.DatabaseError' ('Error while executing SQL statement:\n- SQLCODE: -607\n- unsuccessful metadata update\n- Table AUTH_USER already exists', -607, 335544351) Version web2py™

[web2py] How to create a db query for data that has not been submitted to the database

2013-11-10 Thread raferbop
Good days guys, I created an order form with the following fields (db.order); - Departure Location - Arrival Location - Date I wanted to display fares between each departure and arrival location, so I created a fare table (db.fare_table); id depart_cityarrival_city

[web2py] Re: Verbose output is printed to console after clicking on any button in my application in 2.7.4

2013-11-10 Thread Massimo Di Pierro
Do you have a view for your action? You probably do not. On Sunday, 10 November 2013 04:53:56 UTC-6, Rahul wrote: Hi All, Recently I upgraded to latest web2py 2.7.4 from 2.5.4. After doing that whenever I click on any of the button in my app ( which calls a function), verbose

[web2py] Re: How to create a db query for data that has not been submitted to the database

2013-11-10 Thread Massimo Di Pierro
fare = db((db.order.depart_from==db.fare_table.from) (db.order.arrive_to== db.fare_table.to)).select(db.fare_table.fare) should be fare = db((db.order.depart_from==value_from) (db.order.arrive_to==value_to)).select(db.fare_table.fare) where value_to and value_from are not fields not

[web2py] Re: AD LDAP Auth without creating Auth tables

2013-11-10 Thread Niphlod
if password and role are reserved keywords, then there is a huge issue because what needs to be changed is how auth creates the scheme by default (and I don't see it happening in web2py for a small percentage of firebird users)... One thing at a time though. We need to figure out the problem

[web2py] Re: Form fields in DB showing a 0 value

2013-11-10 Thread Niphlod
after two days of bashing your head to the wall, why don't you read the docs about the autocomplete widget ? You need to pass the id_field argument http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=autocomplete#Autocomplete-widget On Sunday, November 10, 2013 9:56:46

[web2py] Too many tables selected

2013-11-10 Thread Tito Garrido
Hi Folks, I am trying to execute a simple test in mongodb (it worked on SQLite): Model: db.define_table('mytable', Field('name','string'), Field('age', 'integer'), Field('description', 'text')) db.define_table('another_table', Field('mytable', 'reference mytable'),

[web2py] Re: parent child tree query logic

2013-11-10 Thread 黄祥
i found on internet something like : models/db.py from gluon.dal import Table class TreeProxy(object): skeleton = Table(None, 'tree', Field('ileft', 'integer'), Field('iright', 'integer')) def __init__(self, table): self.table = table def ancestors(self, node): db = self.table._db return

[web2py] Re: Too many tables selected

2013-11-10 Thread Massimo Di Pierro
This is a join table=db((db.mytable.id==db.another_table.mytable)).select() Mongodb does not provide joins (nor transactions) that is why it can do sharding. That is the all point of nosql. On Sunday, 10 November 2013 17:39:07 UTC-6, Tito Garrido wrote: Hi Folks, I am trying to

[web2py] Re: parent child tree query logic

2013-11-10 Thread Massimo Di Pierro
I think in for node in treeproxy.ancestors(db.mytree(id)).select(): print node.name or for node in treeproxy.descendants(db.mytree(id)).select(): print node.name db.mytree(id) is None. On Sunday, 10 November 2013 17:41:11 UTC-6, 黄祥 wrote: i found on internet something like :

[web2py] Re: Installing the jqmobile plugin

2013-11-10 Thread Dan J Clark
On Friday, November 8, 2013 11:59:39 AM UTC-5, Philip Kilner wrote: Hi All, On 07/11/13 18:30, Philip Kilner wrote: Found a note here: - https://groups.google.com/forum/#!topic/web2py/W9b3RZBrmYQ ...where Massimo says the posted plugin online is old and broken (I need to fix

[web2py] mssql connection

2013-11-10 Thread Ariya Oaum-aram
Dear all, I have to connect mssql database which is locate on another server, I use pyodbc for and it work well from pyodbc.connect() But I cant set it work on DAL() Thank you very much Ariya -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] logging in web2py

2013-11-10 Thread Jayadevan M
Hi, We wanted to log user actions in a customized manner. For example User abc clicked on link http://dsdsdfsdf;, User user2 rquested access etc. This, ieally, should be logged into a database table so that we can analyze user behaviour later. Also, in the event of such inserts failing, the

Re: [web2py] web2py Components for layout.html and other HTML pages [ not derived from layout.html]

2013-11-10 Thread Kiran Subbaraman
+ 1. This is something I would like to have - makes it easier to create custom layouts. The separate layout components are defined the way you mention, with the out-of-the-box layout.html being a good example that combines all of them to good effect.

Re: [web2py] web2py Components for layout.html and other HTML pages [ not derived from layout.html]

2013-11-10 Thread Johann Spies
+1 On 11 November 2013 06:32, Kiran Subbaraman subbaraman.ki...@gmail.comwrote: + 1. This is something I would like to have - makes it easier to create custom layouts. The separate layout components are defined the way you mention, with the out-of-the-box layout.html being a good example

Re: [web2py] Scheduler - a second try

2013-11-10 Thread Johann Spies
On 9 November 2013 15:05, Niphlod niph...@gmail.com wrote: @spies: sorry for the digressions, any luck figuring out what database backend you're using ? Yes. I replied earlier in this thread: Postgresql. -- Because experiencing your loyal love is better than life itself, my lips will