Re: [web2py] web2py CMS

2014-06-05 Thread Loïc
hidden for security purpose... BTW you can fork the repository in Web2py's "applications" forlder and give a try to the latest version in a few minutes Le vendredi 6 juin 2014 00:33:22 UTC+2, Derek a écrit : > > looks neat, your demo login and password is hidden though > > On Thursday, June 5, 20

[web2py] Formatting GRID rows data based on the field value in database

2014-06-05 Thread Sarbjit
Hi, I am using GRID in my application, my requirement is that I want to display the field value in different color (RED/GREEN) OR I want to display the images (Tick Mark Image/Cross Mark Image) based upon the data in the field. e.g. (Sample example) Product_ID Product_TitleProduct_Sig

[web2py] Re: Uploading with SQLFORM.factory: specifying tablename component of filename

2014-06-05 Thread Michael Beller
web2py renames the file as a security measure to prevent directory traversal attacks. You can read more about it here ... http://www.web2py.com/books/default/search/29?search=traversal and here ... http://en.wikipedia.org/wiki/Directory_traversal_attack As you point out, web2py stores the new fi

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-05 Thread LoveWeb2py
This doesn't seem to work for me Fabiano, When I click the button it just keeps table1 on the screen. There has got to be an easier way (I hope) On Thursday, June 5, 2014 7:41:51 PM UTC-4, Fabiano Almeida wrote: > > I use this: > > grid for table1 > def index(): > return dict(grid=SQLFORM.g

[web2py] Uploading with SQLFORM.factory: specifying tablename component of filename

2014-06-05 Thread Spokes
When you upload a file with SQLFORM factory, the file is assigned a name along the lines of "no_table.[something1].[something2]...". If you've manually written the form validation/accept code, you can change the file name that is stored in the table by changing the form.vars.[name_of_field] var

Re: [web2py] create a link SQLFORM to another table with id.belongs

2014-06-05 Thread Fabiano Almeida
I use this: grid for table1 def index(): return dict(grid=SQLFORM.grid(Almoxarifado, links = [lambda row: A('Listar Objetos',_href=URL('objeto','index',args=[row.id]))], user_signature=False, csv=False)) grid for table2 def index(): if (not request.args) and (not request.vars): redirect(

[web2py] create a link SQLFORM to another table with id.belongs

2014-06-05 Thread LoveWeb2py
I have two tables: table1 & table 2 I compare table 2 events against table 1 and if it matches I insert it into table 2's field called "table2.table1_id" table2.table1_id has thousands of rows that have the row id of table 1 in it in the form of a list. Normally I could use the belongs featu

[web2py] Re: how can I insert a list db.table.insert -- It currently shows blank in SQLFORM

2014-06-05 Thread LoveWeb2py
Please disregard the problem was I'm an idiot. Thank you. On Thursday, June 5, 2014 6:34:36 PM UTC-4, LoveWeb2py wrote: > > I am assigning another tables id's to a list so I can reference them in my > SQLFORM and allow users to click a link that will show them associated > records. > > I have a

[web2py] how can I insert a list db.table.insert -- It currently shows blank in SQLFORM

2014-06-05 Thread LoveWeb2py
I am assigning another tables id's to a list so I can reference them in my SQLFORM and allow users to click a link that will show them associated records. I have a list with the other tables record ids such as: [1,6] other_tables_id = [1,6] I want to db.current_table.insert(other_tables_id=oth

Re: [web2py] web2py CMS

2014-06-05 Thread Derek
looks neat, your demo login and password is hidden though On Thursday, June 5, 2014 5:47:48 AM UTC-7, Loïc wrote: > > Hi Andrey, > > I can not tell you what would be the *best* cms : I developped > tiny_website and my opinion would be biaised :-) > > You are the only one that knows if you need on

[web2py] routing problem

2014-06-05 Thread Júlia Rizza
Hello everybody, I have an app with app specific routes and I have a function that allows any user to see a project by passing the project's owner username and the project's slug as args. I want the user to access the project just by www.domain.com/username/slug, not showing the function name,

[web2py] Re: 1054, "Unknown column in 'field list'... Help me

2014-06-05 Thread Mark Li
I've had this happen several times, and the solution provided in this link have worked for me. http://comments.gmane.org/gmane.comp.python.web2py/42344 On Sunday, March 9, 2014 11:58:29 PM UTC-7, sujin...@gmail.com wrote: > > I had made MXPDEVICE table, and I added MXPPCPLATFORM table yesterday.

Re: [web2py] layout

2014-06-05 Thread Marco Mansilla
El Thu, 5 Jun 2014 09:21:32 -0700 (PDT) Tom Russell escribió: > I want to use a few parts from a layout for web2py > here > http://www.web2py.com/layouts/static/plugin_layouts/layouts/CorporateOffice/index.html > > Mainly I just want the for my layout.html. I tried > adding this but it does n

[web2py] layout

2014-06-05 Thread Tom Russell
I want to use a few parts from a layout for web2py here http://www.web2py.com/layouts/static/plugin_layouts/layouts/CorporateOffice/index.html Mainly I just want the for my layout.html. I tried adding this but it does not seem to work. Is there an easy way to do this? Thanks. -- Resources:

[web2py] Re: Scheduler

2014-06-05 Thread Tom Russell
Well that will work as I already have some stuff running in their schedule tab anyways. On Wednesday, June 4, 2014 9:24:22 PM UTC-4, Michael Beller wrote: > > You can't use the web2py scheduler but you can create your own simple > version. > > Here is more information from the python anywhere fo

Re: [web2py] Re: Autocomplete widget on SQLFORM.grid search?

2014-06-05 Thread Jim S
I don't use the built-in search capabilities of the grid. I like to code my own as shown here: https://groups.google.com/forum/#!topic/web2py/61R9vqCO_Xo Once this is done I can then use the jqueryui autocomplete widget to do the autocomplete for me. Takes a bit of coding, but works really w

Re: [web2py] Re: Need help with a query

2014-06-05 Thread Ruud Schroen
That's exactly what I was looking for. Thanks! Op 5-jun.-2014 15:42 schreef "Leonel Câmara" : > my_friends = db((db.friendship.accepted == True) & > ((db.friendship.source_user == auth.user_id) | (db.friendship.target_user > == auth.user_id))).select() > > my_friends_ids = [friendship.source_user

[web2py] Re: Need help with a query

2014-06-05 Thread Leonel Câmara
my_friends = db((db.friendship.accepted == True) & ((db.friendship.source_user == auth.user_id) | (db.friendship.target_user == auth.user_id))).select() my_friends_ids = [friendship.source_user if friendship.source_user != auth.user_id else friendship.target_user for friendship in my_friends]

[web2py] Re: Need help with a query

2014-06-05 Thread Ruud Schroen
Thanks for your answer. I know about the OR operators. The "problem" is that it now fetches the entire friendships records. I need a list with ID's other then the user's own ID. For example when I fetch a friendship record, the ID of the friend can either be the source_user or the target_user.

[web2py] Re: Need help with a query

2014-06-05 Thread Leonel Câmara
Quinta-feira, 5 de Junho de 2014 11:33:43 UTC+1, Ruud Schroen escreveu: > > Hi there, > > In my app there is the possibility to become friends. This is my model: > > db.define_table('friendship', > Field('source_user', 'reference auth_user'), > Field('target_user',

[web2py] Re: Need help with a query

2014-06-05 Thread Leonel Câmara
You sort of provide your own answer (OR). In web2py's DAL you OR queries using the binary OR operator. For instance, this is the solution for the logged in user: my_friends = db((db.friendship.accepted == True) & ((db.friendship.source_user == auth.user_id) | (db.friendship.target_user == auth

Re: [web2py] web2py CMS

2014-06-05 Thread Loïc
Hi Andrey, I can not tell you what would be the *best* cms : I developped tiny_website and my opinion would be biaised :-) You are the only one that knows if you need only basic features, or more bell and whistles. Test each one during 5 minutes, and choose the one that fits your needs if you

[web2py] Re: issue with multi-select widget

2014-06-05 Thread Mandar Vaze
On Wednesday, November 21, 2012 12:38:36 AM UTC+5:30, SamD wrote: > Would'nt it be more convenient to force whatever is passed to behave as a > list (of strings) ? Came across response from Massimo about this here : https://groups.google.com/d/msg/web2py/Je-joYm3ob4/yrhE5r09vI4J TL:DR : Yes

Re: [web2py] web2py function import not working well

2014-06-05 Thread Maurice Waka
Thanks team!! That gives me an idea of how to program. Mush appreciated! On Thu, Jun 5, 2014 at 2:20 AM, Derek wrote: > you running it from the shell gives you the REPL which you don't have when > you run it through web2py. repl will print out if you just give it a class > it will tell you what

[web2py] Re: web2py CMS

2014-06-05 Thread Ruud Schroen
Web2Py Pages CMS This is a basic CMS. You can create pages, add all sorts of page items, have SEO friendly URLs and more. You should check it out. > > -- Resources: - http://web2py.com - http://

[web2py] Need help with a query

2014-06-05 Thread Ruud Schroen
Hi there, In my app there is the possibility to become friends. This is my model: db.define_table('friendship', Field('source_user', 'reference auth_user'), Field('target_user', 'reference auth_user'), Field('accepted', 'boolean', default=False)

[web2py] my super heroic idea of the next scheduler

2014-06-05 Thread António Ramos
Just kiding is this simpler ? @task(* * * * *) def myfunc(): bla bla bla . It would be easier to detect a function under a schedule also can i stark the -K for the scheduler in the same command line as the initial load of the web2py ? Regards António -- Resources: - http://w