Re: [web2py] SQLFORM.grid change form vars

2016-03-19 Thread Vinyl Darkscratch-Kazotetsu
Ah, I see what my problem is — the default was defined after the SQLFORM.grid() in the controller, not before it. Works like a charm, no errors or issues. As for onvalidation, I’ll give it a whirl and see how it goes. Thank you. > On Mar 15, 2016, at 22:42, Anthony

[web2py] Re: Is this project a good fit for web2py, and if so, what other frameworks will I need?

2016-03-19 Thread pbreit
I would suggest getting started on your computer and building a lot of your app before worrying too much about deploying. You've got several options for deployment all of which I suspect you'll be able to figure out. Some others to consider are running on your own server:

[web2py] Re: Couple of questions about improving performance in models

2016-03-19 Thread Anthony
On Thursday, March 17, 2016 at 1:53:43 PM UTC-4, Lisandro wrote: > > Thank you very much for the quick answer. > > Your first comment made me think about the "lazy_tables" with the > definition of virtual method fields. > If you say that doing db.tablename the table is no longer lazy, *then it >

[web2py] Re: Is this project a good fit for web2py, and if so, what other frameworks will I need?

2016-03-19 Thread webmaster
I started on PythonAnywhere and it is an excellent service. I learned a lot and they are extremely helpful. And you don't need to put that much thought into worrying about your host, as your app is extremely portable. GAE definitely has more moving parts, but Google is putting a LOT of

[web2py] web2pyslices unsuable

2016-03-19 Thread zendevel
Web2pyslices is down and all the content is missing. Is there any owner of the site? It seems like it was hacked or something. It was been a wealth of knowledge for the community I hate to see it go to pot. I would be willing to host it if needed. -- Resources: - http://web2py.com -

[web2py] Re: How do you use web2py app work with phonegap?

2016-03-19 Thread pbreit
Ionic is a good choice. As mentioned, Web2py will run on your server and mostly deliver and receive JSON to/from the mobile app. On Saturday, March 19, 2016 at 3:12:42 AM UTC-7, eric cuver wrote: > > hi Leonel, > > which client (boostrap, jquery mobile, ionic.) for design with > phonegap

[web2py] Re: Is this project a good fit for web2py, and if so, what other frameworks will I need?

2016-03-19 Thread John Gall
Thank you for your suggestion! I'd classify myself as an intermediate in Python, but I have zero experience with Web Dev or Network programming. I had actually never heard of Google App Engine, and I only just found out about PythonAnywhere from going through the introductory tutorials on the

[web2py] Re: Is this project a good fit for web2py, and if so, what other frameworks will I need?

2016-03-19 Thread pbreit
It sounds like it would be fine on web2py. Web2py is one of the more capable and easy general purpose frameworks. Was there anything in particular that people thought was going to be difficult or impossible? When you say "players need to be notified" are you just referring to something simple

[web2py] Re: Adding a new table to web2py with a reference field to an established table and getting error

2016-03-19 Thread Anthony
According to the error, your field name is "field1reference table1", so you probably have an error in the field definition. Please show your model code. Anthony On Thursday, March 17, 2016 at 8:28:00 AM UTC-4, Heather Dawe wrote: > > Hi there, > > I have had this error in a couple of scenarios

[web2py] Using MySQL in GAE locally (is it actually possible?)

2016-03-19 Thread webmaster
I've got MySQL working locally in GAE, but since GAE doesn't write to the file system, it can't touch /databases. Am I doing something wrong? Has anyone actually gotten GAE working with MySQL locally? I can't find a single tutorial related to this. If someone shows me this last step, I can

[web2py] Re: Functional programming in web2py...

2016-03-19 Thread Leonel Câmara
This is more of a python question than a web2py one. Usually people just use list comprehensions and generators for this. You can easily chain generators. Also take a look at the itertools python module if you're interested in programming this way in python. -- Resources: - http://web2py.com

Re: [web2py] Re: XML object

2016-03-19 Thread Jerry Liu
Yes, I am using it on html page. It doesn't work when html contains iframe tag. iframe tag will still be escaped. so I tried override, still not working. On Wed, Mar 16, 2016 at 12:21 PM, Anthony wrote: > Are you inserting it in the view somehow: > > {{=XML(...)}} > > If

[web2py] Re: how to resend verification email?

2016-03-19 Thread Massimo Di Pierro
The reliability of this depends on the smtp server certificates. using postfix on localhost is very unreliable. Using a commercial service is better On Wednesday, 16 March 2016 07:41:21 UTC-5, Yibing Liu wrote: > > Hello everyone, I developed a website with web2py. I have > set

[web2py] Re: is there an easy way to add member to the db.auth_membership?

2016-03-19 Thread Dave S
On Wednesday, March 16, 2016 at 7:28:48 AM UTC-7, Yibing Liu wrote: > > I want to add member to the db.auth__membership. I have too many users in > db.auth_user, so it's very hard to add a specified user to the membership. > Could anyone help me? > Would the autocomplete widget help? That

[web2py] Re: Testing

2016-03-19 Thread Pierre Thibault
OK, sorry for the noise. Le lundi 14 mars 2016 13:01:48 UTC-4, Leonel Câmara a écrit : > > Yeah this group is moderated so you have to wait until your messages are > aproved the first few times until you're whitelisted. > -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: border in view

2016-03-19 Thread Dave S
On Friday, March 18, 2016 at 8:08:38 AM UTC-7, Imre wrote: > > Hi, > please help. I use SQLTABLE in view and I want see border. I try > table, th, td {border: 1px solid black} > in web2py.css but it is not work. > > You may need to make the change to a Web2Py class. For instance, my SQLFORM

[web2py] Re: fighting with the widget

2016-03-19 Thread Pierre
ok ..I don't want to spend too much efforts on a widget so I am making a simple function derived from ListWidget classmethod. I cloned he original ul.w2p_list css only changing its name, so far everything works -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

[web2py] Insert ignored when using time

2016-03-19 Thread Joel Samuelsson
Hi, I have a table like this: db.define_table('speed', Field('speed', 'integer'), Field('startTime', 'time'), Field('stopTime', 'time'), migrate=False, fake_migrate=True ) The database is a MySQL db. speed is of type int, startTime is of type time, stopTime is of type time, The table was

[web2py] Couple of questions about improving performance in models

2016-03-19 Thread Lisandro
Straight to the point: I'm using *lazy_tables=True* and *migrate=False* *In my model, I have several Method Fields.* Some of them use a function that is declared inside the same model, like this: db.auth_user.give_me_data = Field.Method(lambda row: _give_me_data(row. auth_user)) def

[web2py] Re: fighting with the widget

2016-03-19 Thread Leonel Câmara
It's enough to use just a function. However if you want your widget to be configurable you could use a function that returns a function for a widget and you would make widget=function_that_returns_a_function(**my_widget_options). Another alternative is to have a class and set class attributes

[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-19 Thread webmaster
As penance, you can tell me how to store images in the datastore while using Cloud SQL for everything else (I haven't seen any actual examples of using both at the same time, but the book says it can be done). On Saturday, March 19, 2016 at 2:57:11 PM UTC-7, webm...@trytha.com wrote: > > And

[web2py] Re: Is this project a good fit for web2py, and if so, what other frameworks will I need?

2016-03-19 Thread webmaster
Everything you mentioned seems easy enough with Web2py. Do you have any experience in web development or with Python? Web2py could definitely do everything you want, but there are other options as well depending on if you have experience with anything specific. I find Python to be the most

[web2py] multiple id selection using request.vars.name

2016-03-19 Thread Ron Chatterjee
I have checkbox and from there I read my ids, which is request.vars.name generated from a button in view In my controller I use Post_selected = db.Post(request.vars.name); It works fine if one id is selected lets say '22'. if request.vars.name '22' len(request.vars.name) is 2.

[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-19 Thread webmaster
And thus we discover the true problem. Try using pydal from http://www.web2py.com/examples/static/web2py_src.zip (the link from Source Code for Normal Users). -result: Failure Now try the pydal from http://web2py.com/examples/static/2.12.2/web2py_src.zip -result: Success Now try the

[web2py] Re: Persist file upload html forms in web2py

2016-03-19 Thread Anthony
Please see response on SO: http://stackoverflow.com/a/36105590/440323 On Saturday, March 19, 2016 at 3:22:57 PM UTC-4, Yogesh Agrawal wrote: > > I have developed a web portal using web2py. The portal has a input form > that is to be filled by user. There are 5 steps in the form. At the last >

[web2py] How do you use web2py app work with phonegap?

2016-03-19 Thread RAGHIB R
Can you explain it stepwise? If possible please send github link of some web2py app that you changed to work with phonegap. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: IMPORTANT SECURITY ISSUE

2016-03-19 Thread Massimo Di Pierro
yes. On Thursday, 17 March 2016 18:01:59 UTC-5, Antonio Salazar wrote: > > Since this is not a vulnerability, can Examples be simply disabled? > > On Tuesday, March 15, 2016 at 10:43:24 AM UTC-6, Massimo Di Pierro wrote: >> >> An important security issue has come up. >> >> If you use web2py in

[web2py] Adding a new table to web2py with a reference field to an established table and getting error

2016-03-19 Thread Heather Dawe
Hi there, I have had this error in a couple of scenarios now. I have an established and working web2py app and I wish to add a couple of tables to the model. A number of fields in these new tables reference fields in established tables. I get this error when trying to create the new tables

[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-19 Thread Massimo Di Pierro
I tested this. I am using trunk code with latest github and I cannot reproduce. I am pretty sure this is fixed. Make sure you have the latest pydal. On Friday, 18 March 2016 15:55:21 UTC-5, webmas...@trytha.com wrote: > > Steps to replicate (3 mins): > > >1. Load Web2py from source off

[web2py] Persist file upload html forms in web2py

2016-03-19 Thread Yogesh Agrawal
I have developed a web portal using web2py. The portal has a input form that is to be filled by user. There are 5 steps in the form. At the last step there are bunch of file uploads fields. If a user encounters form validation error after filling the form, he has to again upload the file

[web2py] Is this project a good fit for web2py, and if so, what other frameworks will I need?

2016-03-19 Thread John Gall
Hello! I'm starting a new project I plan to work on over the next six months, and I originally planned to use web2py in conjunction with other frameworks to accomplish my goal. I've been told that this project is not possible with web2py, and I wanted to get an opinion from someone who has

Re: [web2py] How to preserve order for query results

2016-03-19 Thread mfarees . knysys
Thanks, it worked! Had to change idx to ids though. -- 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

[web2py] Re: web2py type 'exceptions.AttributeError'

2016-03-19 Thread Dave S
What does your view look like? What happens when there is no post for the course_id? Does your select give a None or an empty Rows? It appears that __getattr__ is expecting a body field, and if you don't have one (take this as a junior student piping up) /dps Wednesday, March 16,

[web2py] Re: How do you use web2py app work with phonegap?

2016-03-19 Thread eric cuver
thank for information my friend Le samedi 19 mars 2016 13:05:58 UTC+1, Leonel Câmara a écrit : > > I usually just use bootstrap because I'm used to it But really, any mobile > first CSS framework is ok. I've used foundation before it's good too, I've > also not used anything and just made my

[web2py] Re: Couple of questions about improving performance in models

2016-03-19 Thread Lisandro
I will bother with one last related question: *what about callback triggers?* I'm defining them like this: db.define_table('mytable', Field('field1'), Field('field2')) # defines the table from myglobals import myfunction # imports global function db.mytable._after_update.append(lambda s, r:

[web2py] how to resend verification email?

2016-03-19 Thread Yibing Liu
Hello everyone, I developed a website with web2py. I have set auth.settings.registration_requires_verification = True to verify the register's email. However some of the users tell me that they can't receive the verification email. They try to re-register with the same email to get the

[web2py] Reportlab add image to pdf

2016-03-19 Thread Nico de Groot
You use realpath as if it construct a path to your image file. But you should use os.path.join as you did earlier. If you've used web2py upload facilities, you need an extra step to get the file from the upload folder, see the web2py book for details. Nico de Groot -- Resources: -

[web2py] Re: URL parsing in controller

2016-03-19 Thread Jeff Riley
DPS and all, I have my routes.py set to the application (a). As far as what is request.args(0), that is what is confusing. That URL is generated by smartgrid. Manage_customers is the controller, so customer should be the function but it is not. View is the function. This is why I am having

Re: [web2py] Re: How to insert different grid elements in tab panels?

2016-03-19 Thread Ron Chatterjee
Thank you! that works On Friday, March 18, 2016 at 9:51:31 AM UTC-4, Massimiliano wrote: > > Try to give a each grid a uniq formname: > > SQLFORM.grid(db.post, formname=‘grid_post’) > > SQLFORM.grid(db.post, formname=‘grid_comments’) > > On Wed, Mar 16, 2016 at 1:25 AM, Ron Chatterjee

[web2py] Re: How do you use web2py app work with phonegap?

2016-03-19 Thread RAGHIB R
Can you please show where you created the REST API? In a different view? Can I get any link, how to do that? On Friday, March 18, 2016 at 8:17:50 PM UTC+5:30, Leonel Câmara wrote: > > I usually just create a REST API returning JSON as is very well documented > in the book and then just call it

[web2py] Re: creating a user in auth from shell

2016-03-19 Thread Niphlod
using .insert() over .add() would be a good choice ^_^ On Thursday, March 17, 2016 at 12:52:53 AM UTC+1, Dave S wrote: > > My remote host is not running a GUI, so doing appadmin by browsing is > inconvenient. I need to add a user, and I'd like to do that from a script > run in the web2py shell

[web2py] Re: how to resend verification email?

2016-03-19 Thread Yibing Liu
I have used a commercial smtp service. Is there a way to resend the verification email to the users? Thank you. 在 2016年3月17日星期四 UTC+8上午7:31:15,Massimo Di Pierro写道: > > The reliability of this depends on the smtp server certificates. using > postfix on localhost is very unreliable. Using a

[web2py] Reportlab add image to pdf

2016-03-19 Thread Winter Kryz
Hello everyone, I am trying to generate reports using Reportlab in web2py. I'm working on pythonanywhere.com I am having some problems because I want to insert an image as header into the pdf report this is my report.py from reportlab.platypus import * from reportlab.lib.styles import

[web2py] Re: Couple of questions about improving performance in models

2016-03-19 Thread Anthony
On Thursday, March 17, 2016 at 1:08:49 PM UTC-4, Lisandro wrote: > > Straight to the point: > I'm using *lazy_tables=True* and *migrate=False* > > > *In my model, I have several Method Fields.* > Some of them use a function that is declared inside the same model, like > this: > >

Re: [web2py] issue when import from one web2py module into another

2016-03-19 Thread Leonel Câmara
from other_module import function should work too -- 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

[web2py] Re: session always written if auth.user_groups is accessed

2016-03-19 Thread Anthony
> > The question is if/how you can address the issue for other users - or at > least warn them about it. > Not sure. There's some discussion on the developer's list. I agree we should at least have a warning in the book. Anthony -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] creating a user in auth from shell

2016-03-19 Thread Dave S
My remote host is not running a GUI, so doing appadmin by browsing is inconvenient. I need to add a user, and I'd like to do that from a script run in the web2py shell "command line (I will be adding this user to a privileged group). How do I do that? Something like

[web2py] Re: modal not work when upload form field have the data

2016-03-19 Thread Leonel Câmara
Hey stifan, I have a custom made javascript I use to load components in modals. It works with file uploads as long as you have jquery.form.js and you send it upload_form: true in the options. I usually use it in the onclick of buttons to open the modal with the form. Read the comments in the

[web2py] Re: creating a user in auth from shell

2016-03-19 Thread Dave S
On Thursday, March 17, 2016 at 10:54:13 AM UTC-7, Anthony wrote: > > new_user = auth.register_bare(email='x...@example.com ', > password='1234', ...) > new_user.update_record(registration_key='') # This approves the > registration - can be done later. > db.commit() # Make sure you explicitly

[web2py] Re: How do you use web2py app work with phonegap?

2016-03-19 Thread Leonel Câmara
I usually just use bootstrap because I'm used to it But really, any mobile first CSS framework is ok. I've used foundation before it's good too, I've also not used anything and just made my own according to the app needs. -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] Re: URL parsing in controller

2016-03-19 Thread Jeff Riley
Thank you all very much. This worked. args=[request.args(2),request.args(5)] On Friday, March 18, 2016 at 5:08:15 PM UTC-5, Jeff Riley wrote: > > Ah you are totally correct. The controller is default and manage_customers > is the function. I am still getting used to these constructs. --

[web2py] Re: session always written if auth.user_groups is accessed

2016-03-19 Thread Alex
thanks! for me that's fine and an easy workaround. The question is if/how you can address the issue for other users - or at least warn them about it. I think experiencing this problem is not that unlikely but it goes unnoticed very easily. For a small user base its irrelevant (from a

[web2py] Re: Scheduler as a service RHEL 7

2016-03-19 Thread Michael M
Sorry Dave, I know how that goes :) If you find a more elegant solution. I'm open. -- 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

[web2py] Re: Oracle Driver Not Available When web2py run from bash script

2016-03-19 Thread Michael M
CX_Oracle and instantclient are weird about permissions. See where they get installed on your system with command "locate" and report back the output of "ls -l" in the directory it was found in. Also run "ps -aux|grep web2py" and see who the user is running it under the different methods you

[web2py] Re: How many days does it take you to learn django if you know web2py (and only web2py)?

2016-03-19 Thread rajjmatthur
If you are not comfortable with django ORM you can also use SQLalchemy . Use that in web2py first to verify your model. And then you can copy and replace in django. Here is a way to replace the django ORM with SQLAlchemy. http://lethain.com/replacing-django-s-orm-with-sqlalchemy/ You will be

[web2py] Re: Using Scheduler to delete database rows older than a timestamp

2016-03-19 Thread Dave S
On Friday, March 4, 2016 at 11:01:50 AM UTC-8, Dave S wrote: > > > > On Friday, March 4, 2016 at 3:25:50 AM UTC-8, Niphlod wrote: >> >> never ever ever call a queue_task() in a model. models gets executed at >> every request. just queue the task in a "protectedinitialsetup()" >> controller and

[web2py] Re: How to preserve order for query results

2016-03-19 Thread Ron Chatterjee
Wouldn't the sort in numpy will do the same? http://docs.scipy.org/doc/numpy-1.10.1/reference/generated/numpy.sort.html On Thursday, March 17, 2016 at 7:23:51 AM UTC-4, Leonel Câmara wrote: > > You already have an answer but if you're interested in making the DB do > the sorting (which may be

[web2py] custom authentication

2016-03-19 Thread T.R.Rajkumar
I have the username, password, role in legacy SQL server database. In my login from I check the credentials against the above database. Now how to restrict access to controller functions, since I am not using Auth. Pl.guide. -- Resources: - http://web2py.com - http://web2py.com/book

Re: [web2py] Re: XML object

2016-03-19 Thread Anthony
Please show your exact view code as well as the final rendered HTML. -- 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

[web2py] Re: fighting with the widget

2016-03-19 Thread Pierre
thanks Val K still there's something unclear: the book implies that a new widget is just a function and a field definition bound to that function like: def my_string_widget(field, value): return INPUT(_name=field.name, _id="%s_%s" % (field._tablename, field.name),

[web2py] Re: Couple of questions about improving performance in models

2016-03-19 Thread Dave S
On Friday, March 18, 2016 at 10:19:40 AM UTC-7, Lisandro wrote: > > Anthony, thank you very much for your help. > > [...] > I'm tempted to ask one more thing that I'm wondering about: > > In my model, I have several tables (lets say about 8 or 9) that are used > to store information about

[web2py] Re: How do you use web2py app work with phonegap?

2016-03-19 Thread Leonel Câmara
As I said the book explains how to do it: http://web2py.com/books/default/chapter/29/10/services#Restful-Web-Services -- 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] Re: URL parsing in controller

2016-03-19 Thread webmaster
Maybe something about "args=request.args(2,5)"? You could try to test this: args=[request.args(2),request.args(5)] On Friday, March 18, 2016 at 1:01:51 PM UTC-7, Jeff Riley wrote: > > Hello All, > > I am pulling my hair out. I am trying to redirect the view button on a > smartgrid. I can

[web2py] Re: URL parsing in controller

2016-03-19 Thread Jeff Riley
Sorry, edit is the function. This URL does not call view. -- 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: Using MySQL in GAE locally (is it actually possible?)

2016-03-19 Thread webmaster
Ok, I went into the web2py_filesystem file that's being created in MySQL by GAE. It shows a bunch of these .table files, but web2py (when run on local GAE) is still searching for the folders in the OS's filesystem. Is this just a bug? On Thursday, March 17, 2016 at 12:59:59 PM UTC-7,

[web2py] Re: How do you use web2py app work with phonegap?

2016-03-19 Thread eric cuver
hi Leonel, which client (boostrap, jquery mobile, ionic.) for design with phonegap advises you ? Le vendredi 18 mars 2016 18:41:22 UTC+1, Leonel Câmara a écrit : > > I'm sorry but you show fundamental misconceptions about what phonegap > does, what web2py does, how they run in the

[web2py] Djano channels

2016-03-19 Thread Najtsirk
https://blog.heroku.com/archives/2016/3/17/in_deep_with_django_channels_the_future_of_real_time_apps_in_django Is there anything similar in web2py? I read about comet messaging. How these two compare? Thanks, Najtsirk -- Resources: - http://web2py.com - http://web2py.com/book

[web2py] web2py type 'exceptions.AttributeError'

2016-03-19 Thread Nikhil Rayaprolu
# view #show.html {{extend 'layout.html'}} {{=page.title}} [ {{=A('edit', _href=URL('edit', args=request.args))}} ] {{=MARKMIN(page.body)}} Comments {{for post in comments:}} {{=db.auth_user[post.created_by].first_name}} on {{=post.created_on}} says

[web2py] Re: web2pyslices unsuable

2016-03-19 Thread webmaster
As a temporary fix while figuring this out, Google has cached pretty much every slice. Just do a google search in the style "site:web2pyslices.com" and the tack on whatever search terms you want, then click the little green down arrow on Google's search results for the cached version of the

[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-19 Thread webmaster
No rush for me. I'm satisfied with my temporary fix since I can finally get back to actual coding. Thanks for making such a pleasant framework. On Saturday, March 19, 2016 at 12:25:02 AM UTC-7, Massimo Di Pierro wrote: > > I will get to the bottom of this tomorrow. It is a promise. > > On

[web2py] Re: creating a user in auth from shell

2016-03-19 Thread Anthony
new_user = auth.register_bare(email='x...@example.com', password='1234', ...) new_user.update_record(registration_key='') # This approves the registration - can be done later. db.commit() # Make sure you explicitly commit db operations when in a script or the shell. That will handle hashing the

[web2py] Re: IMPORTANT SECURITY ISSUE

2016-03-19 Thread Antonio Salazar
Since this is not a vulnerability, can Examples be simply disabled? On Tuesday, March 15, 2016 at 10:43:24 AM UTC-6, Massimo Di Pierro wrote: > > An important security issue has come up. > > If you use web2py in production with the rocket web server (which you > should not anyway): > 1) delete

[web2py] Re: Couple of questions about improving performance in models

2016-03-19 Thread Anthony
See http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#on_define. On Thursday, March 17, 2016 at 6:13:35 PM UTC-4, Lisandro wrote: > > I will bother with one last related question: *what about callback > triggers?* > I'm defining them like this: > >

[web2py] Re: URL parsing in controller

2016-03-19 Thread Jeff Riley
DPS and all, I have my routes.py set to the application (a). As far as what is requestmaths(0), that is what is confusing. That URL is generated by smartgrid. Manage_customers is the controller, so customer should be the function but it is not. View is the function. This is why I am having

[web2py] Re: Couple of questions about improving performance in models

2016-03-19 Thread Lisandro
Oh I see! So I can define the virtual/method fields that way, and then it does make sense to keep using lazy_tables. Completely missed that point. Thank you very much! As always, web2py's community rocks. El jueves, 17 de marzo de 2016, 14:59:35 (UTC-3), Anthony escribió: > > On Thursday,

[web2py] Re: How do you use web2py app work with phonegap?

2016-03-19 Thread Leonel Câmara
> So inside the compressed zip folder you upload for phonegap app wrapping, you simply put the w2p file of your file inside the zipped folder. What?! No! Of course not. web2py will reside and run on a regular webserver your phonegap application talks to it over the internet. You don't put

[web2py] How can GAE write to the /databases file?? (I know it can't, but what's the workaround?)

2016-03-19 Thread webmaster
So I've got everything running fine locally on a fresh version of my app, load it up in dev_appserver.py and it looks fine. Then I refresh, and now GAE can't find any *.table files in /databases. Because there aren't any, since GAE doesn't write to the FS. So how do I get around this? --

[web2py] is there an easy way to add member to the db.auth_membership?

2016-03-19 Thread Yibing Liu
I want to add member to the db.auth__membership. I have too many users in db.auth_user, so it's very hard to add a specified user to the membership. Could anyone help me? The following is the screenshot

[web2py] Re: sqlite database files corrupted?

2016-03-19 Thread Dave S
On Thursday, March 17, 2016 at 12:55:05 PM UTC-7, P Page-McCaw wrote: > > I have a pretty simple web2py application that inputs information about > academic seminars and then displays the seminar notices on our departmental > home page. It is called, creatively, SeminarCalendar. This is hosted

Re: [web2py] Re: URL parsing in controller

2016-03-19 Thread Jeff Riley
DPS and all, I have my routes.py set to the application (a). As far as what is requestmaths(0), that is what is confusing. That URL is generated by smartgrid. Manage_customers is the controller, so customer should be the function but it is not. View is the function. This is why I am having

[web2py] Functional programming in web2py...

2016-03-19 Thread António Ramos
Hello i´m a confused guy so bare with me.. I recently discovered elixir language and its so much different mainly because its a functional programming style. One of the things i like is the pipe operator. See here info about it and a way to do it in ruby.

[web2py] Re: Couple of questions about improving performance in models

2016-03-19 Thread Lisandro
Anthony, thank you very much for your help. I've successfully changed the definition of the callback trigger, like this: db.define_table('mytable', Field('myfield'), on_define=lambda table: table._after_update.append(lambda s, r: myfunction (s, r)) ) I'm tempted to ask one more thing that

[web2py] Re: modal not work when upload form field have the data

2016-03-19 Thread Leonel Câmara
Stifan you didn't try my solution. My solution doesn't use the LOAD helper, you need to invoke it using javascript. -- 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] Re: URL parsing in controller

2016-03-19 Thread Anthony
Rather than intercept the built-in view/edit links (which results in an unnecessary request due to the redirect), you might also consider removing them and instead use the "links" argument to create your own links/buttons for those functions. Anthony On Friday, March 18, 2016 at 4:01:51 PM

[web2py] Re: Big Bug: Cloud SQL completely broken? Steps and solution.

2016-03-19 Thread Massimo Di Pierro
I will get to the bottom of this tomorrow. It is a promise. On Friday, 18 March 2016 17:42:34 UTC-5, webmas...@trytha.com wrote: > > 2.12.2 is definitely not broken, since that's what I've been using live on > GAE for about six months. (www.trytha.com) > > I did the precise steps I outline

[web2py] Re: Adding a new table to web2py with a reference field to an established table and getting error

2016-03-19 Thread Heather Dawe
The two tables I am defining are as follows db.define_table('Series', Field('name'), Field('SeriesBy', 'reference DataItem'), format='%(name)s') db.define_table('SeriesReportInstanceIndicatorInstance', Field('Series', 'reference Series'), Field('ReportInstanceIndicatorInstance'

[web2py] Re: XML object

2016-03-19 Thread Anthony
Are you inserting it in the view somehow: {{=XML(...)}} If so, what are you seeing in the final rendered HTML? Anthony On Wednesday, March 16, 2016 at 3:12:04 PM UTC-4, Jerry Liu wrote: > > > Hi, all > > I want to use XML object to stop html from being escaped. But the object > seems > not

[web2py] Re: Couple of questions about improving performance in models

2016-03-19 Thread Lisandro
Thank you very much for the quick answer. Your first comment made me think about the "lazy_tables" with the definition of virtual method fields. If you say that doing db.tablename the table is no longer lazy, *then it wouldn't make sense to use lazy_tables in a particular case where almost

[web2py] response.render not using the right view

2016-03-19 Thread Jacob Thoennes
I'm using the ajax strategy suggested by mdipierro here https://groups.google.com/d/msg/web2py/5rIQhH-RD28/Rp54nhJ1j28J My code looks like this: In default.py: def update_stackItems(): stackID = request.args[0] stack = session.stack_dict[int(stackID[5:])] return

[web2py] Re: Adding a new table to web2py with a reference field to an established table and getting error

2016-03-19 Thread Heather Dawe
Hi Anthony, Many thanks for this. A complete noobie error - sorry to waste your time but I really appreciate your help. It was the error message that threw me! Best wishes, Heather On Thursday, 17 March 2016 15:55:17 UTC, Anthony wrote: > > You are missing a comma: > >