Please forgive me if this question is naïve. This is my first try to
instal web2py on a Linux host that supports wsgi. My best bet was
to do the same as:
http://web2py.pythonanywhere.com/welcome/default/index
But when I run the echo command, I got an error that the /var/www/
wsgi.py directory
it's embedded through web2py_ajax.js, or web2py.js, depending on the
version
Hi Alan,
Thanks for your replies. They pointed me in the right direction to
solve the multiselect problem. I am left with one small problem.
The form that contains the multiselect also contains an autocomplete
function:
def index():
form=SQLFORM.factory(
Field('word',label='
I am using 1.99.4
web2py_ajax.js is the answer. I have deleted two lines and now everything
works as expected.
Thank you!
Maybe there should be a more simple way to use AnyTime with own parameters.
2012/2/17 Niphlod
> it's embedded through web2py_ajax.js, or web2py.js, depending on the
> versi
If the controller function is expecting a form field value, it should
be retrieved with request.vars., where is the field name
in the form. You can also retrieve the form fields values with
form.vars. after .process() (if the form passes validation)
or .accepts()
Anyway, I don't know how are you
I'm running from the source version 1.99.4 from my own python 2.7
installation,
Model Code
db = DAL("sqlite://storage.sqlite")
db.define_table('image',
Field('title', unique=True),
Field('file', 'upload'),
format = '$(title)s')
db.define_table('comment',
Field('image_id', db.image),
Field(
I don't know if it helps, but I spotted a typo:
Replace the dollar sign in:
'image,
format = '$(title)s'
with
format ='%(title)s'
Sanjeet.
I sent some code to Mariano last night. So we will have to wait and see if
it works for him.
I'm not great with regular expressions, but I think it's saying ignore
everything in the applications folder EXCEPT admin, examples, welcome, and
__init__. I think that's what the '?!' means.
Thanks Ross
On Fri, Feb 17, 2012 at 6:23 PM, Ross Peoples wrote:
> Sanjeet.
>
> I sent some code to Mariano last night. So we will have to wait and see if
> it works for him.
>
startswith ^ applications/(is like?!(admin or examples or welcome or
__init__)). endswith anything after the .
On Fri, Feb 17, 2012 at 4:56 AM, Ross Peoples wrote:
> I'm not great with regular expressions, but I think it's saying ignore
> everything in the applications folder EXCEPT admin, exampl
If all what you want to do is to link to individual items from the main
page, you don't need to use redirect at all. Simply add HTML code to your
view that would link to /arcticles/show/[id] or /bussiness/show/[id] as
needed.
{{ for article in articles: }}
{{=LI(A(article.title, _href=URL("ar
I've updated from hg repository to this version:
Version 1.99.4 (2012-02-14 08:44:22) stable
The mentioned error doesn't reproduce now.
Thank you
On 12 feb, 21:52, Alan Etkin wrote:
> Thank you Bruce. It is possible to do hg log, it shows the complete
> commit list until the last pulled code (
On Friday, February 17, 2012 6:23:48 AM UTC-5, mweissen wrote:
>
> I am using 1.99.4
> web2py_ajax.js is the answer. I have deleted two lines and now everything
> works as expected.
>
This must be an older version of web2py_ajax.js, as the name of the file
was changed to web2py.js a while back.
The directory does not exist. Run "mkdir /var/www" first.
>
> chapter 7.2.8 of the books tells how to add extra form elements to SQLFORM.
> My question: I want to use a SQLFORM.smartgrid. On adding a new record a
> SQLFORM appears. It is possible to add an extra form element to this form?
>
> Concrete: I want to add a button to activate a datepicker in
The intention is not to track changes in user made applications (different
than the default ones). ?! is the negative lookahead operator, so the first
part of the expression will match "applications/" only if it is not
followed with any of the strings in the brackets. The the second part (.*)
m
Hello All,
I've inherited a site running on v1.61.1 and we're looking at
updating/upgrading things.
Grids are an integral part of the site and was built extensively with
jgGrid including a search plugin, etc.
SmartGrid seems to be near the point we need it to be to switch things over
smoothly
I've made the switch, but I was new to web2py and jqgrid when .smartgrid
came out so it wasn't that tough for me. Happily, the result was that
my boilerplate code is now about 10x less than it was with jqgrid.
.smartgrid isn't perfect, but it works well and was easy to implement.
And, I'm s
Can someone explain what the following css classes are all about:
w2p_fl
w2p_fw
w2p_fc
I see them in the user form and elsewhere, but there's no
documentation or explanation as to why they are applied.
>
> w2p_fl: web2py field label
> w2p_fw: web2py field widget
> w2p_fc: web2py field comment
>
Each input field in a web2py SQLFORM gets a label, widget, and (optional)
comment. Those classes are added to the appropriate TD, DIV, or LI elements
(depending on the formstyle) to make it easy to ap
Hello,
Now I am getting the following error:
when calling URL, function or function name
required
regards,
Praveen
I recommend fondly that you read
http://web2py.com/books/default/chapter/29/4#URL. URL() function is very
important for anyone starting using web2py...
In your case you have to add "article.id" as the only arg.
On Friday, February 17, 2012 11:43:04 AM UTC-5, Praveen Bhat wrote:
>
> Hello,
>
> Now I am getting the following error:
>
> when calling URL, function or function
> name required
>
See my answer here: http://stackoverflow.com/a/9330047/440323
If you get a syntax error, show your exact code.
A
Hello,
When user submit, I redirect him on a read form, but I get in trouble
when for example user has delete a record with update form.
I solve it like this when use SQLFORM() :
if form.accepts(request.vars, session):
session.flash = T('form accepted')
if len(db(
Also, I don't like the solution I come with since I have to make db
request...
Richard
On Fri, Feb 17, 2012 at 12:43 PM, Richard wrote:
> Hello,
>
> When user submit, I redirect him on a read form, but I get in trouble
> when for example user has delete a record with update form.
>
> I solve it
I am not authorized to make such directory on my server.
In my server, my files should go into the public_html folder that
resides inside my "/home/domainName/public_html". Give that, should I
still make a "/var/www" folder? What is the purpose for the "/var/www"
on pythonanywhere?
On Feb 17, 7:49
Right, my bad, I missed the "args" keyword in the URL call. It should be:
URL("articles", "show", args=article.id).
For more details see the examples given by Anthony.
You can test if the record was deleted by checking for the
"delete_this_record" variable:
if form.vars.delete_this_record:
Also, instead of handling the logic after form.accepts(), you could use
form.process(..., onsuccess=some_function) and have the some_function()
callback check for the dele
Thanks Anthony!
The book is mute about that...
Richard
On Fri, Feb 17, 2012 at 1:27 PM, Anthony wrote:
> You can test if the record was deleted by checking for the
> "delete_this_record" variable:
>
> if form.vars.delete_this_record:
>
> Also, instead of handling the logic after form.accepts()
How to manage session.flash=... with form.process()?
Richard
On Fri, Feb 17, 2012 at 1:31 PM, Richard Vézina wrote:
> Thanks Anthony!
>
> The book is mute about that...
>
> Richard
>
> On Fri, Feb 17, 2012 at 1:27 PM, Anthony wrote:
>
>> You can test if the record was deleted by checking for t
Ok, just put it the onssess=func
Richard
On Fri, Feb 17, 2012 at 2:05 PM, Richard Vézina wrote:
> How to manage session.flash=... with form.process()?
>
> Richard
>
>
> On Fri, Feb 17, 2012 at 1:31 PM, Richard Vézina <
> ml.richard.vez...@gmail.com> wrote:
>
>> Thanks Anthony!
>>
>> The book is
Hi all,
I see this in mt GAE logs from time to time:
1. 2012-02-17 11:35:59.737
Exceeded soft private memory limit with 129.473 MB after servicing 107
requests total
2. W2012-02-17 11:35:59.737
After handling this request, the process that handled this request was found
Thanks Jim - easier upgrades and lower overhead is definitely an attraction!
I guess my next step is to do some quick prototypes and see.
Thanks for sharing your experience...
Can you reproduce this with the welcome app?
On Feb 17, 2:09 pm, howesc wrote:
> Hi all,
>
> I see this in mt GAE logs from time to time:
>
> 1. 2012-02-17 11:35:59.737
>
> Exceeded soft private memory limit with 129.473 MB after servicing 107
> requests total
>
> 2. W2012-02-17 11:35:5
Hi, I'm going through the web2py tutorial and I don't understand part
of this line:
db.comment.image_id.requires = IS_IN_DB(db, db.image.id, '%(title)s')
I understand that this requires that the image ID of the image the
comment is under should be in the database. However, I don't
understand what
title is a field in the image table, when displayed in the form it will
show the title instead of the id in the combo-box
On Fri, Feb 17, 2012 at 4:02 PM, davidkw wrote:
> Hi, I'm going through the web2py tutorial and I don't understand part
> of this line:
>
> db.comment.image_id.requires = IS_
>
> Hi, I'm going through the web2py tutorial and I don't understand part
> of this line:
>
> db.comment.image_id.requires = IS_IN_DB(db, db.image.id, '%(title)s')
>
> I understand that this requires that the image ID of the image the
> comment is under should be in the database. However, I do
For the line:
db().select(db.image.ALL, orderby=db.image.title)
Why is there a () after the "db" and before the select? Is db() a
method call of some kind?
Thanks for any clarification.
Thank you!
On Feb 17, 8:08 pm, Anthony wrote:
> > Hi, I'm going through the web2py tutorial and I don't understand part
> > of this line:
>
> > db.comment.image_id.requires = IS_IN_DB(db, db.image.id, '%(title)s')
>
> > I understand that this requires that the image ID of the image the
> > commen
db is a DAL object, which is callable. Its __call__ method takes a query
and returns a Set object, which has a select() method for pulling records
from the database. So, typically, you would do:
db(query).select(...)
However, you can call db without any query (it defaults to None), in which
ca
41 matches
Mail list logo