[web2py] problem in Using highslide js in web2py ?

2013-11-04 Thread Sampath Reddy
Hi, I am trying to view my image gallery by using highslide js in my application. But I am not able to load/link graphics folder to hs.graphicsDir. As this is necessary for all the effects in viewing my image gallery. I am struck here. Could anyone please help me to fix

[web2py] Re: upgraded to 2.7.4 no admin ui

2013-11-04 Thread Lewis
Solved. Studied the ubuntu-nginx-uwsgi script. It was a simple permissions problem. I am not a very good linux administrator. Comments about difficulty of config still stand, but I am an idiot. The clean install works just fine with version 2.7.4. On Sunday, November 3, 2013 10:42:46 PM

Re: [web2py] how do i return several rows from json using ajax?

2013-11-04 Thread Diogo Munaro
Try: return response.json(yourjson) Em 03/11/2013 08:13, Ricardo Pedroso rmdpedr...@gmail.com escreveu: Try change the response content-type, see below: On Sun, Nov 3, 2013 at 6:28 AM, Mihir Lade lade.mi...@gmail.com wrote: hi, i have a function in a controller which queries the database

Re: [web2py] aplicação com calculo de campos

2013-11-04 Thread Diogo Munaro
Usa o openerp Em 03/11/2013 14:08, Hermano Ponce mangabeir...@gmail.com escreveu: Valeu Diogo. Já procurei por ali. Web2py é muito ágil e bom pra algumas coisas mas tem suas limitações. Estou a procura de App tipo estoque de produtos. Mesmo valeu e estamos aí. Em 03/11/2013 10:37, Diogo

Re: [web2py] aplicação com calculo de campos

2013-11-04 Thread Ovidio Marinho
Hermano, vai existir varias app's com essa necessidade sua, mas você ja fez ai no exemplo como calcular as coisas em python substitua o seu exemplo campo A * campo B = campo C oucampo A + campo B = campo C. por: CampoC = db.tabela.campoA + db.tabela.campoB (Adição) ou CampoC =

Re: [web2py] aplicação com calculo de campos

2013-11-04 Thread Vinicius Assef
Hermano, vale lembrar que Web2py é um framework para desenvolvimento de aplicações web. Sendo assim, temos à nossa disposição a infraestrutura para programadores trabalharem. O Web2py não é: - um CMS - um conjunto de componentes com regras de negócio Talvez você esteja procurando algum sistema

[web2py] autocomplete widget to query odbc data sources

2013-11-04 Thread António Ramos
hello i need an autocomplete widget to autocomplete with data from an external odbc database is this possible to tweak the autocomplete widget or i need to create my own? Thank you -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] Static files outside of web2py

2013-11-04 Thread Annet
In layout.html I uncommented the following lines: link rel=stylesheet href=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/base/jquery-ui.css; type=text/css media=all / script src=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js; type=text/javascript/script

[web2py] Web2py freezing on live deployment!

2013-11-04 Thread Andrew Buchan
Hi, I have a serious issue. Got a web2py install running as a service on a Windows 2003 box with SQL Server, with applications serving 100s of users in-house. We have a live and test application running on the same install but pointing to different databases, and due to things not being

[web2py] Re: add new button in GRID with same look and feel

2013-11-04 Thread Sarbjit
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups web2py-users group. To

Re: [web2py] What is inserting '_2.7.3' into my static url's?

2013-11-04 Thread Johann Spies
On 31 October 2013 19:00, Niphlod niph...@gmail.com wrote: it's not a forgotten piece of codeit's there for a reason. What is the version referring to in admin/0.py/? It if it supposed to be the current web2py version then it is a piece of forgotten code because in Web2py 2.7.4. it 0.py

[web2py] Membership no longer respected.

2013-11-04 Thread Johann Spies
The following configuration stopped working (I suspect with the upgrade to 2.7.4): I have this in auth_membership: 10 https://crest2.sun.ac.za/nkb/appadmin/update/db/auth_membership/10 johann.spies https://crest2.sun.ac.za/nkb/appadmin/update/db/auth_user/2managers (4)

[web2py] Re: Web2py freezing on live deployment!

2013-11-04 Thread Willoughby
Are you running Microsoft Endpoint Security? I have problems with the virus scanner 'locking up' things under even light usage. One or two users can bang all day, no problem but get more than 10 and it randomly freezes. Our fix was to exclude pretty much anything Python related. YMMV. On

[web2py] Re: problem in Using highslide js in web2py ?

2013-11-04 Thread Anthony
From the highslide documentation, it looks like you could put the highslide files in /web2py/applications/yourapp/static/js/highslide/, and then in layout.html: script type=text/javascript src={{=URL('static', 'highslide/highslide.js')}}/script link rel=stylesheet type=text/css

[web2py] Re: Add custom class to...

2013-11-04 Thread Anthony
Maybe something like: def mygrid(): if 'view' in request.args: db.table.combitext.represent = lambda x, row: DIV(x, _class= 'big-chunk') return dict(grid=SQLFORM.grid(db.table) Anthony On Monday, November 4, 2013 2:51:49 AM UTC-5, lyn2py wrote: I am using SQLFORM.grid and I

Re: [web2py] What is inserting '_2.7.3' into my static url's?

2013-11-04 Thread Richard Vézina
web2py/VERSION ?? But as I said you could need to change your apache config... This is the example for nginx from the book : # file /etc/nginx/sites-available/web2py server { listen 80; server_name $hostname; #to enable correct use of response.static_version

[web2py] db.mytable[0] = dict(myfield='somevalue') return id

2013-11-04 Thread Annet
According to the book this: db.mytable[0] = dict(myfield='somevalue') is equivalent to this: db.mytable.insert(myfield='somevalue') Does the first expression return the id of the inserted record? If so, would this work: interfaceID = (db.interface[0] = dict(nodeID=nodeID,

Re: [web2py] Membership no longer respected.

2013-11-04 Thread Richard Vézina
What the if 'auth' in globals(): for?? If you have it to make sure user it logged you can use the and/or tricks : if auth.user and auth.has_membership('managers'): If you remove it what happen? Richard On Mon, Nov 4, 2013 at 8:18 AM, Johann Spies johann.sp...@gmail.com wrote: The

[web2py] Re: Add custom class to...

2013-11-04 Thread lyn2py
Thanks Anthony! On Monday, November 4, 2013 9:41:04 PM UTC+8, Anthony wrote: Maybe something like: def mygrid(): if 'view' in request.args: db.table.combitext.represent = lambda x, row: DIV(x, _class= 'big-chunk') return dict(grid=SQLFORM.grid(db.table) Anthony On

Re: [web2py] db.mytable[0] = dict(myfield='somevalue') return id

2013-11-04 Thread Richard Vézina
You can try that and you found that it's not going to work... Why regular insert doesn't work for you? I don't see any advantage to do the insert that way... Richard On Mon, Nov 4, 2013 at 9:42 AM, Annet anneve...@googlemail.com wrote: According to the book this: db.mytable[0] =

Re: [web2py] Re: problem in Using highslide js in web2py ?

2013-11-04 Thread Anthony
Maybe try adding the trailing / to the graphicsDir URL: hs.graphicsDir = '{{=URL('static', 'highslide/graphics') + '/'}}'; Anthony On Monday, November 4, 2013 9:26:56 AM UTC-5, Sampath Reddy wrote: Thank you Anthony for your quick replay. But I already tried loading graphics folder

Re: [web2py] embed image from variable

2013-11-04 Thread Josh Myers
Thank you Massimo. Everything is working now. I misunderstood something. Michele, thanks for the tip! On Thursday, October 31, 2013 1:50:02 PM UTC-4, Michele Comitini wrote: Maybe you want embed in html which is much cooler it requires only one single request/response: def index():

[web2py] IS_DATE validate and internationalization

2013-11-04 Thread Diogo Munaro
Hi, I'm using web2py 2.7.2 and date fields on DAL are translating your validate. Example: I have in model: product = db.define_table('product', Field('expiration','date')) db.product.expiration.requires = IS_DATE(format('%Y-%m-%d')) T.force(None) When I insert a date like this: *2013-11-19*

[web2py] Re: Downloading files from the disk using the path specfied in the db

2013-11-04 Thread Massimo Di Pierro
Do not understand what you want to do. :-( On Saturday, 2 November 2013 22:33:44 UTC-5, Sarbjit wrote: I have a model which is having a field having the path of the file (could be of big size) and is present outside the web2py folder. In the web2py book, examples given for downloading files

[web2py] Re: autocomplete widget to query odbc data sources

2013-11-04 Thread Massimo Di Pierro
You should be able to do it. We need more info to provide an example. On Monday, 4 November 2013 05:10:44 UTC-6, Ramos wrote: hello i need an autocomplete widget to autocomplete with data from an external odbc database is this possible to tweak the autocomplete widget or i need to create

Re: [web2py] IS_DATE validate and internationalization

2013-11-04 Thread Richard Vézina
Are you talking about the error message? This should work : IS_DATE(format=T('%Y-%m-%d'), error_message=T('Valid date of format : -MM-DD')) Notice the T() above... Richard On Mon, Nov 4, 2013 at 10:19 AM, Diogo Munaro diogo.mvie...@gmail.comwrote: Hi, I'm using web2py 2.7.2 and date

[web2py] Migrating Django User Accounts

2013-11-04 Thread Andy B
I have a legacy Django app that is due for a major overhaul. Instead of continuing to use Django I would really like to make the switch to use web2py instead. The only thing that's holding me back is the existing app has several hundred Django user accounts that need to be migrated. I'm unable

Re: [web2py] Migrating Django User Accounts

2013-11-04 Thread Richard Vézina
You could just force your user to update their password on the next connection? So once you swith to web2py first connection user will have to create a new password. Richard On Mon, Nov 4, 2013 at 9:16 AM, Andy B andrew.c.ben...@gmail.com wrote: I have a legacy Django app that is due for a

[web2py] Re: Migrating Django User Accounts

2013-11-04 Thread Massimo Di Pierro
In web2py they look like: pbkdf2(1000,20,sha512)$99f92ea3b8cdb79f$788117d26668f147cd8f10652cb61e51532d4e04 alg(parameters)$salt$base16encoded Try this: import re, base64 a = pbkdf2_sha256$1$FL21dN1vykVF$SUkANu/eKdKeUeT5lYr06aMpC5/T0vrBDo/iSy+ExyI= def convert(p): a,b,c,d =

Re: [web2py] What is inserting '_2.7.3' into my static url's?

2013-11-04 Thread LightDot
The number doesn't really matter. It's supposed to stay the same until a static file's content changes, then it should be changed in order to prevent the browser cache to display the wrong file contents. So it can be 2.7.3 or 19283773.39393.3939393, doesn't matter. How are you using apache?

Re: [web2py] IS_DATE validate and internationalization

2013-11-04 Thread Diogo Munaro
No, the problem is that the form get accepted only if the browser language is english. Otherwise, if the browser is in portuguese it's change the validation to DD-MM-, but I don't want I don't want T or internalizations 2013/11/4 Richard Vézina ml.richard.vez...@gmail.com Are you talking

[web2py] Re: Web2py freezing on live deployment!

2013-11-04 Thread LightDot
Which version of web2py is it? Are you using gevent or rocket web server? Can you try load testing your devel version and see if you can replicate the issue? You can use something like siege or a similar tool. Regards On Monday, November 4, 2013 4:56:32 PM UTC+1, Andrew Buchan wrote: Thanks

Re: [web2py] Re: autocomplete widget to query odbc data sources

2013-11-04 Thread António Ramos
I have a table in an odbc connected database i already have my connection setup because of other controllers stuff import sys import pythoncom pythoncom.CoInitialize () import win32com.client conn = win32com.client.Dispatch(r'ADODB.Connection') rs = win32com.client.Dispatch('ADODB.Recordset')

[web2py] Re: Web2py freezing on live deployment!

2013-11-04 Thread Derek
McAfee always seems to block things incorrectly, at least for me. On Monday, November 4, 2013 8:56:32 AM UTC-7, Andrew Buchan wrote: Thanks Willoughby, We've got McAffee on that network, so have asked the IT guy to set it to ignore python and web2py folders. Will let you know what the

Re: [web2py] IS_DATE validate and internationalization

2013-11-04 Thread Diogo Munaro
Thx for help Richard, but the problem persist It should be a bug or there is a trick? 2013/11/4 Diogo Munaro diogo.mvie...@gmail.com No, the problem is that the form get accepted only if the browser language is english. Otherwise, if the browser is in portuguese it's change the validation

Re: [web2py] Re: Documentation of the date time picker from dynarch, version 1.0

2013-11-04 Thread Paolo Caruccio
maybe here http://sourceforge.net/projects/jscalendar/ Il giorno domenica 3 novembre 2013 23:30:19 UTC+1, mweissen ha scritto: Thank you - this will help! By the way: is there any full description for this program? 2013/11/3 Paolo Caruccio paolo.ca...@gmail.com javascript: In order to

Re: [web2py] IS_DATE validate and internationalization

2013-11-04 Thread Vinicius Assef
Create a new string and use it. IS_DATE() translates the string you send to it, as you can see in the source code [1]. So, you need to create another string will be translated to your desired format. Something like this: db.product.expiration.requires = IS_DATE(format(Y-m-d)) and in translation

Re: [web2py] IS_DATE validate and internationalization

2013-11-04 Thread Diogo Munaro
Great! It's working now!! I removed all translations files except default.py. Now it's working. Thx Vinicius! 2013/11/4 Vinicius Assef vinicius...@gmail.com Create a new string and use it. IS_DATE() translates the string you send to it, as you can see in the source code [1]. So, you need

Re: [web2py] Re: Documentation of the date time picker from dynarch, version 1.0

2013-11-04 Thread Martin Weissenboeck
Thank you! 2013/11/4 Paolo Caruccio paolo.carucci...@gmail.com maybe here http://sourceforge.net/projects/jscalendar/ Il giorno domenica 3 novembre 2013 23:30:19 UTC+1, mweissen ha scritto: Thank you - this will help! By the way: is there any full description for this program?

Re: [web2py] db.mytable[0] = dict(myfield='somevalue') return id

2013-11-04 Thread Annet
Thanks for your reply. I had a look at the shortcuts in the book: http://web2py.com/books/default/chapter/29/06/#Shortcuts The first shortcut makes a significant difference in performance, so I thought maybe this: db.mytable[0] = dict(myfield='somevalue') an impact on performance too? Kind

[web2py] OnSelect how to?

2013-11-04 Thread greenpoise
I have an Autocomplete widget field that goes through my product table. I need to put the selected product into a list. Rather than using the button after I select the product, ideally I would like to select the product and it automatically goes into the list and the search field stays on top.

[web2py] Re: Web2py freezing on live deployment!

2013-11-04 Thread Andrew Buchan
It's running on rocket. I now think it's dying during a specific ajax call, but only some of the time and/or shortly after its called (there's usually a page load after it) and/or when it's excessively busy. Not sure if siege can automate the button clicks that trigger the ajax calls but I

[web2py] Re: Alterar o rótulo de botões sqlform.grid (adicionar, excluir, etc)

2013-11-04 Thread Dave S
On Friday, November 1, 2013 1:01:04 PM UTC-7, Carlynhos77 wrote: Olá, bom dia ... Gostaria de saber como alterar o rótulo de botões sqlform.grid (adicionar, excluir, etc) ... como acessar o ID ou classe de cada objeto, uma vez que tudo é automático criado para nós ... obrigado! Have you

[web2py] Re: Alterar o rótulo de botões sqlform.grid (adicionar, excluir, etc)

2013-11-04 Thread Dave S
Or perhaps https://groups.google.com/d/msg/web2py/fJVlnDYP1xE/W1nXRLJiMKgJ /dps On Monday, November 4, 2013 11:30:45 AM UTC-8, Dave S wrote: On Friday, November 1, 2013 1:01:04 PM UTC-7, Carlynhos77 wrote: Olá, bom dia ... Gostaria de saber como alterar o rótulo de botões sqlform.grid

Re: [web2py] db.mytable[0] = dict(myfield='somevalue') return id

2013-11-04 Thread Richard Vézina
Ha ok, so you should try to see if it actually improve performance. To get the id you can do that : db().select(db.ref_assay.id).last().id I guess if performance are better with that syntax, having to make a select to get the id will compromise your gain... :) Richard On Mon, Nov 4, 2013 at

Re: [web2py] restfull need to api/id/1 or /api/1

2013-11-04 Thread Dave S
Is Ramos using routes.py? I think your answer applies to that, doesn't it? In the absence of routes.py, then the full app/controller/function path is needed (says the relative newcomer). /dps AIUI, not bothering with routes.py yet On Friday, November 1, 2013 3:54:23 PM UTC-7, Ricardo

Re: [web2py] OnSelect how to?

2013-11-04 Thread Richard Vézina
Do you know bootstrap typeahead? You can customized it as you want then you only have to pass a function that return a json... Richard On Mon, Nov 4, 2013 at 1:41 PM, greenpoise danel.sega...@gmail.com wrote: I have an Autocomplete widget field that goes through my product table. I need to

Re: [web2py] OnSelect how to?

2013-11-04 Thread Richard Vézina
Notice this : http://stackoverflow.com/questions/17903645/where-is-the-typeahead-javascript-module-in-bootstrap-3-rc-1 Richard On Mon, Nov 4, 2013 at 2:58 PM, Richard Vézina ml.richard.vez...@gmail.comwrote: Do you know bootstrap typeahead? You can customized it as you want then you only

Re: [web2py] db.mytable[0] = dict(myfield='somevalue') return id

2013-11-04 Thread Niphlod
On Monday, November 4, 2013 8:39:41 PM UTC+1, Richard wrote: Ha ok, so you should try to see if it actually improve performance. To get the id you can do that : db().select(db.ref_assay.id).last().id worst performance-related tip ever. That one selects the entire table, fetches it back

Re: [web2py] Re: autocomplete widget to query odbc data sources

2013-11-04 Thread Niphlod
DAL doesn't support Access as a database, so you can't expect the widget to work directly on your Access file. BTW, Access has really too many problems to be considered as a backend for a web application... That being said, if you want to experiment a little bit (please note that you could

[web2py] Re: Static files outside of web2py

2013-11-04 Thread Niphlod
so the question is is this a good idea? ? on what premises ? what's the goal of moving it? Why your application needs another application to serve static files ? On Monday, November 4, 2013 12:11:50 PM UTC+1, Annet wrote: In layout.html I uncommented the following lines: link rel=stylesheet

Re: [web2py] aplicação com calculo de campos

2013-11-04 Thread Niphlod
BTW, this is the english web2py-user group. Please keep posts in English lately there are a lot of messages coming in in Portuguese and those are starting to be too many to be an oversight :-P On Monday, November 4, 2013 12:08:48 PM UTC+1, viniciusban wrote: Hermano, vale lembrar que

Re: [web2py] db.mytable[0] = dict(myfield='somevalue') return id

2013-11-04 Thread Richard Vézina
It was not a perfomance tip, just a way to get her id... :) Richard On Mon, Nov 4, 2013 at 3:39 PM, Niphlod niph...@gmail.com wrote: On Monday, November 4, 2013 8:39:41 PM UTC+1, Richard wrote: Ha ok, so you should try to see if it actually improve performance. To get the id you can do

[web2py] Re: upgraded to 2.7.4 no admin ui

2013-11-04 Thread Niphlod
for the next ones seeing this, make sure that the dir are owned by a user that can access the files. usually in debian and ubuntu-related distros is www-data, so a simple chown -R www-data:www-data /path/to/web2py is sufficient. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Anchor callback option and form submit

2013-11-04 Thread Niphlod
On Monday, November 4, 2013 2:09:39 AM UTC+1, Anthony wrote: A('mypage', _href=URL('myfunction'), target='myID') Shouldn't above be: A('mypage', component=URL('myfunction'), target='myID') does the exact same thing but I don't think that *component* as an argument was ever

Re: [web2py] aplicação com calculo de campos

2013-11-04 Thread Vinicius Assef
You're right, Simone. My bad. :-( I apologize 2013/11/4 Niphlod niph...@gmail.com: BTW, this is the english web2py-user group. Please keep posts in English lately there are a lot of messages coming in in Portuguese and those are starting to be too many to be an oversight :-P On Monday,

Re: [web2py] Re: autocomplete widget to query odbc data sources

2013-11-04 Thread António Ramos
I didnt say anything about microsoft Access. What the hell is that? HEHEHE I´m using db2 via odbc Best regards António 2013/11/4 Niphlod niph...@gmail.com DAL doesn't support Access as a database, so you can't expect the widget to work directly on your Access file. BTW, Access has really

Re: [web2py] OnSelect how to?

2013-11-04 Thread greenpoise
Thanks, will check! On Monday, November 4, 2013 12:10:59 PM UTC-8, Richard wrote: Notice this : http://stackoverflow.com/questions/17903645/where-is-the-typeahead-javascript-module-in-bootstrap-3-rc-1 Richard On Mon, Nov 4, 2013 at 2:58 PM, Richard Vézina

Re: [web2py] db.mytable[0] = dict(myfield='somevalue') return id

2013-11-04 Thread Anthony
On Monday, November 4, 2013 1:23:59 PM UTC-5, Annet wrote: Thanks for your reply. I had a look at the shortcuts in the book: http://web2py.com/books/default/chapter/29/06/#Shortcuts The first shortcut makes a significant difference in performance The first shortcut is for a select. It says

Re: [web2py] db.mytable[0] = dict(myfield='somevalue') return id

2013-11-04 Thread Vinicius Assef
There should be one-- and preferably only one --obvious way to do it. (The Zen of Python) Shortcuts are nice, but they get me confused sometimes. On Mon, Nov 4, 2013 at 8:09 PM, Anthony abasta...@gmail.com wrote: On Monday, November 4, 2013 1:23:59 PM UTC-5, Annet wrote: Thanks for your

[web2py] Re: Setup Script: Ubuntu + Nginx + uWSGI

2013-11-04 Thread Jim S
Just ran today on fresh Ubuntu 13.10 and am getting: Internal Error Ticket issued: unrecoverable When clicking on my personal app. Welcome/Admin and Examples work just fine. Where would I begin trouble-shooting? -Jim On Sunday, March 27, 2011 2:29:43 PM UTC-5, pbreit wrote: I did a

[web2py] Re: Anchor callback option and form submit

2013-11-04 Thread Anthony
A('mypage', _href=URL('myfunction'), target='myID') Shouldn't above be: A('mypage', component=URL('myfunction'), target='myID') does the exact same thing but I don't think that *component* as an argument was ever documented. I just meant that according to the

Re: [web2py] Re: Migrating Django User Accounts

2013-11-04 Thread Michele Comitini
this should also get the correct hash function: import re, base64 a = pbkdf2_sha256$1$FL21dN1vykVF$SUkANu/eKdKeUeT5lYr06aMpC5/T0vrBDo/iSy+ExyI= def convert(p): a,b,c,d = p.split('$') df, h = a.split('_') c = base64.b16encode(base64.b64decode(c)).lower() d =

Re: [web2py] db.mytable[0] = dict(myfield='somevalue') return id

2013-11-04 Thread Anthony
On Monday, November 4, 2013 5:21:03 PM UTC-5, viniciusban wrote: There should be one-- and preferably only one --obvious way to do it. (The Zen of Python) Shortcuts are nice, but they get me confused sometimes. On the other hand, practicality beats purity. ;-) record = db.mytable(id) is

Re: [web2py] Re: Testing redirection with py.test

2013-11-04 Thread Richard Vézina
Hello Vinicius, I have been able to run tests, one failed though : === test session starts === platform linux2 -- Python 2.7.4 --

Re: [web2py] Re: Setup Script: Ubuntu + Nginx + uWSGI

2013-11-04 Thread Richard Vézina
sudo chown -R www-data.www-data web2py/ Richard On Mon, Nov 4, 2013 at 5:25 PM, Jim S j...@qlf.com wrote: Just ran today on fresh Ubuntu 13.10 and am getting: Internal Error Ticket issued: unrecoverable When clicking on my personal app. Welcome/Admin and Examples work just fine.

Re: [web2py] OnSelect how to?

2013-11-04 Thread Richard Vézina
Can show you some code, but it is heavily customized so it may be not what you want... Just let me know. Richard On Mon, Nov 4, 2013 at 4:41 PM, greenpoise danel.sega...@gmail.com wrote: Thanks, will check! On Monday, November 4, 2013 12:10:59 PM UTC-8, Richard wrote: Notice this :

Re: [web2py] Re: Testing redirection with py.test

2013-11-04 Thread Richard Vézina
Wrote this to get started : # -*- coding: utf8 -*- # Create a python virtual environnement cd mkdir projects virtualenv ~/projets/web2py.test # Access the environnement source ~/projects/web2py.test/bin/activate # Now your prompt should look like this : # (web2py.test)username@yourmachine:~$ #

[web2py] Re: Downloading files from the disk using the path specfied in the db

2013-11-04 Thread Sarbjit
Actually I wanted to provide a download option for a file which was not uploaded using web2py, rather a database field was populated with the path of the file. I was not aware of response.stream, it solved my purpose. Thanks -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: add new button in GRID with same look and feel

2013-11-04 Thread Sarbjit
I was wondering if I could add the grid default buttons ('View','Edit','Delete') inside the links and turn off the default buttons visibility. This way the new button and other buttons would be of same style. Only problem is that the default buttons used to pass signature and other arguments,

[web2py] Import csv outside the web2py causes multiple entries in db corresponding to each column.

2013-11-04 Thread Sarbjit
I am using import csv option to insert records in the database. When I use the csv file from the web application, then a single record is inserted in the database with all the records being updated properly as per the headers. But If I try to use import_from_csv_file outside the web2py, it

[web2py] Re: On moving incremental changes to production

2013-11-04 Thread Jayadevan M
Let me try rephrasing the question. What is the preferred way of deploying changes in production? On Thursday, October 3, 2013 6:15:44 PM UTC+5:30, Jayadevan M wrote: I have deployed version 1 of an application in production. Let us say we used the admin console and created a project (.w2p)

[web2py] retrieve auth_group.role from auth_user table

2013-11-04 Thread 黄祥
hi, is it possible to retrieve auth_group.role from auth_user table? e.g. # add group auth.add_group('Admin', 'Admin') auth.add_group('Cashier', 'Cashier') auth.add_group('Doctor', 'Doctor') # add membership (Group, User) auth.add_membership('1', '1') auth.add_membership('2', '1')

Re: [web2py] Re: problem in Using highslide js in web2py ?

2013-11-04 Thread Sampath Reddy
Thank you anthony for your help. Now it is working as expected . Thank you :) Why it is working when we add a trailing '/' as you suggested ? Is it because it is a folder we have to end with '/' ? .. Sampath On Mon, Nov 4, 2013 at 8:36 PM, Anthony abasta...@gmail.com wrote: Maybe try

Re: [web2py] Re: problem in Using highslide js in web2py ?

2013-11-04 Thread Anthony
It looks like graphicsDir is actually a partial URL, to which highslide will append the remaining URL paths for resources it needs. It is expecting the partial path to end in a /. The web2py URL() function, however, does not add a trailing /, so it must be appended manually. Anthony On

Re: [web2py] What is inserting '_2.7.3' into my static url's?

2013-11-04 Thread Johann Spies
Thanks Richard and LightDot for helping me to understand this. I misinterpreted the documentation including the part about the apache configuration. It is now working as it should. Regards Johann -- Because experiencing your loyal love is better than life itself, my lips will praise you.

Re: [web2py] Re: On moving incremental changes to production

2013-11-04 Thread Johann Spies
I don't know whether it is the best way but I use mercurial for my apps. That helps to go back to an earlier version of a file when something go wrong. Regards Johann On 5 November 2013 07:34, Jayadevan M maymala.jayade...@gmail.com wrote: Let me try rephrasing the question. What is the

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

2013-11-04 Thread Johann Spies
Untested: Something like roles = [x.role for x in db((db.registration.doctor ==db.auth_membership.user) db.auth.membership.user == db.group.id ) ).select(db.group.role)] That should give yo a list of roles for

Re: [web2py] Re: Testing redirection with py.test

2013-11-04 Thread Vinicius Assef
Richard, in some way, form submission has changed. I don't know exactly in which version, but now you must set _formkey before form submission. I commited some changes. Now you don't need to import run_controller_in, anymore. Just call web2py.run() function. To submit a form, just call