[web2py] Re: How to update bootstrap in latest (2.11.2-stable) version web2py?

2015-09-14 Thread Wabbajack
Now i got to change the web2py bootstrap with 2.9.11 instead of replacing bootstrap.min.css (seems to work with older web2py version) i tried replacing bootstrap-theme.css... On Tuesday, September 15, 2015 at 1:34:30 PM UTC+8, Wabbajack wrote: > I have the same issue i have tried replacing b

[web2py] Re: How to update bootstrap in latest (2.11.2-stable) version web2py?

2015-09-14 Thread Wabbajack
I have the same issue i have tried replacing bootstrap.min.css which i usually do at web2py later version... But with 2.11.2 i seems to have destroys the navigation bar and {{block right_sidebar}} On Thursday, July 9, 2015 at 9:01:37 PM UTC+8, Massimo Di Pierro wrote: > bootstrap is not par

[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-09-14 Thread Dmitri Ermolaev
in admin -> db -> cache: web2py™Version 2.11.2-stable+timestamp.2015.05.30.16.33.24PythonPython 2.7.6 : C:\Python27\python.exe (prefix: C:\Python27)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. Traceback (most recent call last): File "C:\web2py-m\gluon\restricted.py", line 227, in restricted

[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-09-14 Thread Dmitri Ermolaev
I edit all pickles: try: pickle.dump((time.time(), new_value), val_file, pickle.HIGHEST_PROTOCOL) except: pickle.dump((time.time(), new_value), val_file) PLEASE edit it in main code web2py - all pickle! вторник, 15 сентября 2015 г., 8:17

[web2py] Re: crash - session_pickled = pickle.dumps(self, pickle.HIGHEST_PROTOCOL) on 2.9.11

2015-09-14 Thread Dmitri Ermolaev
new error in cache with *HIGHEST_PROTOCOL (((* Traceback (most recent call last): File "C:\web2py-m\gluon\restricted.py", line 227, in restricted exec ccode in environment File "C:/web2py-m/applications/ipay3/controllers/default.py" ,

[web2py] Re: CAS SERVER

2015-09-14 Thread Laurent Lc
It works,i can login through my server cas, but i do not know how to get the login needed for aurhenticate -- 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) --

[web2py] Re: Questions about authentication and authorization

2015-09-14 Thread Luis Valladares
Thanks for your answer! I've been reading about JWT too, and i consider it for application authorization, the thing is i dont feel comfortable sending the parameters through JSON, i prefer to send it via POST parameters and so, but after reading the link you posted sounds like a good solution f

[web2py][OT] Workflow

2015-09-14 Thread Richard
Hello, We have been discussed long time ago about workflow engine inside web2py... I just fall on Lugigi : https://github.com/spotify/luigi (from spotify as it seems) and there is Pyrus (pyrus.com) but not free... Richard -- Resources: - http://web2py.com - http://web2py.com/book (Documentati

Re: [web2py] How to write documentation for REST API?

2015-09-14 Thread Richard Vézina
I like the way it's done here : https://open.fda.gov/api/reference I had saw many API doc that were looking the same (just can found back a couple of example). I thought at first that it was made using sphinx but can't found any trace of it in the souce of the page or on the github of the open fda

Re: [web2py] web2py SPA(single page application)

2015-09-14 Thread Richard Vézina
Look on the side of Ractive.js, it is a simple smaller way to get SPA into web2py without all the overhead that come from Angular.js (which is a framework) Massimo has made an work and progress app to "eventually" replace the welcome app (I quotted eventually because until know it was only experim

[web2py] Re: Is creating a token-based auth and still using auth and session globals possible?

2015-09-14 Thread Massimo Di Pierro
This reminds me. Niphlod's code should go into web2py soon. On Monday, 14 September 2015 13:26:00 UTC-5, Dave S wrote: > > > > On Saturday, September 12, 2015 at 5:02:28 PM UTC-7, Darko Colic wrote: >> >> Hello, >> I'm trying to use web2py to build a JSON based API (not REST though) for >> a mobi

[web2py] Re: CAS SERVER

2015-09-14 Thread Massimo Di Pierro
Can you tell us more in detail what does not work? On Monday, 14 September 2015 08:31:40 UTC-5, Laurent Lc wrote: > > Hi > > i use these lines of code and the goal is to retreive the login. Ive looked > for Auth_user, cookies but nothing works, how can i do ? > In fac the purpose is to replace P

[web2py] web2py SPA(single page application)

2015-09-14 Thread Márcio Almeida
Hi, I'm trying to create a spa-like application to not reload it whenever you change page, I tried example of web2pyslices but only charges the index page, the other I did not know how to load (http://www.web2pyslices.com/slice/show/2030/creating-a-single-page-app-with-web2py). Has anyone had any

Re: [web2py] Re: Make "create" authorization conditional for grid

2015-09-14 Thread Richard Vézina
Note in both case you need to have auth activated, but I pretty sure you already use auth in your app... Richard On Mon, Sep 14, 2015 at 7:13 PM, Alex Glaros wrote: > thanks Richard, > > was what I was looking for > > Alex > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Do

Re: [web2py] Re: Make "create" authorization conditional for grid

2015-09-14 Thread Alex Glaros
thanks Richard, was what I was looking for Alex -- 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

Re: [web2py] Re: Make "create" authorization conditional for grid

2015-09-14 Thread Richard Vézina
Or with decorator : @auth.requires_membership('GROUPNAME') def controller_function_name(): form = SQLFORM(..., record=ID) # When you pass an ID SQLFORM return an edit form instead of an empty form In this case you may need 2 functions one for edit and another without edit (just read), though

Re: [web2py] Re: Make "create" authorization conditional for grid

2015-09-14 Thread Richard Vézina
Alex, `if not auth.has_membership('GROUPNAME'):` Richard On Mon, Sep 14, 2015 at 6:33 PM, Alex Glaros wrote: > This works, is there a shorter/better phrasing? > > is_manager = False > if not (db((auth.user_id == db.auth_membership.user_id) & > (db.auth_membership.group_id == 1))).ise

[web2py] Re: Questions about authentication and authorization

2015-09-14 Thread Dave S
On Monday, September 14, 2015 at 3:35:20 PM UTC-7, Luis Valladares wrote: > > Since i do the post i found some interesting articles, and now i have a > better implementation idea, but i'm still looking for the solution on a > subject. Here is what i have now: > > I will handle the authenticatio

[web2py] Re: Questions about authentication and authorization

2015-09-14 Thread Luis Valladares
Since i do the post i found some interesting articles, and now i have a better implementation idea, but i'm still looking for the solution on a subject. Here is what i have now: I will handle the authentication of my applications using the amazon approach (http://www.thebuzzmedia.com/designing

[web2py] Re: Make "create" authorization conditional for grid

2015-09-14 Thread Alex Glaros
This works, is there a shorter/better phrasing? is_manager = False if not (db((auth.user_id == db.auth_membership.user_id) & (db.auth_membership.group_id == 1))).isempty(): is_manager = True thanks, Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation

[web2py] Make "create" authorization conditional for grid

2015-09-14 Thread Alex Glaros
is there a way to make create authorization conditional depending on whether user has membership in db.auth_membership table? I'm trying to write something analogous to: is_owner = (lambda row: row.Taxonomy.created_by == auth.user_id) if auth.user else False grid = SQLFORM.grid(query, e

Re: [web2py] Web2py - Front-end performance optimization tutorial

2015-09-14 Thread Louis Amon
While working with caching, I noticed what seems to me like a caveat in web2py's current design. When serving static files from the webserver, you can either : - use the "static" pseudo-controller (it's actually a route built directly above the WSGI), in which case you can't set your own cachin

[web2py] Questions about authentication and authorization

2015-09-14 Thread Luis Valladares
Hello! Im now developing an app that will consume from several microservices, everything done in web2py, and i want to be sure that my app will be the only who makes requests to my service, so in order to do this i have this structure in mind: Use CAS for authentication between the services an

[web2py] How to get and use attributes from Active Directory

2015-09-14 Thread Laurent Lc
i am looking for a very simple example 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 received this message because you are subscribed to the

Re: [web2py] sqlform or crud form update with custom field

2015-09-14 Thread Richard Vézina
No prob... You should give a read to chapter 7, there is a step by step explanation from basic html form to web2py generated form examples... Richard On Mon, Sep 14, 2015 at 3:39 PM, Diego Tostes wrote: > works! > > thanks richard! > > 2015-09-14 16:09 GMT-03:00 Richard Vézina : > >> writable

Re: [web2py] sqlform or crud form update with custom field

2015-09-14 Thread Diego Tostes
works! thanks richard! 2015-09-14 16:09 GMT-03:00 Richard Vézina : > writable not editable... > http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-and-insert-update-delete > > You need both readable and writable to be false to completly "mute" a > field... You may use rea

Re: [web2py] sqlform or crud form update with custom field

2015-09-14 Thread Richard Vézina
writable not editable... http://web2py.com/books/default/chapter/29/07/forms-and-validators#SQLFORM-and-insert-update-delete You need both readable and writable to be false to completly "mute" a field... You may use readable = True and writable = False if you want to display the field data that wi

Re: [web2py] sqlform or crud form update with custom field

2015-09-14 Thread Diego Tostes
def edit_article(): article_id = int(request.vars['article_id']) from gluon.tools import Crud crud = Crud(db) article_edit = db.article article_edit.seeders.readable = False article_edit.seeders.editable = False article_edit.leechers.readable = False article_edit.

[web2py] Re: Is creating a token-based auth and still using auth and session globals possible?

2015-09-14 Thread Dave S
On Saturday, September 12, 2015 at 5:02:28 PM UTC-7, Darko Colic wrote: > > Hello, > I'm trying to use web2py to build a JSON based API (not REST though) for a > mobile and single-page-application client. > > I wonder if there is a simple way to use Web2py internals like auth and > session glob

Re: [web2py] sqlform or crud form update with custom field

2015-09-14 Thread Richard Vézina
And if you only need one field from ten in an update form you may consider this : for f in db.tabe.fields: db.table[f].readable = False db.table[f].writable = False Then you put to True the field you want to update... Richard On Mon, Sep 14, 2015 at 2:16 PM, Richard Vézina wrote: > No

Re: [web2py] sqlform or crud form update with custom field

2015-09-14 Thread Richard Vézina
No, no, no, before the crud.update() I think it may work either after, but it more safe and coherent before the form definition (before crud.something). Richard On Mon, Sep 14, 2015 at 1:47 PM, Diego Tostes wrote: > def controler_update(): >from gluon.tools import Crud >crud = Crud(db)

Re: [web2py] sqlform or crud form update with custom field

2015-09-14 Thread Diego Tostes
def controler_update(): from gluon.tools import Crud crud = Crud(db) crud.update(db.tablename, id) db.tablename.field.readable = False db.tablename.field.editable = False return dict(form=crud()) 2015-09-14 14:37 GMT-03:00 Diego Tostes : > like this: > > def controle

Re: [web2py] sqlform or crud form update with custom field

2015-09-14 Thread Diego Tostes
like this: def controler_update(): from gluon.tools import Crud crud = Crud(db) crud.update(db.tablename, db.tablename.field.readable = False, db.tablename.field.editable = False, id) return dict(form=crud()) regards diego 2015-09-14 13:49 GMT-03

Re: [web2py] sqlform or crud form update with custom field

2015-09-14 Thread Richard Vézina
I you want to prevent some fields to appears and be created/updated in your form put this in you controller before form declaration : db.table.field.readable = False db.table.field.writeable = False Richard On Mon, Sep 14, 2015 at 12:47 PM, Diego Tostes wrote: > Hi, > > I neew to create a form

[web2py] sqlform or crud form update with custom field

2015-09-14 Thread Diego Tostes
Hi, I neew to create a form to edit a existing table element, but i do not want to expose all the fields of the table to update. is that possiblem using sqlform or crud form? or i need to build a custom form at the viw and create a controler to update the table? rgds diego -- Resources: - http

[web2py] Re: get user name and email on External cas login

2015-09-14 Thread Laurent Lc
Did you find a solution ? lchambo...@gmail.com 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 (Report Issues) --- You received this message because you are subsc

[web2py] Re: Help with routes and static files

2015-09-14 Thread Alfonso Serra
I kinda got it but i dont really know what im doing. routes_out concept is a bit confusing. This seems to work: default_application = 'myapp' BASE = '' routes_in = ( # do not reroute admin unless you want to disable it (BASE + '/admin', '/admin/default/index'), (BASE + '/admin/$any

Re: [web2py] Re: SQLform grid custom function for delete

2015-09-14 Thread Vid Ogris
Thank you for fast reply Will try with links. I have more then just active or inactive status, so i guess the other option is out. But will keep that in mind for next projects and/or tasks thank you again 2015-09-14 23:42 GMT+08:00 Anthony : > You can use the "links" argument to create addition

[web2py] Re: SQLform grid custom function for delete

2015-09-14 Thread Anthony
You can use the "links" argument to create additional buttons/links, either in separate columns or in the column that includes the view/edit/delete buttons. Alternatively, you might consider setting up record versioning, either for just this table

[web2py] SQLform grid custom function for delete

2015-09-14 Thread Yebach
Hello Is there a way to use SQLform.grid and add a function and new buttons for delete record and other purposos I do not allow user to actually delete records just to change status in database, so the record still stays there. Any suggestions? -- Resources: - http://web2py.com - http://web

Re: [web2py] Web2py - Front-end performance optimization tutorial

2015-09-14 Thread António Ramos
speaking about optimization , here is my homework https://github.com/ramstein74/Coffee_Jade_Stylus_inside_web2py 2015-09-14 15:11 GMT+01:00 Louis Amon : > Indeed I should look into contributing the book at some point. Still feel > a bit too noobish for that just yet ^^ > > As for Heroku & Gzip, h

[web2py] Re: How to pass parameters

2015-09-14 Thread Anthony
Works for me. What version of web2py? Are you trying to hide the id in the grid itself, or just in its view/edit forms (your code will only do the latter)? Anthony On Saturday, September 12, 2015 at 8:02:28 PM UTC-4, Шаманов Алексей wrote: > > e.g. showid=False to underlying elements of SQLFORM

Re: [web2py] Web2py - Front-end performance optimization tutorial

2015-09-14 Thread Louis Amon
Indeed I should look into contributing the book at some point. Still feel a bit too noobish for that just yet ^^ As for Heroku & Gzip, here's the official source to my info: https://devcenter.heroku.com/articles/http-routing#gzipped-responses On Monday, September 14, 2015 at 5:26:07 AM UTC+2, Ki

Re: [web2py] Re: Relation "table" does not exist

2015-09-14 Thread Ovidio Marinho
The DAL uses the sql dialect to communicate with the database from this folder . As yet there are no data you can delete these archive that will be generated again thus entering the application admin . In case there in question there is no data in the database then you can delete if you have data t

[web2py] Re: DAL SQLFORM.grid sort error

2015-09-14 Thread Anthony
%7E is the encoding for the "~", which indicates reverse ordering. For some reason, it looks like that is not getting converted to a "~" when request.vars is created. Can you provide more details (show more code, provide the full traceback)? Which version of web2py, which browser, and what is t

[web2py] Re: Relation "table" does not exist

2015-09-14 Thread Anthony
What happens if you delete the relevant *.table files in the /databases folder and then turn on migrations? Does the table not get created for you? On Monday, September 14, 2015 at 9:19:07 AM UTC-4, Gael Princivalle wrote: > > Using phpPgAdmin I can see that the table in question does not exist.

Re: [web2py] Web2py - Front-end performance optimization tutorial

2015-09-14 Thread Carlos Cesar Caballero Díaz
Hi Louis, good tutorial. I usually try serve my static (and uploaded) files directly, without pass for the web2py layer. About the gzip, maybe this Stackoverflow threads can help: http://stackoverflow.com/questions/8506897/how-do-i-gzip-compress-a-string-in-python http://stackoverflow.com/quest

Re: [web2py] Re: Relation "table" does not exist

2015-09-14 Thread Ovidio Marinho
delete all tables in web2py/applications/name_application/databases and recriate tables , look is import psycopg2 in db.py ex.: import psycopg2 db = DAL('postgres://instance_postgres:user@localhost:5432/db_name') [image: http://itjp.net.br]

[web2py] CAS SERVER

2015-09-14 Thread Laurent Lc
Hi i use these lines of code and the goal is to retreive the login. Ive looked for Auth_user, cookies but nothing works, how can i do ? In fac the purpose is to replace PHP_AUTH_USER by ... i don't know. Could you help me ? thanks from gluon.tools import Auth, Service, PluginManager #auth =

[web2py] model structure

2015-09-14 Thread Dmitri Ermolaev
When the model is loaded, all files are downloaded in the order their name my suggestion: im /moder folder use names: 0_set[tings].py - any settings for application: from gluon import current current.PARTNER_MIN = PARTNER_MIN = 10 PARTNER_GO = 77 ## app configuration made easy. Look inside

[web2py] Re: Relation "table" does not exist

2015-09-14 Thread Gael Princivalle
Using phpPgAdmin I can see that the table in question does not exist. I've delete it. Il giorno lunedì 14 settembre 2015 15:11:05 UTC+2, Anthony ha scritto: > > Using external tools, can you confirm whether the table in question > actually does exist in the database? > > On Monday, September 14,

[web2py] Re: Relation "table" does not exist

2015-09-14 Thread Anthony
Using external tools, can you confirm whether the table in question actually does exist in the database? On Monday, September 14, 2015 at 6:56:54 AM UTC-4, Gael Princivalle wrote: > > Hello. > > I've already read about this message error anyway I don't reach to find > the solution. > > Here here

[web2py] DAL SQLFORM.grid sort error

2015-09-14 Thread Dmitri Ermolaev
DAL error h = CAT( SQLFORM.grid(db.gifts, deletable=False, editable=False, details=False, selectable=None, create=False, csv=False, ), error 2467. 2468. 2469. 2470. 2471. 2472. 2473. 2474. 2475. 2

Re: [web2py] Relation "table" does not exist

2015-09-14 Thread Gael Princivalle
Traceback (most recent call last): File "/home/tasko/webapps/w2p_2_12_3_prod/web2py/applications/my_app/controllers/appadmin.py", line 238, in select nrows = db(query).count() File "/home/tasko/webapps/w2p_2_12_3_prod/web2py/gluon/packages/dal/pydal/objects.py", line 1992, in count

Re: [web2py] Relation "table" does not exist

2015-09-14 Thread Ovidio Marinho
show full tickets error [image: http://itjp.net.br] http://itjp.net.b r *Ovidio Marinho Falcao Neto* ovidio...@gmail.com Brasil 2015-09-14 9:06 GMT-03:00 Ga

Re: [web2py] Relation "table" does not exist

2015-09-14 Thread Gael Princivalle
Thanks Ovidio but the error still here also with migrate=False. ProgrammingError: relation "cavities" does not exist LINE 1: SELECT count(*) FROM "cavities" WHERE ("cavities"."id" > 0); Il giorno lunedì 14 settembre 2015 14:04:01 UTC+2, Ovidio Marinho ha scritto: > > Use migrate=False or not us

Re: [web2py] Relation "table" does not exist

2015-09-14 Thread Ovidio Marinho
Use migrate=False or not use migrate in string of connection. [image: http://itjp.net.br] http://itjp.net.b r *Ovidio Marinho Falcao Neto* ovidio...@gmail.com

Re: [web2py] How to pass parameters

2015-09-14 Thread Manuele Pesenti
Il 10/09/15 18:30, Шаманов Алексей ha scritto: > e.g. showid=False to underlying elements of SQLFORM.smartgrid? > Variant SQLFORM.smartgrid(, formargs={'showid':False}} does not work. > Thnx. Hi Шаманов, for this porpose just set db.tablename.id.readable=False just before grid definition in con

[web2py] Relation "table" does not exist

2015-09-14 Thread Gael Princivalle
Hello. I've already read about this message error anyway I don't reach to find the solution. Here here my db string: db = DAL('postgres://user:pass@localhost:5432/my_db', check_reserved=['all'], pool_size=1, entity_quoting=True, bigint_id=True, migrate=True) In db.py I've add some tables wit

[web2py] auth.wiki search generates error 'exceptions.AttributeError'

2015-09-14 Thread A3
Hi, I'm learning to use the auth.wiki and ran into the following problem: I tried the minimal example in the code: def index() return auth.wiki() I add a user Created a wikipage with a tag: mytag When I click the tag mytag or use the wiki menu search page it show me: Please note I'am using p

[web2py] How to write documentation for REST API?

2015-09-14 Thread Michele Comitini
What is a good way to document a small REST API (@request.restful)? sphinx? Suggestions welcome! mic -- 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

[web2py] Re: Weird problems with scheduler on OSX

2015-09-14 Thread Andrew W
Late to this as I haven't run the scheduler on my mac before. The script runs fine. I'm getting the same python error. Running 2.12.3 Stable. Andrew W On Monday, March 9, 2015 at 10:59:36 AM UTC+13, Niphlod wrote: > > try this script and see if it fails. it's the boiled down version of what

[web2py] Error in class _repr_ref_list

2015-09-14 Thread Martin Weissenboeck
I have a Field('orgs', 'list: reference org') and I got the message AttributeError: 'int' object has no attribute 'id' This is the traceback: Version web2py™Version 2.12.3-stable+timestamp.2015.08.19.00.18.03 Traceback Traceback (most recent call last): File "c:\web2py\gluon\restricted.py"