[web2py] Re: language detecting

2015-06-17 Thread Derek
That may work, but I have multiple accept-languages. I can read in Russian and English, even though I am an American living in USA. Accept-Language values can have multiple values, so by blocking ru-RU you are just blocking anyone who can read russian. here's my header...

[web2py] Re: form validate check form vars

2015-06-17 Thread 黄祥
don't know is this a bug or not. *code* *models/db.py* db.delivery_header.sale_order_no.show_if = (db.delivery_header.delivery_type == 'Sale Order') *controllers/default.py* def delivery_form(): if request.post_vars.delivery_type == 'Sale Order':

[web2py] Re: Upgrade to 2.11.2 and Admin Interface doesn't render correctly

2015-06-17 Thread Dave S
On Wednesday, June 17, 2015 at 2:03:21 PM UTC-7, Carlos A. Armenta Castro wrote: Please clear your browser cache and try again. If you test in other computer you will see the page renders normally. If that isn't sufficient, see Kiran's msg in another thread:

[web2py] Re: are auth tables different than any other non-auth table?

2015-06-17 Thread Niphlod
auth_group is for groups. auth_permissions is for permissions. as any other table in your db, the problem is not the # of records, rather than what query you need to do on those. On Wednesday, June 17, 2015 at 10:42:57 PM UTC+2, Alex Glaros wrote: db.auth_group is doing double duty in my app

[web2py] Re: are auth tables different than any other non-auth table?

2015-06-17 Thread Niphlod
BTW: a million users doesn't really qualify for a single postgres database, no matter what. On Wednesday, June 17, 2015 at 11:17:39 PM UTC+2, Niphlod wrote: auth_group is for groups. auth_permissions is for permissions. as any other table in your db, the problem is not the # of records,

[web2py] Re: Problem importing modules from other app (having symlinked models and modules)

2015-06-17 Thread Niphlod
there's a distinct lack of singular/plurals in your statements that may pinpoint the problem. multiple apps -- multiple uwsgi processes either you hg update all the apps, and restart ALL uwsgi processes (more a reload than a restart, hopefully, touching EACH and EVERYONE of the files uwsgi

[web2py] Re: are auth tables different than any other non-auth table?

2015-06-17 Thread Alex Glaros
Didn't mean to use *permissions* ambiguously. db.auth_group will contain the role e.g., SME, and db.auth_membership will contain the IDs of people in that SME role. but what does this mean: *million users doesn't really qualify for a single postgres database*? That a million users is too

[web2py] are auth tables different than any other non-auth table?

2015-06-17 Thread Alex Glaros
db.auth_group is doing double duty in my app as a role table for everything in addition to permissions. Examples: (a) Partnership roles with the organization. (b) Employee roles such as SME for a project. There may be millions of people reading/writing concurrently. Is there anything different

[web2py] Re: Upgrade to 2.11.2 and Admin Interface doesn't render correctly

2015-06-17 Thread Dave S
On Wednesday, June 17, 2015 at 5:37:57 PM UTC-7, Dave S wrote: On Wednesday, June 17, 2015 at 2:03:21 PM UTC-7, Carlos A. Armenta Castro wrote: Please clear your browser cache and try again. If you test in other computer you will see the page renders normally. If that isn't

[web2py] Re: are auth tables different than any other non-auth table?

2015-06-17 Thread Anthony
On Wednesday, June 17, 2015 at 4:42:57 PM UTC-4, Alex Glaros wrote: db.auth_group is doing double duty in my app as a role table for everything in addition to permissions. Examples: (a) Partnership roles with the organization. (b) Employee roles such as SME for a project. There may be

[web2py] Re: How to access request.args in download() controller ?

2015-06-17 Thread Anthony
Is your download function in the same controller as the action that displays the link (if not, you need to specify the controller in the URL() function)? Also, where are you looking for the printed value -- it will appear in the console? Finally, you have the @cache.action() decorator on the

Re: [web2py] Re: language detecting

2015-06-17 Thread Michele Comitini
I suggest never block anyone. It's better to use honeytraps/sandboxes. Use a geoip library (http://pythonhosted.org/python-geoip/ or similar) if ipfrom == 'ru': redirect(... nice static page ...) If you use nginx you can do that almost out of the box with many other options such as

[web2py] Upgrade to 2.11.2 and Admin Interface doesn't render correctly

2015-06-17 Thread Carlos A. Armenta Castro
Please clear your browser cache and try again. If you test in other computer you will see the page renders normally. -- 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

[web2py] Bug in code for email Queue example.

2015-06-17 Thread Jason (spot) Brower
I was copy pasting the code and noticed that message which you use in the email queue example is not valid as it is a reserved word in the Fields. Just thought I would mention it. BR, Jason Brower -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: grid

2015-06-17 Thread Oli
set paginate to the size you want. SQLFORM.grid(..., paginate=1, ...) see http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=SQLFORM.grid+signature#SQLFORM-grid-signature Am Mittwoch, 17. Juni 2015 08:57:42 UTC+2 schrieb jackso...@quantachrome.com: Is there

[web2py] Re: Problem importing modules from other app (having symlinked models and modules)

2015-06-17 Thread Niphlod
beside from the fact that is hardly a web2py problem, what the heck ? you udpate the app and you don't want to reload the process that runs it ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] Re: FYI - MSSQL, Executesql and data columns retrieved as strings

2015-06-17 Thread Niphlod
10.0 for 2008, 11.0 for 2012, (or 12.0, if sql server 2016 will show up). BTW: for anything else than MSSQL2000, mssql:// is NOT the recommended adapter. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

[web2py] response.menu will not display an image

2015-06-17 Thread jackson . read
This does not work. No image is displayed. The layout seems to lose it too, the response menu now has 2 rows this causes things to be obscured by it. Should I be trying this at all? If the menu was designed for text only ok but put it in the Docs. This was the only change I did to the

[web2py] Re: Opening PDF files in web browser

2015-06-17 Thread kama
But, if I have a PDF stored in a blob field, how could I use PDF.js do display it? Il giorno venerdì 24 ottobre 2014 19:32:08 UTC+2, José Eloy ha scritto: Any Idea? Regards -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py

[web2py] .json return in nginx/uwsgi

2015-06-17 Thread Kayro
Hello, In my app on the local server enough to use the termination .json in function call that web2py automatically returning the results by generic.json. Now, with my app running on nginx/uwsgi get an error 404 and invalid view as a result of the call. If i use response.view = 'generic.json'

[web2py] urllib2.HTTPError: HTTP Error 401: Unauthorized/raise MalformedHeader(WWW-Authenticate

2015-06-17 Thread Narasing Mukkavilli
I am using the folllwing code to run a SOAP service and getting this error: Any help is greatly appreciated. Thanks from pysimplesoap.client import SoapClient import socket import os client = SoapClient(wsdl=http://me-uat-txapp1/MEUAT/TxWS.asmx?WSDL;) host = socket.gethostname() pid =

[web2py] Upgrade to 2.11.2 and Admin Interface doesn't render correctly

2015-06-17 Thread DaneW
I've just upgraded to 2.11.2 and my application works ok but the Admin Interface looks horrible - probably not picking up the right css etc. I tried the Upgrade button but got a DAL error message so then I downloaded the current source file, unzipped it and reinstalled my application files

[web2py] How to access request.args in download() controller ?

2015-06-17 Thread Gaurav Vichare
I want to print request.args inside download controller for testing. But it dosn't print anything. It print request but not request.args. Download controller : @cache.action() def download(): allows downloading of uploaded files http:///[app]/default/download/[filename]

[web2py] Re: PostgreSQL - Sort with NULLS FIRST

2015-06-17 Thread Niphlod
nope. On Wednesday, June 17, 2015 at 8:57:45 AM UTC+2, pysab wrote: Hi there :) I'm using web2py 2.9.10 with a database PostgreSQL 9.4 for a new project and I have a question about sorting. In PostgreSQL, when I execute a SELECT, I can specify 'ORDER BY x ASC NULLS FIRST', which is not

[web2py] PostgreSQL - Sort with NULLS FIRST

2015-06-17 Thread pysab
Hi there :) I'm using web2py 2.9.10 with a database PostgreSQL 9.4 for a new project and I have a question about sorting. In PostgreSQL, when I execute a SELECT, I can specify 'ORDER BY x ASC NULLS FIRST', which is not the default output. Is there a way to do that with the DAL other than

[web2py] grid

2015-06-17 Thread jackson . read
Is there anyway to make a SQLform.grid scroll instead of using page numbers. -- 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

[web2py] Re: .json return in nginx/uwsgi

2015-06-17 Thread Niphlod
there's a handy directive for it. https://github.com/web2py/web2py/blob/master/applications/welcome/models/db.py#L33 On Wednesday, June 17, 2015 at 8:57:45 AM UTC+2, K.J. Pamio wrote: Hello, In my app on the local server enough to use the termination .json in function call that web2py

Re: [web2py] Re: Sublime Text web2py plugin

2015-06-17 Thread Gergely Orosz
You are more than welcome If you miss some function, feature please let me know. I try to put it into Sublime Regards Greg 2015. június 17., szerda 10:46:15 UTC+2 időpontban Ramos a következőt írta: Thank you Gergely Orosz for your work. Having the wep2y console and server console inside

[web2py] distinct=True

2015-06-17 Thread Annet
In a network application I've got the following query: rows = db((db.edg_edge.fromID==vertexID) (db.edg_edge.toID==db.vtx_vertex.id) (db.lct_address.label==PHYSICALADDRESSID)).select(db.edg_edge.ALL, db.vtx_vertex.ALL, db.lct_address.ALL, db.wb_app.apptypeID,

Re: [web2py] Re: Sublime Text web2py plugin

2015-06-17 Thread António Ramos
Thank you Gergely Orosz for your work. Having the wep2y console and server console inside Sublime makes me a lot more productive. Just what i was looking for. Regards António 2015-06-12 17:37 GMT+01:00 António Ramos ramstei...@gmail.com: Ok.just some some... Em 12/06/2015 17:27, António

[web2py] Re: ERROR on clear cash fron admin DB

2015-06-17 Thread Kiran Subbaraman
The appadmin.py may have changed between web2py releases (release1 being the one which you used to create your application initially, and release2 being the one that you want to run your application in now.) By default this appadmin.py is contained within your application. So, can you try to

[web2py] Re: response.menu will not display an image

2015-06-17 Thread Niphlod
a image=whatever/a is hardly the way to display an image . On Wednesday, June 17, 2015 at 8:57:45 AM UTC+2, jackso...@quantachrome.com wrote: This does not work. No image is displayed. The layout seems to lose it too, the response menu now has 2 rows this causes things to be obscured

[web2py] Re: Problem importing modules from other app (having symlinked models and modules)

2015-06-17 Thread Lisandro
Yes, I understand it's not a web2py problem, I was just wondering if there was a way of achieving that without restarting uwsgi process. I can see the need of restarting the process that runs the app after updating that app. However, most of the times, the update involves changes to static

[web2py] Re: grid

2015-06-17 Thread Anthony
On Wednesday, June 17, 2015 at 2:57:42 AM UTC-4, jackson.r...@quantachrome.com wrote: Is there anyway to make a SQLform.grid scroll instead of using page numbers. Are you looking for infinite scrolling (i.e., as you scroll down the page, additional records automatically load via Ajax)? If

[web2py] Re: grid

2015-06-17 Thread Anthony
On Wednesday, June 17, 2015 at 8:07:45 AM UTC-4, Oli wrote: set paginate to the size you want. SQLFORM.grid(..., paginate=1, ...) see http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=SQLFORM.grid+signature#SQLFORM-grid-signature For very large numbers

[web2py] Re: Problem importing modules from other app (having symlinked models and modules)

2015-06-17 Thread Niphlod
why don't you use the emperor mode with uwsgi pointing each process to a file that, when you modify it, reloads automatically the process ? On Wednesday, June 17, 2015 at 5:13:02 PM UTC+2, Lisandro wrote: Yes, I understand it's not a web2py problem, I was just wondering if there was a way of

[web2py] Re: Problem importing modules from other app (having symlinked models and modules)

2015-06-17 Thread Lisandro
That's what I have actually :) I have emperor mode configured as suggested in the book. When I want to restart uwsgi process, I just make a touch to the uwsgi.ini file and the process restart successfully. It's inmediate and transparent to the users (I mean, users browsing the websites). The