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
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:
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
>
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
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
-
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
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
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
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
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
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
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
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
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
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
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
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)
-
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
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
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
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
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
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.
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
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
>
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
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
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
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
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
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
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
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,
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
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:
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
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:
-
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
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
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
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
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
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
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:
>
>
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
>
> 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
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
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
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
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
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.
--
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
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
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
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
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
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
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
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
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),
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
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
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
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
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,
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
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
# 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
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
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
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
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
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:
>
>
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
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,
> 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
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?
--
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
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
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
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.
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
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
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
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
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'
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
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
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
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:
>
>
90 matches
Mail list logo