[web2py] Re: New feature in trunk: API tokens

2015-07-09 Thread Massimo Di Pierro
Can you elaborate. I like the current system (I wrote it ;-) but I was considering adding jwt. The question is, is there duplication of functionality? Should jwt replace the current token system? pros/cons? On Thursday, 9 July 2015 15:02:43 UTC-5, Derek wrote: > > Yes, I did read up on it, and I

[web2py] Re: redirecting app to another server

2015-07-09 Thread 黄祥
just an idea, if you access the function in controller, why not just use redirect(URL() ) from that function controller? best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/we

Re: [web2py] Compile and run java programs

2015-07-09 Thread Dave S
On Thursday, July 9, 2015 at 4:32:28 PM UTC-7, reddyreddy wrote: > > Thank you. > I have one more question to you. > Instead of passing the file I want to pass line by line as input and write > the corresponding output to newline in outputfile. > > lines = list(rfile) > subprocess.call(['gcc',pa

[web2py] Re: my question in posted into this group?

2015-07-09 Thread Derek
first one takes a while, it has to be moderated, after that, they should be immediate. On Thursday, July 9, 2015 at 4:32:28 PM UTC-7, ari wrote: > > because i cannot see it > test > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sou

[web2py] redirecting app to another server

2015-07-09 Thread ari
Hello! I have an web2py server with multiple apps. I want to redirect a specific app to a new server Example: when i make the call http://name_of_the_server/app_name/default/index it will be redirected to: http://name_of_the_new_server/app_name/default/index i've tried the example from routes.

[web2py] Re: Scheduler as Linux demon problem

2015-07-09 Thread icodk
I added >> /tmp/scheduler.out. All I got was: web2py Web Framework Created by Massimo Di Pierro, Copyright 2007-2015 Version 2.11.2-stable+timestamp.2015.05.30.16.33.24 Database drivers available: psycopg2, pymysql, imaplib, pg8000, sqlite3, sqlite2 starting single-scheduler for "myapp"... web2py

[web2py] Really Weird DB Bug?

2015-07-09 Thread Robert Porter
Program is acting like two identical lists containing only two items (list/entries are same content and type) are different. The code is commented and is extremely straightforward. If I declare "submitted_tags = ['test','test'], it works fine and doesn't put in a second entry, but if I take th

[web2py] web2py rerouting request to app to another server

2015-07-09 Thread ari
Hello! I have an web2py server, with multiple apps. I want to redirect to another server one app. 1 try routes_in = (BASE + "/Name_of_app/$anything"," http://new_server/Name_of_app/$anything";) routes_out = ("http://new_server/Name_of_app/$anything"; , "BASE+"/Name_of_app/$anything" ) 2. rou

[web2py] Re: Slickgrid header is blocked when layout.html is extended

2015-07-09 Thread philip
With the following, now part of the header is showing (the columns of the grid). However, the title bar is now only partially showing. Am I missing anything? in layout.html: {{block header}} {{end}} in view extending layout.html: * {{block header}}* * {{super}} *

[web2py] How and where customise menu login button, login and registration forms?

2015-07-09 Thread Алексей Трифонов

[web2py] Video tutorial example download

2015-07-09 Thread Dan Hett
Maybe I am missing this somewhere, but is there a download link for the code examples from the Web2py video courses created in 2013 that are on the Web2py website? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https:

Re: [web2py] Compile and run java programs

2015-07-09 Thread Chaitu P
Thank you. I have one more question to you. Instead of passing the file I want to pass line by line as input and write the corresponding output to newline in outputfile. lines = list(rfile) subprocess.call(['gcc',pathnew,'-o','x']) L=list() for line in lines: subprocess.call(["./x"], stdin = line,

[web2py] Re: Slickgrid header is blocked when layout.html is extended

2015-07-09 Thread philip
Thanks Anthony. I'll try to be more thorough, to verify it is not in the book, before posting. On Thursday, July 9, 2015 at 9:55:32 AM UTC-5, Anthony wrote: > > If you need to replace something in your layout with something in the > extending view, use a block: > http://web2py.com/books/default

Re: [web2py] Re: get fullpath of uploaded files

2015-07-09 Thread Chaitu P
Thank you so much I have been trying to get this since yesterday. On Thu, Jul 9, 2015 at 9:53 AM, Anthony wrote: > Looks like you are on Windows. Are you running this via the shell or the > command line? In that case, I think web2py uses the relative path for > request.folder. To get the absolut

[web2py] my question in posted into this group?

2015-07-09 Thread ari
because i cannot see it test -- 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 "w

[web2py] Re: Compile and run java programs

2015-07-09 Thread Dave S
On Thursday, July 9, 2015 at 2:30:54 PM UTC-7, Anthony wrote: > > Keep in mind that this can be dangerous. An untrusted user can upload > malicious code and compromise your server. Even an innocent bug could do > some real damage. Priced with caution. A robust way to do this would involve san

[web2py] Compile and run java programs

2015-07-09 Thread Anthony
Keep in mind that this can be dangerous. An untrusted user can upload malicious code and compromise your server. Even an innocent bug could do some real damage. Priced with caution. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Sou

[web2py] Re: New feature in trunk: API tokens

2015-07-09 Thread Derek
Yes, I did read up on it, and I am familiar with jwt. I do think it's more insecure than this. On Wednesday, July 8, 2015 at 11:16:43 PM UTC-7, Niphlod wrote: > > do you know what a jwt token is instead of just blindly bashing a solution? > > > On Thursday, July 9, 2015 at 12:25:54 AM UTC+2, Dere

[web2py] Re: JSON and url vars

2015-07-09 Thread Leonel Câmara
Ohh you can still sort of do it a slightly different way import datetime month = T((a.replace(day=1) - datetime.timedelta(days=1)).strftime('%B')) In your view you could use: {{for m in [datetime.date(2000, m, 1).strftime('%B') for m in range(1, 13)]:}} {{=m}} {{pass}} Another alternative

[web2py] Re: break syntax between 2.8.2 and 2.11.2??

2015-07-09 Thread Dave S
On Thursday, July 9, 2015 at 5:54:00 AM UTC-7, 黄祥 wrote: > > please update your web2py, since 2.11.x it have pydal. > > Simone apparently did not do an update, but instead a new install, so there should be no old dal files to remove. And we do see "pydal" mentioned in the error message. /dps -

Re: [web2py] Re: Compile and run java programs

2015-07-09 Thread Dave S
On Thursday, July 9, 2015 at 5:46:56 AM UTC-7, reddyreddy wrote: > > Hello, > > With the below code I was able to compile and run my c programs that were > uploaded, where rfile and ofile are input and output files. > > for submission in submissions: > > subprocess.call(["gcc","C:\\web2py\\appli

[web2py] Web2py Mac Application -- Startup Widget Does Not Complete

2015-07-09 Thread joseph simpson
Until you click out side of the widget... Because of this you can not see the information you are entering into the widget.. Any idea how to fix this problem? Thanks for your help, Joe -- Joe Simpson “Reasonable people adapt themselves to the world. Unreasonable people attempt to adapt the wor

[web2py] RESOLVED: Web service calling controller function with argument

2015-07-09 Thread Rakesh Singh
Thank you, Stifan and Anthony On Thursday, 9 July 2015 11:34:19 UTC+2, Rakesh Singh wrote: > > Hello, > > Please could you assist with the following issue. > > I am attempting to create a web service, and have defined a function in > default.py that accepts an argument. > I notice that whenever

[web2py] Re: Slickgrid header is blocked when layout.html is extended

2015-07-09 Thread Anthony
If you need to replace something in your layout with something in the extending view, use a block: http://web2py.com/books/default/chapter/29/05/the-views#Blocks-in-views Anthony On Thursday, July 9, 2015 at 8:46:52 AM UTC-4, philip wrote: > > It seems there should be a simple solution or other

[web2py] Re: Web service calling controller function with argument

2015-07-09 Thread Anthony
That is as intended -- functions in controllers that take arguments are private. If you want to pass arguments to controller actions via HTTP requests, you must use URL args or vars. Alternatively, you might look into the various RCP options: http://web2py.com/books/default/chapter/29/10/servic

Re: [web2py] Re: get fullpath of uploaded files

2015-07-09 Thread Anthony
Looks like you are on Windows. Are you running this via the shell or the command line? In that case, I think web2py uses the relative path for request.folder. To get the absolute path, try: os.path.abspath(os.path.join(request.folder, ...)) Anthony On Thursday, July 9, 2015 at 8:46:52 AM UTC-4

[web2py] Re: Redirect to a URL with POST Method

2015-07-09 Thread Anthony
FYI, your status has been changed so your posts are no longer moderated. You should be able to include attachments to posts. On Thursday, July 9, 2015 at 10:41:33 AM UTC-4, Anthony wrote: > > On Thursday, July 9, 2015 at 8:46:57 AM UTC-4, Sepehr Mohamadi wrote: >> >> Thanks Anthony, >> >> But Mo

[web2py] Re: Redirect to a URL with POST Method

2015-07-09 Thread Anthony
On Thursday, July 9, 2015 at 8:46:57 AM UTC-4, Sepehr Mohamadi wrote: > > Thanks Anthony, > > But Moderators don' let me to attache the gateway document to the forum, > Maybe I can give the link to it? > > By the way, process is like this: > > 1- Customer is in my site and request for an order. >

[web2py] Re: sqlform passing request.vars to a function

2015-07-09 Thread Anthony
Since you are passing request.vars as an argument to your function, you must (a) define the function to accept and argument and (b) not assign request.vars to a variable within the function body (no need for this given that you are already passing request.vars as an argument). So, the function

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

2015-07-09 Thread Massimo Di Pierro
bootstrap is not part of web2py. It is part of the example welcome app. You upgrade by replacing the css and js files. On Thursday, 9 July 2015 07:46:57 UTC-5, Алексей Трифонов wrote: > > How to update bootstrap in latest (2.11.2-stable) version web2py? > -- Resources: - http://web2py.com - htt

[web2py] Re: Scheduler as Linux demon problem

2015-07-09 Thread Massimo Di Pierro
Does this work? https://github.com/web2py/web2py/blob/master/scripts/web2py-scheduler.conf Today we are discussing whether to keep it or remove it from web2py. Opinion? On Thursday, 9 July 2015 07:46:57 UTC-5, icodk wrote: > > Running the scheduler from command line with no problem: > python /h

[web2py] Re: Web2py mysql connection problems

2015-07-09 Thread 黄祥
> > I guess this is where the auth tables are created. What does > auth.define_tables do?? > you are right, auth.define_tables is a way to create auth tables (auth_user, auth_group, etc) > Why does it work with sqlite and not with mysql?? > i think it related with migrate settings and t

[web2py] Re: cron - not work?

2015-07-09 Thread Massimo Di Pierro
I think he is taking about web2py cron. It is supposed to work with any implementation but we do not support it any more because we recommend using the scheduler instead. On Thursday, 9 July 2015 07:03:58 UTC-5, 黄祥 wrote: > > i think cron can only be run in *nix environment (linux, unix, mac) >

[web2py] Re: break syntax between 2.8.2 and 2.11.2??

2015-07-09 Thread 黄祥
please update your web2py, since 2.11.x it have pydal. best regards, stifan -- 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 bec

[web2py] Re: New feature in trunk: API tokens

2015-07-09 Thread Massimo Di Pierro
I think we should support jwt. Niphlod. Can you provide an implementation? On Thursday, 9 July 2015 01:16:43 UTC-5, Niphlod wrote: > > do you know what a jwt token is instead of just blindly bashing a solution? > "this" adds a table potentially growing towards infinite (to maintain), > two querie

[web2py] Re: Where to call python code for processing (embedded as JS or in controllers)?

2015-07-09 Thread Phillip
The first processing is the importing of files which is intensive due to collecting data on pattern recognition in the files. Similarly, the processing intensiveness (on stored files after unpickling them) will be high in application due to extrapolation of the collected data. Larger files may

Re: [web2py] Re: Compile and run java programs

2015-07-09 Thread Chaitu P
Hello, With the below code I was able to compile and run my c programs that were uploaded, where rfile and ofile are input and output files. for submission in submissions: subprocess.call(["gcc","C:\\web2py\\applications\\dropbox1\\uploads\\"+submission.file,"-o","x"]) subprocess.call(["./x"], st

[web2py] Re: blob type crop data

2015-07-09 Thread Viktor Boiarchuk
Thank you for clarification Niphlod ! -- 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 G

[web2py] Slickgrid header is blocked when layout.html is extended

2015-07-09 Thread Phillip
It seems there should be a simple solution or others with a similar problem, but I can't find anything on this. I need to extend layout to keep the menu, but this replaces the header of the page using Slickgrid (which contains all of the column titles). Please let me know if you need anything e

Re: [web2py] Re: list:integer X list:reference for auth_user table

2015-07-09 Thread kulin shah
I am using the default SQLITE database. Yes I did change the field type couple of times back and forth since doing it list:reference auth_user was giving the same error. Basically I am making a notifier/tracker application for the test automation team much like the i-tracker app available on web2py

[web2py] Re: list:integer X list:reference for auth_user table

2015-07-09 Thread kulin shah
I am using the default SQLITE database. Yes I did change the field type couple of times back and forth since doing it list:reference auth_user was giving the same error. Basically I am making a notifier/tracker application for the test automation team much like the i-tracker app available on we

[web2py] XML pickle

2015-07-09 Thread Maxim Hrustalev
Can anyone explain 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, (marshal.dumps(str(data)),) 676 copy_reg.pickle(XML,

[web2py] Re: Redirect to a URL with POST Method

2015-07-09 Thread Sepehr Mohamadi
Thanks Anthony, But Moderators don' let me to attache the gateway document to the forum, Maybe I can give the link to it? By the way, process is like this: 1- Customer is in my site and request for an order. 2- I call for PayRequest Method in Payment gateway(PG) with payment inf and a callbac

[web2py] Web2py mysql connection problems

2015-07-09 Thread kh.florian
Hi everybody, i am new to web2py and web programming. So please be Patient. *My Problem:* When i connect to a *sqlite* database alle tables are created the auth ones and tables of my application. When i connect to a *mysqld* atabase, the auth tables are created but none of the tables of my appli

[web2py] Re: How to force psycopg2 over pg8000

2015-07-09 Thread Massimo Di Pierro
If you have psycopg2 it will be used instead of pg8000 On Wednesday, 8 July 2015 07:53:40 UTC-5, icodk wrote: > > I have both installed: > > user@server:~/web2py$ python web2py.py -S napno -M -P > web2py Web Framework > Created by Massimo Di Pierro, Copyright 2007-2015 > Version 2.11.2-stable+tim

Re: [web2py] Re: Web2py and AngularJs route collision

2015-07-09 Thread Sébastien
What exactly are you trying to achieve? I am using AngularJS + Restangular with API calls to Web2py Controller and it works great. My web2py controller has the @@request.restful() decorator After which action in Angular do you get redirected? @Ramos: have a look at Angular 2 and use it, it is a

[web2py] Passing Vars from a Form to a function

2015-07-09 Thread mo . lonlabe
I am trying to create a form to import and process an excel file passing in the attributes of the file like file format(csv,tab,xls,xlsx), the tab or sheet and the location of the columns containing the needed data. On submit I would like to pass the request.vars to a function to actually proce

[web2py] gluon.globals.Request parsing behavior for array with length 1

2015-07-09 Thread Kio Kim
In gluon.globals, I found a behavior that I don't understand, and that gives me an headache. class Request(Storage): ... def parse_post_vars(self): ... if len(pvalue): *post_vars[key] = (len(pvalue) > 1 and pvalue) or pvalue[0]* The above underlined line is what I am talking about. When the b

Re: [web2py] Re: get fullpath of uploaded files

2015-07-09 Thread Chaitu P
I want to get the complete path If I do in this way Iam getting only from applications\appname But inorder to give it to c compiler I need full path of the file like c:\web2py\.etc Here is my db.py: import os db = DAL("sqlite://storage.sqlite") db.define_table('document', Field('titl

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

2015-07-09 Thread Алексей Трифонов
How to update bootstrap in latest (2.11.2-stable) version web2py? -- 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 ar

[web2py] sqlform passing request.vars to a function

2015-07-09 Thread mo . lonlabe
I have a SQLFORM to gather some information for processing an excel file. The form works saving the data to the db no issue. I would like to be able to send the request.vars to a function to actually process the contents of the excel using the form data. The form contains file format(csv,xls,ta

[web2py] break syntax between 2.8.2 and 2.11.2??

2015-07-09 Thread Simone Fiorenzoni
Hi to all, i moved an app from 2.8.2 (on win2003 32bit, mysql 5.1.50, rocket 1.2.6) to 2.11.2 (on ubuntu 15.4 64bit, mysql5.6.24, behind apache 2). After that the app goes on error. DB is something like this: --- DB --

[web2py] Scheduler as Linux demon problem

2015-07-09 Thread icodk
Running the scheduler from command line with no problem: python /home/user/web2py/web2py.py -K myapp -D 0 Runs for ever and execute tasks However if I run it as a demon according to the recipe in the book, it actually restart the process 8 times and stops: $ sudo status web2py-scheduler web2py-sc

[web2py] Re: cron - not work?

2015-07-09 Thread 黄祥
i think cron can only be run in *nix environment (linux, unix, mac) best regards, stifan -- 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 thi

[web2py] Re: Web service calling controller function with argument

2015-07-09 Thread 黄祥
yes, it is normal every function in controllers that have an argument or start with __ (double underscore), can't be accessed via browser. best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://co

[web2py] Re: calendar not cliced

2015-07-09 Thread 黄祥
did you update the css and js as well? best regards, stifan -- 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 sub

[web2py] calendar not cliced

2015-07-09 Thread Dmitry Ermolaev
I update web2py to 2.11 but calendar widget not worked: Field('run_dt', 'datetime',... when click on date - erro on page Uncaught TypeError: Cannot read property 'length' of nullDate.c_print @ calendar.js:22Calendar.callHandler @ calendar.js:22Calendar.cellClick @ calendar.js:22Calendar.tableMou

[web2py] Re: JSON and url vars

2015-07-09 Thread Carla Raquel
I don't mind at all Leonel! It is always good to learn from more seasoned coders and put the newfound knowledge into practice. Anyway, I have a dictionary because when the page loads I want the previous month to be displayed. Since this code month = T(request.now.strftime("%B")) gives me the cu

[web2py] Web service calling controller function with argument

2015-07-09 Thread Rakesh Singh
Hello, Please could you assist with the following issue. I am attempting to create a web service, and have defined a function in default.py that accepts an argument. I notice that whenever I define a function which requires an argument, it disappears from the the "exposes" list of default.py.

[web2py] Re: cron - not work?

2015-07-09 Thread Dmitry Ermolaev
I need open an some url (app/controller/function) time by time why cron not do that? why it need locking files? -- 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 Issu

[web2py] cron - not work?

2015-07-09 Thread Dmitry Ermolaev
I use Windows and Apache 2.2 in crontab: #crontab */1 * * * * root *cron/ws_run in controller cron.py: if not request.is_local: raise HTTP(200,'error') def ws_run(): print 'ws_run' rec = db.my_recs[1] rec.update_record( ref_id = (rec.ref_id or 0) + 1 ) db.commit() retu

Re: [web2py] Re: Web2py application running very slow on rocket server in production mode

2015-07-09 Thread Ramashish Gaurav
Yes Richard.. I am going through that specific chapter to deployment recipe.. I'll let you and others know about if I run into an issue. On Thursday, July 9, 2015 at 12:41:15 AM UTC+5:30, Richard wrote: > > It depends of so many factor... Let say the connection of his machine... > > About the sc

Re: [web2py] Re: Web2py application running very slow on rocket server in production mode

2015-07-09 Thread Ramashish Gaurav
Hello Niphlod !, Thanks for your interest... I had already went through the section you suggested. However I faced a technical issue on installing FastCGI on IIS 8, so I am switching to apache server installation given in the same chapter of the book for red hat.. I'll post again if some issue

Re: [web2py] Re: Web2py application running very slow on rocket server in production mode

2015-07-09 Thread Ramashish Gaurav
Hello Ramos, This could be an issue... However I am looking forward to install apache server and then check my application there... I'll post if I run into an issue! On Wednesday, July 8, 2015 at 8:25:29 PM UTC+5:30, Ramos wrote: > > a server with 8 GB of RAM, 8 Core processor should not be s