Massimo,
Since it is on GAE, I don't have the full traceback (if there is another
way to get the traceback, pl let me know). I got only the below two types
of errors:
routes_out: [/init/default/index] not rewritten
Unable to write to file
/base/data/home/apps/s~123-check/1.354481446592778594/a
The idea of using their joke is fun, its like a joke inside a joke...
But I really think if Web2py is a Web Framework the Home Page should
be more fancy not too much but it should represents what Web2py can
do.
IMHO the best way to do it is doing a contest and Massimo decides
which one to use. Fo
ValueError: invalid literal for int() with base 10: 'abcd'
>From SQLForm.grid, when clicked on the ' View' button I get the following
When I click on the 'Edit' button, I get a ticket:
File "/home/js/web2py/gluon/dal.py", line 1378, in represent
return str(int(obj))
ValueError: invalid
Apologies, the screenshot did not show up in the email. I have attached it
here.
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)
<>
This also happens in the appadmin interface. A bug perhaps?
I have updated my web2py version from the trunk this morning.
Previously this worked without a problem.
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)
Thank you Bruno!
I added commons.db = db to my controller to make db globally available in
that module.
Thanks again!
With Regards,
Sathvik
On Mon, Nov 7, 2011 at 10:54 AM, Bruno Rocha wrote:
>
>
> On Mon, Nov 7, 2011 at 2:55 AM, Sathvik Ponangi wrote:
>
>> Dear Massimo,
>> Restarting AppEngin
Is there someway that could display each of my user's profile as a custom
URL like http://my_site.com/user_name ?
I'm using Web2Py(1.99.2_Stable) on GAE (SDKv1.5.5) on Python2.5
--
Sathvik Ponangi
I tryed this construction:
if form.validate().accepted:
print "accepted"
But I got this error:
AttributeError: 'NoneType' object has no attribute 'accepted'
In book, chapter 7, "SQLFORM without database IO" section has 2
examples using form.validate().accepted.
Is it an error or didn't I get s
Hi guys.
I have this construction:
form = SQLFORM(db.my_table,
fields=[
'description',
'date'],
submit_button='Add data')
my_person_data = TR(LABEL('Customer'),
INPUT(value=other_table.customer_id.name, name='customer_name'))
form[0].insert(0,
On Sunday, November 6, 2011 11:51:23 PM UTC-5, Sathvik Ponangi wrote:
>
> Restarting my AppEngine server has fixed this issue. Thank you all for
> your help.
Yes, you always need to do a restart whenever you change routes.py.
Have you tried INPUT(..., _readonly="readonly")? That adds an HTML
"readonly" attribute to the INPUT field, so the readonly display is
controlled by the browser (it should appear as a regular input field, but
the value will not be editable). If you just want to display the value
itself, but not
Yes, that's an error in the book. form.validate() returns True or False.
form.process() returns the form itself, so you have to check the status via
form.process().accepted.
Anthony
On Monday, November 7, 2011 7:15:54 AM UTC-5, viniciusban wrote:
>
> I tryed this construction:
> if form.validat
Is there a way to insert HTML into a database text field so that when
the text is displayed (say, in a SQLTABLE), the browser renders the
HTML? For example, I insert:
http://psychovisual.com";>Psychovisual.com
into a database text field, but it's not rendered.
Thanks,
Richard
Hi,
I have been trying to connect to a remote read only mysql database. This is
an existing production database, I want to use web2py to display it's data
graphically .
I can read from it using dby.executesql('SELECT * FROM test;') but not
using dby().select(dby.test.ALL).
The example i
Thank you Anthony.
_readonly="readonly" solved my problem.
On Mon, Nov 7, 2011 at 10:52 AM, Anthony wrote:
> Have you tried INPUT(..., _readonly="readonly")? That adds an HTML
> "readonly" attribute to the INPUT field, so the readonly display is
> controlled by the browser (it should appear as
Anthony, and if I just want the form validation, without updating the database?
Isn't what form.validate().accepted is supposed to do?
On Mon, Nov 7, 2011 at 11:01 AM, Anthony wrote:
> Yes, that's an error in the book. form.validate() returns True or False.
> form.process() returns the form it
Omi,
there was a mistype "db.m_Maker.ALL" instead of "db.Maker.ALL", which
I corrected.
Anyway, my main issue with your solution is that the FORM object is
not used, and so no Form validation is possible. On the other hand,
Freeze's solution with cascading fields in web2pyslices, seems too
advanc
Omi,
there was a mistype "db.m_Maker.ALL" instead of "db.Maker.ALL", which
I corrected.
Anyway, my main issue with your solution is that the FORM object is
not used, and so no Form validation is possible. On the other hand,
Freeze's solution with cascading fields in web2pyslices, seems too
advanc
We REALLY need a CMS. I regularly develop sites that may have one or two
pages that need web2py's power, but the rest of the pages only need basic
CMS/Blog functionality. So I end up writing the those pages by hand in
HTMLseems like such a waste.
Since I would regularly use and CMS/Blog fun
I spent months evaluating different web frameworks written in Java, Python,
PHP, and several others. I found that web2py was the easiest and most
productive of them all. Being Python-based, web2py combines ease-of-use and
fast performance with an incredible amount of power. Put simply, I have
d
process() calls validate(), and validate() calls accepts(), so they all do
mostly the same thing. They all take a dbio argument, which determines
whether to update the db in the case of SQLFORM. dbio defaults to True in
process() and accepts() and False in validate(), so yes, by default,
form.v
the question is:
to define
columns=['accountcode.ani','llamados.destino','llamados.answeredtime','llamados.inicio','llamados.valor']
I only show the columns that correspond to the table is llamados I need to
display and just as the column of the table accountcode
2011/11/2 Massimo Di Pierro
Try this:
import sae
import gluon.main
from gluon.settings import global_settings
global_settings.web2py_runtime_gae = True
application = gluon.main.wsgibase
On Nov 7, 1:57 am, chinakr wrote:
> SAE means Sina App Engine, which is a public cloud computing platform
> like GAE. It's the most matur
try
dby.define_table('test', Field('test_id', 'string'), Field('title',
'string'), Field('description', 'string'), migrate=False,
primarykey=['test_id'])
On Nov 7, 2:10 am, Matt Simpson wrote:
> Hi,
>
> I have been trying to connect to a remote read only mysql database. This is
> an existing pro
None of these are errors but warning. The first is telling you that
you are using routes_out. It only displays the message in DEBUG mode.
The latter tells you that you have a T("something") and "something"
does not appear in the language file. It tries to add the entry and it
cannot because readonl
The HTML is probably being escaped in the view when it is displayed. Try
putting the content inside XML() when you display it. If you want the
content to display properly in a SQLTABLE, you should be able to use XML()
in the field's "represent" attribute:
db.define_table('your_table',
Field
Given
auth.define_tables(username=True)
def proflle():
return
dict(form=SQLFORM(db.auth_user,db_auth_user(username=request.args(0)),readonly=True))
then in routes.py
routes_in = [('/$username','/yourapp/default/profile/$username')]
routes_in = [('/yourapp/default/profile/$username','/$user
Can you post a minimalist model/controller to reproduce it?
On Nov 7, 5:17 am, Johann Spies wrote:
> ValueError: invalid literal for int() with base 10: 'abcd'
>
> From SQLForm.grid, when clicked on the ' View' button I get the following
>
> When I click on the 'Edit' button, I get a ticket:
>
You can also try call:
http://.../admin/default/reload_routes
On Nov 7, 6:47 am, Anthony wrote:
> On Sunday, November 6, 2011 11:51:23 PM UTC-5, Sathvik Ponangi wrote:
>
> > Restarting my AppEngine server has fixed this issue. Thank you all for
> > your help.
>
> Yes, you always need to do a res
Thanks!
On Mon, Nov 7, 2011 at 8:21 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> You can also try call:
>
> http://.../admin/default/reload_routes
>
> On Nov 7, 6:47 am, Anthony wrote:
> > On Sunday, November 6, 2011 11:51:23 PM UTC-5, Sathvik Ponangi wrote:
> >
> > > Restarting
On Nov 6, 2011, at 10:44 PM, Spring wrote:
> Hi Jonathan,
>
> I checked the debug logs on GAE as you suggested, and here is the
> detail after I hit "www.mydomain.com":
>
> 2011-11-06 22:35:29.090 /favicon.ico 404 22ms 0cpu_ms 0kb
> W 2011-11-06 22:35:29.090 Static file referenced by handler not
There are two controllers say A and B. A calls B from within. Now, I want
to redirect back to the controller A on return from B. In my case both A
and B are variable. What is the best way to do this? One way is to maintain
a session variable such as session.prev_url.
Abhishek
http://abhishekgupta9
Thank you Massimo.
I'm using a DAL table for users
db.define_table('users',
> db.Field('name', 'string'),
> db.Field('password', 'password')
> )
How should I go about it?
Also I'd like the same for non user-pages like http://my_site.com/my_page
> there was a mistype "db.m_Maker.ALL" instead of "db.Maker.ALL", which> I
> corrected.Yeah, it works now !
In my case all I need were two lists and they are mandatory so that I
don't need any validation. I assume you have other fields or allow to
input something not in the list...
I haven't tri
Hi thodoris,
do you use the latest trunk version?
Am 03.11.2011 13:12, schrieb thodoris:
> I have the following configuration
>
> auth.settings.allow_basic_login=True
>
> db.define_table( 'files',
> Field('file','upload'))
>
> @auth.requires_login()
> def upload():
> form = crud.create
I mean http://my_site/user_name/page_name &
http://my_site/user_name/page_name/link1/...
I don't think its to do with the model (the table in question has no
float or decimal in any case).
I think it has to do with the handling of next= in crud.
The controller code (somewhat simplified, but still reproduces the
problem) is:
def memberform():
if request.vars.membid:
This recent patch:
> @@ -93,7 +93,8 @@
> try:
> fp = open(filename, 'w')
> except IOError:
> -logging.error('Unable to write to file %s' % filename)
> +if not is_gae:
> +logging.warning('Unable to write to file %s' % filename)
> return
>
Did you have a look of what is coming out request.vars.membid and
request.vars.next... I maybe not what you expect that you get and it may
cause the problem...
If you test your controller manually does it work properly? If so, it must
be a wrong type coming from your request.vars, you can try to c
I am trying to understand why the socket timeout would be set so low at 1
second as a default.
I believe this change is the solution to a problem I have been chasing off
and on time permitting where the pages won't render properly when using the
rocket server with a browser over the WAN. Local
Thanks! Works like a charm!
Richard
On Nov 7, 9:39 am, Anthony wrote:
> The HTML is probably being escaped in the view when it is displayed. Try
> putting the content inside XML() when you display it. If you want the
> content to display properly in a SQLTABLE, you should be able to use XML()
>
Good upgrade!
I particularly like the Bossie Award at the top, the detailed
web2py_vs_others.pdf (needs a few minor corrections noted below), and /
what but I don't understand why the link is titled 3rd party tools.
Slide notes:
Slides 36 and 40 say SQLField instead of Field like in the Book.
94
I finally got it to work! Its nice that request.args holds all additional
parameters. Thank you for your time, Massimo!
--
Sathvik Ponangi
This thread might interest you :
http://groups.google.com/group/web2py/browse_thread/thread/f35eeb3c78b90fbd/3c57edf44009d62d?lnk=gst&q=Re%3A+1.99+gluon%2Ftools.py+replace_id+mishandling+url+%5BSOLVED%5D#3c57edf44009d62d
Richard
On Mon, Nov 7, 2011 at 11:38 AM, Richard Vézina wrote:
> Did yo
Web2py is the "can do" web development framework for "can do" developers.
:)
Richard
On Sun, Nov 6, 2011 at 11:26 PM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:
> The layout is derived from this April's fool joke they played on us:
> http://web2pyramid.pylonsproject.org/
>
> The content is the same the old site.
>
> The quotes are taken from twitter #web2p
Just clicking thru some links - Scanme looks like its moved from
http://www.scanme.co.za/ to http://www.scanme.com/
Hello I am using the Version 1.99.3 (2011-11-07 17:41:19) dev version
of web2py.
I am having an issue with this view function:
def check_room_availability():
room = db.room(request.args(0)) or redirect(URL('view_rooms'))
reservations = db().select(db.reservation.room.name==room.name)
r
Hi Mike,
I'm going through each of the chapters and sending my changes to
Massimo. I hope I catch everything, but I'll be looking at your posts
here to make sure I've got them.
Andrew W
On Nov 7, 4:46 pm, mikech wrote:
> I would be glad to help clean up the book if you need it. Otherwise I wil
I do not see the right-hand side menu shown in the book Overview page
shortly after the start of RSS feed discussion. It seems to vary by
browser.
Also, viewing this RSS fied with Google Chrome 15.0.874.106 m displays
raw XML. Is there a setting that I need to change?
A couple of obvious thing. First, the query goes with the db() not
the select(). Second, the reference to room is via room.id rather
than room.name. So you could try:
reservations = db(db.reservation.room==room.id).select()
On Nov 8, 8:49 am, Matthew Young wrote:
> Hello I am using the Versi
Massimo
Here is a little demo app to display the problem. I tested against
trunk updated about noon central time today.
Added this to db.py:
contact = db.define_table('contact',
Field('contactId', 'id'),
Field('name', length=50, required=True),
format='%(name)s')
contact._plural
Looks real good!
Looks great !
Can you add the link to web2py Japan under Documentation - Community
sources - Sites ?
web2py Japan
https://sites.google.com/site/web2pyjapan/
Thanks
On Nov 6, 2:02 pm, Massimo Di Pierro
wrote:
> We have a new web site
>
> http://web2py.com/new_examples
>
> Please check it out
Hi folks,
I spotted a couple formatting errors in the online book today. In
chapter 7, under the section about the process and validate methods:
1. The formatting of the section header is a little strange - the
words "process" and "methods" are smaller than the rest of the text. I
assume that "va
In order to format numbers with thousands separator and custom number
of decimals, I created the following function and included it in my
"db.py" model so it could be accessed through the entire application.
def number_format(num, places=0):
return locale.format("%.*f", (places, num), True)
I
Ok I'm reading thru that chapter, and forward. So I'll report what I find.
Hi all,
I'm confuse with this two questions:
1) Create Virtual Fields are similar to create usual Views in database
(mysql, postgres)?
2) What/How would you recommend to use for a search function? (just the
idea could be enough)
I haven't much experience with neither of both. I never used virtu
As an independent software developer, I need to deliver quickly
without creating a trail of bugs to bite me later. My first outing
with Web2py enabled me to meet these requirements and more. I'm very
happy with Web2py, especially its fantastic community of developers
and users.
On Nov 7, 2:01 pm
Possibly the python version in your production server.
str.format() is available since python 2.6.
--
Vinicius Assef.
On Mon, Nov 7, 2011 at 7:41 PM, Franklin Freitas
wrote:
> In order to format numbers with thousands separator and custom number
> of decimals, I created the following function
Field('room','references room'),
should be
Field('room', db.room),
On Nov 7, 3:39 pm, Limedrop wrote:
> A couple of obvious thing. First, the query goes with the db() not
> the select(). Second, the reference to room is via room.id rather
> than room.name. So you could try:
>
> reserv
I can try to help, too.
On Fri, Nov 4, 2011 at 5:26 PM, Gour wrote:
> On Fri, 4 Nov 2011 10:38:06 -0700 (PDT)
> Massimo Di Pierro
> wrote:
>
>> perhaps we should make a list of desired features.
>
> I believe that WordPress is quite etablished as Blog engine and CMS
> platform, so making Insta
I'm going through the book in detail looking for typos, and trying to
absorb some more learnings at the same time. By all means go ahead,
but we may be doubling up in effort. May I suggest waiting for a
cleaned up Version 3.3 ? I hope it will only contain one or two
missed typos that may need ma
On Monday, November 7, 2011 4:34:26 PM UTC-5, Kevin Ivarsen wrote:
>
> FWIW - back in March I had been given access as a book editor through
> my gmail account, and I'd be happy to make these corrections, but it
> seems that I'm no longer able to made edits. Does this permission
> expire after s
Anyone know how to pull an uploaded file from the database locally on the
server? I want to do some server-side processing on the file and then
re-insert it to the database. I'm not sure I understand how to get the
local path on the server of the uploaded file. The static/upload directory
append
I get the following error with those changes:
Traceback (most recent call last):
File "/home/mattosaurus/web2py/gluon/restricted.py", line 204, in
restricted
exec ccode in environment
File "/home/mattosaurus/web2py/applications/roomReserve/views/
default/check_room_availability.html", line
When you upload a file via an upload field, by default it goes into the
/web2py/applications/yourapp/uploads folder, though you can specify a
different folder via the 'uploadfolder' argument to Field(). The file
itself is renamed (for security reasons) to
[tablename].[fieldname].[16-char-uuid].
FYI, I am not specifically looking for typos, but I am adding a bunch of
material to the book and reviewing most of the newer material, so I'm
catching a lot of typos and errors as well. So, as Andrew says, most of the
typos and formatting issues will likely be resolved by the next release.
Ant
On Monday, November 7, 2011 3:21:25 PM UTC-5, Paul wrote:
>
> I do not see the right-hand side menu shown in the book Overview page
> shortly after the start of RSS feed discussion. It seems to vary by
> browser.
>
Yes, that menu is not generated by web2py. An RSS feed is really just some
raw d
On Nov 5, 2011, at 5:24 PM, Massimo Di Pierro wrote:
> I know I said otherwise before but perhaps we should continue to
> default to 2.5 until App Launcher supports 2.7
I just got Launcher 1.6.0, and it appears to support 2.7.
>
> On Nov 5, 1:28 pm, Jonathan Lundell wrote:
>> I thought I'd pas
Well that's progress. The error is somewhere in your view.
On Nov 8, 12:20 pm, Matthew Young wrote:
> I get the following error with those changes:
> Traceback (most recent call last):
> File "/home/mattosaurus/web2py/gluon/restricted.py", line 204, in
> restricted
> exec ccode in environm
Hello there,
I have created subfolders under static/img for better img organizing. When
tested with web2py and GAE launcher, it works fine. But when I tried to
deploy on GAE, in the console it says "cloning 170 files; cloned 100
files". When I check the webpage on mydomain.com, all img under su
There is a new welcome app in trunk. It uses Skeleton for flexible
grid layout that works on mobile and jquery.dropdown.js instead of
superfish.js.
There are two problems:
1) the footer of the page is shifted of few pixels respect to the
statusbar. (needs to be fixed in views/layout.html)
2) if yo
Pat,
I have a hard time hanging with you west-coasters some time.
Thank you for your assistance. I was able to reference the field directly
into the columns with 'COUNT(events.email)', but wasn't finding it when I
was in the Virtual class. _extra was the key.
def event_list():
> class
Thanks Anthony - good to know.
Another typo I spotted this evening is in Chapter 4 under "Running
tasks in the background". I think:
"Threads and recycles for efficiency and managed by the web server."
should be:
"Threads are recycled for efficiency and managed by the web server."
Cheers,
Kevi
I have quite large experience with Drupal, which I used since 2006 tu
build pretty much everything web-related, from websites to applications,
often using it more as a framework than a CMS.
That project is great, but IMHO it has some drawbacks.
The first that comes to mind:
* Not-so-elegant code,
Anthony,
Aha, thanks for the wisdom. From the CLI and if I build the table manually,
you are correct, it works as expected. It appears as though the powertable
plugin has some specific column requirements, so I'm now referencing the
fields/columns as such:
table.columns = [str(count1),'events.
On Monday, November 7, 2011 11:57:52 PM UTC-5, Wes Hall wrote:
>
> Anthony,
>
> Aha, thanks for the wisdom. From the CLI and if I build the table
> manually, you are correct, it works as expected. It appears as though the
> powertable plugin has some specific column requirements, so I'm now
> re
I found the cause of the problem: I used the suggest-widget with the doc_nr
field and specified an id-field without specifying 'keyword' as in the
documentation. This worked well in SQLFORM.factory but not in the model.
Removing the 'id_field' argument solved the problem.
Regards
Johann
--
Bec
Apologies, I replied to the wrong thread. Ignore my previous email in this
context please.
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)
Thanks for your attention Massimo.
I found the cause of the problem: I used the suggest-widget with the doc_nr
field and specified an id-field without specifying 'keyword' as in the
documentation. This worked well in SQLFORM.factory but not in the model.
db.akb_doccenter.doc_nr.widget = suggest_
81 matches
Mail list logo