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

2015-09-16 Thread Leonel Câmara
I don't have experience with AD but If people are logging in with LDAP you can access their attributes the same way you do for other users. See the comment in web2py/gluon/contrib/login_methods/ldap_auth.py -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

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

2015-09-16 Thread Louis Amon
> > Let's start saying that these optimizations are on the far End of your - > high end - project, right were you want to optimize till the last bit to > get < 200ms load times. This helps everyone to focus on the fact that these > operations need to be considered at that stage and that stage

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

2015-09-16 Thread Laurent Lc
In fact i connect people of the institue withe my AD abd web2py, but i'd like to use attributes to prefill forms for example. Le mercredi 16 septembre 2015 04:39:00 UTC+2, Richard a écrit : > > Can you be more specific? > > Do you want to manage group from AD inside web2py? > > Richard > > On

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

2015-09-16 Thread Niphlod
> > >> > Interesting point : using public CDNs for open-source resources vs > bundling them with your own code ? > > I will have to disagree on public CDNs being more reliable that private > ones. It's just mathematically wrong. > Public CDNs like cdnjs for instance will give an unstable

[web2py] Re: sql query

2015-09-16 Thread Laurent Lc
Thank you for your qick answer. Ok i understand. Yes it works if use: for row in dbRH(dbRH.test.login=="Laurent").select(): firstname = row.firstname but the problem is that i would to use the var "auth.user.username" for my request and i don't know how to do Le mercredi 16 septembre 2015

Re: [web2py][OT] Workflow

2015-09-16 Thread António Ramos
My company and many others would buy a web workflow framework. for example a Workflow as a service... We dont want blogs we want real enterprise tools. 2015-09-16 3:11 GMT+01:00 Richard Vézina : > I thought it could be used for workflow management... > > Richard > >

[web2py] Re: sql query

2015-09-16 Thread Mirek Zvolský
I don't know what SQLField() means, I use Field() instead. The variable loginsession is defined at the python level. SQL level will nothing know about it. So you run really the SQL command: "SELECT ... WHERE login=loginsession;". Try same command in MySQL manager, it will not work because

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

2015-09-16 Thread Anthony
> > I will have to disagree on public CDNs being more reliable that private > ones. It's just mathematically wrong. > Public CDNs like cdnjs for instance will give an unstable bandwidth, > depending on the load they get, which you can't measure beforehand. > Owning your own high-end CDN

[web2py] sql query

2015-09-16 Thread Laurent Lc
Hi could you explain me why it does not work : my file db.py (a part of file) loginsession = auth.user.username dbRH = DAL('mysql://xxx:xxx@localhost/RH', pool_size=0) dbRH.define_table('test', SQLField('login', type = 'string' , length = 20 ), SQLField('nom', type = 'string' , length =

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

2015-09-16 Thread Louis Amon
> > Are you really stating that your own CDN serving jquery is better than > https://code.jquery.com/jquery-2.1.4.min.js , both for SLA and speed ? That is not what I said. First of all, this whole "put vendors in bundle or not" issue only concerns the first request of a visitor, as any

[web2py] Issue with routes.py and subdomains

2015-09-16 Thread rwernet . ae2i
Hello everybody, I am trying to route 2 subdomains to web2py through apache Here is the config : - Apache 2.4 routing to https://www.sub1.domain.com AND https://www.sub2.domain.com (certificate is currently self-signed for development purposes) - In fact "www.sub1.domain.com" and

[web2py] Logger works locally but not when deployed to a server

2015-09-16 Thread Mike Cole
I'm at a loss here. I've created a model named log.py, which contains: import logging logger = logging.getLogger(request.application) logger.setLevel(logging.DEBUG) I copied logging.example.conf to my web2py folder and renamed it to logging.conf and added myapp to the end of keys,

[web2py] XML pickle/unpickle

2015-09-16 Thread Maxim Hrustalev
Does anyone with deep knowledge of web2py know why this code is included in html.py 667 ### important to allow safe session.flash=T() 668 669 670 def XML_unpickle(data): 671 return marshal.loads(data) 672 673 674 def XML_pickle(data): 675 return XML_unpickle,

[web2py] Re: We do not delete posts

2015-09-16 Thread Maxim Hrustalev
Dear moderators, How many posts do I need to post to be added to white list? Is it just bad luck or what? Thnx On Monday, July 20, 2015 at 11:08:57 AM UTC+3, Massimo Di Pierro wrote: > We never delete posts from users, unless the users ask (because they > accidentally post the server

[web2py] Self-referencing tables and queries

2015-09-16 Thread Carla Raquel
Hello, I'm currently tring to solve a problem regarding a table da references itself. The default auth_user table has an extra field called 'Supervisor' that references that same table, since Supervisor is an user(a specialization of it,to be more specific).I have the following parameters

[web2py] Re: XML pickle/unpickle

2015-09-16 Thread Massimo Di Pierro
The reason is that is allows storing variables that contain XML('.') in sessions. That is useful to deal with flash messages that contain more than just text. On Wednesday, 16 September 2015 08:42:55 UTC-5, Maxim Hrustalev wrote: > > Does anyone with deep knowledge of web2py know why this

[web2py] Re: We do not delete posts

2015-09-16 Thread Massimo Di Pierro
Apologies. Either we did a mistake a mistake when moderating your previous posts (click on wrong button) or google is acting up (has happened before). I did whitelist you again this time. Finger crossed! On Wednesday, 16 September 2015 08:42:58 UTC-5, Maxim Hrustalev wrote: > > Dear

[web2py] Re: XML pickle/unpickle

2015-09-16 Thread Leonel Câmara
Why do you want comment it out anyway? -- 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

[web2py] SQL select with a var

2015-09-16 Thread Laurent Lc
when the request is written like this : for row in dbRH(dbRH.test.login=="Laurent").select(): firstname = row.firstname It works . Now i want to replace "Laurent" by" myvar" and it doesn't work , how to do please help. It should be very simple but but .. it still doesn't work for me --

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

2015-09-16 Thread Márcio Almeida
Thank you, I will study it. If anyone has more information, please post. Em segunda-feira, 14 de setembro de 2015 22:14:53 UTC-3, Márcio Almeida escreveu: > > 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

[web2py] Adding class='hidden' creates an element style='display: none'

2015-09-16 Thread Stuart Rolinson
When I create an item directly in the html form with a class ='hidden' for use with bootstrap, web2py appears to be rendering an additional element style "display:none" which stops bootstrap functionality working correctly. Raw HTML: Select County Rendered HTML: Select County

[web2py] Re: SQL select with a var

2015-09-16 Thread Leonel Câmara
What do you mean it doesn't work? Can you show us how you tried to replace it? -- 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: SQL select with a var

2015-09-16 Thread Laurent Lc
like this : myvar="toto" for row in dbRH(dbRH.test.login==myvar).select(): firstname = row.firstname the sql request doesn't work beacause myvar does not exist in sql but in python. so i don't know how to do Le mercredi 16 septembre 2015 16:20:11 UTC+2, Leonel Câmara a écrit : > > What do

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

2015-09-16 Thread António Ramos
My favourite is Vuejs learn from here http://vuejs.org/guide/ https://laracasts.com/series/learning-vuejs you can go very crazy with it 2015-09-16 15:05 GMT+01:00 Márcio Almeida : > Thank you, I will study it. > If anyone has more information, please post. >

[web2py] Re: Self-referencing tables and queries

2015-09-16 Thread Leonel Câmara
This is the answer to the first problem: db.auth_user.Supervisor.requires=IS_EMPTY_OR(IS_IN_DB(db,'auth_user.id', db.auth_user._format)) You can just remove it as it will use the format for auth_user anyway as that's the default. So it becomes only:

[web2py] Re: SQL select with a var

2015-09-16 Thread Anthony
On Wednesday, September 16, 2015 at 10:33:39 AM UTC-4, Laurent Lc wrote: > > like this : > myvar="toto" > for row in dbRH(dbRH.test.login==myvar).select(): > firstname = row.firstname > > the sql request doesn't work beacause myvar does not exist in sql but in > python. so i don't know how to

[web2py] Re: SQL select with a var

2015-09-16 Thread Laurent Lc
yes copy/paste it works because in the view associated i can see the var "firstname" Le mercredi 16 septembre 2015 16:48:19 UTC+2, Anthony a écrit : > > On Wednesday, September 16, 2015 at 10:33:39 AM UTC-4, Laurent Lc wrote: >> >> like this : >> myvar="toto" >> for row in

[web2py] Re: Adding class='hidden' creates an element style='display: none'

2015-09-16 Thread Leonel Câmara
web2py.js does that, I think it's because of appadmin using class hidden and since appadmin uses your app's layout it may not have the css saying it's supposed to be display:none, but to be frank I'm not sure. You can just delete the line that does it that looks like this because bootstrap

[web2py] Re: Self-referencing tables and queries

2015-09-16 Thread Carla Raquel
I guess my code is more messed up than I thought. I'll try and clarify your points: *What am I trying to achieve?* In the db there are people (given by the auth_user table). From those people there are ones who are hierarchically above them and supervise them.They are called Supervisors. All

[web2py] Initialize vars

2015-09-16 Thread lenin . martinez
Hello i need initialize *request.vars, or request.post_vars etc... im alredy tried the following codes* - *request.vars = None* - *request.vars = Nan* - *request.vars = {}* - *request.vars = ''* *And nothing yet. thank's* -- Resources: - http://web2py.com -

[web2py] Re: Self-referencing tables and queries

2015-09-16 Thread Carla Raquel
*They should be strings (otherwise how do you store the '+' character)*. I think in this case they won't be strings since I read the numbers from a XML and they don't have the '+' character. *Then you want to get the extensions of all the supervisors? * Not all the supervisors.I want to get

[web2py] Re: Adding class='hidden' creates an element style='display: none'

2015-09-16 Thread Anthony
What Bootstrap functionality is broken by this? On Wednesday, September 16, 2015 at 9:42:55 AM UTC-4, Stuart Rolinson wrote: > > When I create an item directly in the html form with a class ='hidden' for > use with bootstrap, web2py appears to be rendering an additional element > style

[web2py] Re: Initialize vars

2015-09-16 Thread Anthony
request.vars is already initialized to a gluon.storage.Storage object. If it is not empty but you want to empty it, you can do: request.vars.clear() Anthony On Wednesday, September 16, 2015 at 11:54:38 AM UTC-4, lenin.marti...@metamaxzone.com wrote: > > Hello i need initialize > > >

[web2py] Re: Self-referencing tables and queries

2015-09-16 Thread Leonel Câmara
Ohh ok I had no idea extensions were phone numbers, phone numbers should not be integers, they should be strings (otherwise how do you store the '+' character). Then extensions should be just this: db.define_table('Extension', Field('Person' ,db.auth_user, requires =

[web2py] Re: Initialize vars

2015-09-16 Thread Leonel Câmara
why? -- 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][OT] Workflow

2015-09-16 Thread Dave S
On Wednesday, September 16, 2015 at 4:01:19 AM UTC-7, Ramos wrote: > > My company and many others would buy a web workflow framework. for example > a Workflow as a service... > > We dont want blogs we want real enterprise tools. > What's missing from SpiffWorkflow? The documentation looks

[web2py] Re: Self-referencing tables and queries

2015-09-16 Thread Dave S
On Wednesday, September 16, 2015 at 10:15:53 AM UTC-7, Leonel Câmara wrote: > > > I think in this case they won't be strings since I read the numbers from > a XML and they don't have the '+' character > > So what? You should future proof the app. Some day there might be > extensions in India

Re: [web2py][OT] Workflow

2015-09-16 Thread António Ramos
I need a sample web2py app :) How do i integrate it with dal records? For example a simple expenses approval.. Em 16/09/2015 19:26, "Dave S" escreveu: > > > On Wednesday, September 16, 2015 at 4:01:19 AM UTC-7, Ramos wrote: >> >> My company and many others would buy a web

[web2py] Re: XML pickle/unpickle

2015-09-16 Thread Maxim Hrustalev
> Why do you want comment it out anyway? > This: > The reason is that is allows storing variables that contain XML('.') > in sessions. That is useful to deal with flash messages that contain more > than just text. I want to store XML in session flash message, like Massimo stated, but

[web2py] Re: Initialize vars

2015-09-16 Thread Leonel Câmara
vars is web2py's Storage that is really just a python dictionary that allows you to use dot notation so your question is really a python one (not web2py). https://docs.python.org/2/library/stdtypes.html#dict.clear -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: We do not delete posts

2015-09-16 Thread Maxim Hrustalev
Thank you very much. On Wednesday, September 16, 2015 at 4:52:44 PM UTC+3, Massimo Di Pierro wrote: > > Apologies. Either we did a mistake a mistake when moderating your previous > posts (click on wrong button) or google is acting up (has happened before). > I did whitelist you again this

[web2py] Re: sql query

2015-09-16 Thread Dave S
On Wednesday, September 16, 2015 at 5:41:22 AM UTC-7, Laurent Lc wrote: > > Thank you for your qick answer. > Ok i understand. > Yes it works if use: > > for row in dbRH(dbRH.test.login=="Laurent").select(): > firstname = row.firstname > > > but the problem is that i would to use the var

[web2py] Is it possible to have this type of multiple requires in db.py?

2015-09-16 Thread Alex Glaros
would like to have two "requires" in DAL. Does below effort make sense? the IS_IN_DB part works by itself, but the lambda is a guess. It crashes after attempt to add a record. Field('organizationID','reference Organization', requires = [IS_IN_DB(db, 'Organization.id',

[web2py] Re: Is it possible to have this type of multiple requires in db.py?

2015-09-16 Thread Alex Glaros
the goal is to have the list populated by only records with organizationPrimaryTypeID == 1 but now that I look at it, it might only accept or reject, but not filter the options -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source

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

2015-09-16 Thread Massimo Di Pierro
I had problems with vue.js Like chancing the triple delimiters did not work for me. On Wednesday, 16 September 2015 09:37:06 UTC-5, Ramos wrote: > > My favourite is Vuejs > learn from here > > http://vuejs.org/guide/ > https://laracasts.com/series/learning-vuejs > you can go very crazy with it >

Re: [web2py][OT] Workflow

2015-09-16 Thread Dave S
On Wednesday, September 16, 2015 at 2:22:42 PM UTC-7, 黄祥 wrote: > > just an idea, why not put is_approved field as boolean in expense or > cash_out table and do the check if is_approved == True do something like > can print, email, process further in another transaction, etc. if > is_approve

[web2py] Re: Is it possible to have this type of multiple requires in db.py?

2015-09-16 Thread Alex Glaros
or is there anything like this that's valid? Field('organizationID','reference Organization', requires = IS_IN_DB(db, db. Organization(id).organizationPrimaryTypeID == 1, '%(organizationFullName)s', zero=T('choose one'))), -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: Is it possible to have this type of multiple requires in db.py?

2015-09-16 Thread Alex Glaros
So it seems the only alternatives are: 1. create a view in raw sql for that specific data base, or 2. create a query, and use that to populate dropdown list of choices. In this case, is it recommended to write the query in default.py vs db.py so that the database doesn't take uncessary hits?

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

2015-09-16 Thread António Ramos
Massimo, can you explain what it "chancing the triple delimiters" ? i used web2py with vuejs without a problem... for example i import my app.js in my view to kick vuejs (function ($, Vue) { $(document).ready(function () { Vue.config.delimiters = ['(%', '%)']; new Vue({ el: '#demo',

Re: [web2py][OT] Workflow

2015-09-16 Thread 黄祥
just an idea, why not put is_approved field as boolean in expense or cash_out table and do the check if is_approved == True do something like can print, email, process further in another transaction, etc. if is_approve == False can't print, email, process further in another transaction, etc

[web2py] Re: Has anyone integrated user-driven multiprocessing?

2015-09-16 Thread Phillip
Are you saying that workers should be started before any tasks are queued (by an arbitrary number of users) which will be running for an arbitrary amount of time? If the answer is no Here is the set up: There is a grid of files from which a user can generate 'offspring' files in all possible

[web2py] Re: Is it possible to have this type of multiple requires in db.py?

2015-09-16 Thread Alex Glaros
'DAL' object has no attribute '(Organization' Version web2py™ Version 2.12.2-stable+timestamp.2015.08.09.14.29.44 Python Python 2.7.9: C:\alex\alt_web2py\web2py\web2py.exe (prefix: C:\Python27) Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22.

Re: [web2py][OT] Workflow

2015-09-16 Thread Richard Vézina
I see SpiffWorkflow get back to work... There is a couple commit 2 months ago... I thought when I look to it that it was abandoned since there were no activity since 2 years... Richard On Wed, Sep 16, 2015 at 8:00 PM, 黄祥 wrote: > yes, you are right, i think, you

[web2py] Re: Is it possible to have this type of multiple requires in db.py?

2015-09-16 Thread Alex Glaros
okay, this looks promising. It's exactly what I want: Field('organizationID','reference Organization', requires = IS_IN_DB(db, db. Organization.organizationPrimaryTypeID == 1)), it raises this error 'DAL' object has no attribute '(Organization' but there is no string with parentheses like

[web2py] Re: Is it possible to have this type of multiple requires in db.py?

2015-09-16 Thread Alex Glaros
Code listing 902. 903. 904. 905. 906. 907. 908. 909. 910. 911. def __getattr__(self, key): if ogetattr(self,'_lazy_tables') and \ key in ogetattr(self,'_LAZY_TABLES'): tablename, fields, args = self._LAZY_TABLES.pop(key) return

[web2py] Re: Is it possible to have this type of multiple requires in db.py?

2015-09-16 Thread Alex Glaros
okay, I get similar error no matter what table or fields used. Is this syntax wrong? Field('organizationID','reference Organization', requires = IS_IN_DB(db, db. Organization.organizationPrimaryTypeID == 1)), -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Re: Is it possible to have this type of multiple requires in db.py?

2015-09-16 Thread Leonel Câmara
Did you define the Organization table before this one? -- 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

[web2py] Re: Is it possible to have this type of multiple requires in db.py?

2015-09-16 Thread Alex Glaros
yes, it's before. -- 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

Re: [web2py][OT] Workflow

2015-09-16 Thread 黄祥
yes, you are right, i think, you can combine it with query in let say Manager page to check total expense which is_approved == False or use oncreate function (sqlform.grid) after the expense is created, send an email to user who have approval privilege (Manager), and linked it into expense

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

2015-09-16 Thread Richard Vézina
Consider using other theme, I like abalaster (I think it the one used by Flask, minimalist) : https://pypi.python.org/pypi/alabaster I didn't see it but there is a bootstrap one too : https://pypi.python.org/pypi/sphinx-bootstrap-theme/ Your project look nice... A lot of work... :) Richard On

[web2py] Re: Why do i have to submit the form twice in order to work?

2015-09-16 Thread Alfonso Serra
What i was trying is easy, no ajax or js involved. Something like this: Each field is contained within an input and each row withtin a form with several kinds of submits (update, delete or insert) My doubts were: Because i need that many forms as records i was wondering if i need to do the

[web2py] Re: Why do i have to submit the form twice in order to work?

2015-09-16 Thread Annet
Hi Alfonso, Seeing a picture of what you're trying to build, I wonder why you're not using SQLFORM.smartgrid as described in the book: http://web2py.com/books/default/chapter/29/03/overview#Adding-grids You can modify the grid in all kinds of ways:

[web2py] Re: SQL select with a var

2015-09-16 Thread Laurent Lc
you were right, it was not exactly the same code. Now i put the code in db.py, and i use the request to set default values in a form. Is it a good way ? Le mercredi 16 septembre 2015 16:48:19 UTC+2, Anthony a écrit : > > On Wednesday, September 16, 2015 at 10:33:39 AM UTC-4, Laurent Lc wrote: >>

[web2py] Re: Self-referencing tables and queries

2015-09-16 Thread Leonel Câmara
> I think in this case they won't be strings since I read the numbers from a XML and they don't have the '+' character So what? You should future proof the app. Some day there might be extensions in India or something. > Not all the supervisors.I want to get the extensions of a particular

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

2015-09-16 Thread Anthony
> > @Anthony: when I said "private" I meant a Cloudflare account, so #2 > Hmm, then I wonder about your claims of "private" CDNs being more reliable. Is it the case that the cdnjs CDN being run by Cloudflare is less reliable than a regular Cloudflare account? Basically, I'm not disputing the

[web2py] Re: Initialize vars

2015-09-16 Thread lenin . martinez
Omg thanks problem solved. Can you give me more documentation about that. El miércoles, 16 de septiembre de 2015, 12:38:07 (UTC-4:30), Anthony escribió: > > request.vars is already initialized to a gluon.storage.Storage object. If > it is not empty but you want to empty it, you can do: > >