I have gone down the route of using the following controller code
(I've left out a few checks for simplicity)
recipes=db(db.recipe.id==id).select()
recipe=recipes[0]
form=SQLFORM(db.recipe, recipe)
return dict(form=form)
... and in the view
Name:
etc.
This seems to work well BUT I want to u
That would be great!
Daniel
On Fri, Oct 10, 2008 at 08:59, mdipierro <[EMAIL PROTECTED]> wrote:
>
> I have emailed the publisher again about this. We agreed on PDF. I was
> not aware of this system that they are using and I do not like it.
> People should be able to print it. If he does not fixe
I'm glad to hear that. I'm looking forward to a true-PDF option.
-tim
mdipierro wrote:
> I have emailed the publisher again about this. We agreed on PDF. I was
> not aware of this system that they are using and I do not like it.
> People should be able to print it. If he does not fixes it I will
Massimo, what do you think about about http://safari.oreilly.com/? It
is very good service. All books can be crosslinked, searched, printed,
you can sell even Draft version.
On Oct 10, 7:59 am, mdipierro <[EMAIL PROTECTED]> wrote:
> I have emailed the publisher again about this. We agreed on PDF
OK just replace
recipe=recipes[0]
with
recipe=recipes[0] if recipes else None
On Oct 10, 5:57 am, billf <[EMAIL PROTECTED]> wrote:
> I have gone down the route of using the following controller code
> (I've left out a few checks for simplicity)
>
> recipes=db(db.recipe.id==id).select()
> recip
Do not do it. Mobipocket does not work on Mac OS X nor iPhone, blah.
On Oct 10, 7:50 am, seeker <[EMAIL PROTECTED]> wrote:
> Any chance that the book can also be sold through Mobi? They also
> provide protection, if that is big a concern, and the format is a lot
> more popular.
--~--~-
What I would like to see is a form where the components are accesible
by field name.
I think you once said something about extending the SQLFORM class, any
rules on this?.
I am also siding with Jose on the use of DIVs instead of TRs since
they are more easily manipulated using CSS (e.g.
http://j
I do not understand what you mean. could you provide an examle?
On Oct 10, 9:35 am, "José Deodoro de Oliveira Filho"
<[EMAIL PROTECTED]> wrote:
> Just out of curiosity: I've gone that way and what I noticed is that I
> loose the error divs, then I went back to using {{=form}}. Is that
> correct ?
Just send to the editor
"
My users need a true PDF option. How difficult would it be to use
http://safari.oreilly.com? I understand they work with Wiley.
I am also considering giving the original PDF away for free.
"
Massimo
On Oct 10, 6:35 am, Baron <[EMAIL PROTECTED]> wrote:
> I went to downl
No linux = No Buying for me..
I want PDF ..
On Fri, Oct 10, 2008 at 11:35 AM, Baron <[EMAIL PROTECTED]> wrote:
>
> I went to download the software but found there is no Linux version:
> http://www.vitalsource.com/software/bookshelf/mbs-downloads/
>
>
>
> On Oct 10, 5:59 pm, mdipierro <[EMAIL PRO
I went to download the software but found there is no Linux version:
http://www.vitalsource.com/software/bookshelf/mbs-downloads/
On Oct 10, 5:59 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> I have emailed the publisher again about this. We agreed on PDF. I was
> not aware of this system that the
Sorry,
I mean I built a form, like Bill, manually:
>> >> > >> action="controller_name">
>> >>
>>
>> >> Name:> >> size="50" maxlength="50" value="{{=form.record.name}}"/>
>> >> etc.
And the drawback is that I miss the error divs generated by the
validators (which are a big plus), so I'd better
Just out of curiosity: I've gone that way and what I noticed is that I
loose the error divs, then I went back to using {{=form}}. Is that
correct ?
Deodoro Filho
On Fri, Oct 10, 2008 at 11:28 AM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> OK just replace
>
> recipe=recipes[0]
>
> with
>
> recipe=r
Yes. There would be no error dislayed. The errors are in the dict
form.errors so you can insert things like
{{if form.errors.has_key('name'):}}Ops, error:{{=form.vars.name}}
{{pass}}
Massimo
On Oct 10, 10:20 am, "José Deodoro de Oliveira Filho"
<[EMAIL PROTECTED]> wrote:
> Sorry,
>
> I mean I b
I agree. I am sorry and I can assure you when discussing with the
editor no other format was ever mentioned other than PDF.
On Oct 10, 10:11 am, "Phyo Arkar" <[EMAIL PROTECTED]> wrote:
> No linux = No Buying for me..
>
> I want PDF ..
>
> On Fri, Oct 10, 2008 at 11:35 AM, Baron <[EMAIL PROTECTED]
Yes. There would be no error dislayed. The errors are in the dict
form.errors so you can insert things like
{{if form.errors.has_key('name'):}}Ops, error:{{=form.vars.name}}
{{pass}}
Massimo
On Oct 10, 10:20 am, "José Deodoro de Oliveira Filho"
<[EMAIL PROTECTED]> wrote:
> Sorry,
>
> I mean I b
Another DB problem
I tried to changed database schema , data type Text to string , and now it
is giving this error :
code :
Ticket 127.0.0.1.2008-10-10.23-35-33.c7c54895-a27b-43b1-bf3d-2888acd4527e
Error traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
Traceback (most recent call last):
File "/opt/w
Code :
dbOBJECT.define_table("student",
SQLField("std_id", "string", length=32, notnull=True, default=None),
SQLField("std_name", "string", length=80, notnull=True, default=None),
SQLField("password", "password", notnull=True, default=None))
On Fri, Oct 10, 2008 at 5:21 PM, P
# ps ax | grep 'dispatcher' | grep -v 'grep' | sed -e "s/ ?.*//"
123456
# renice -10 123456
(just a friendly reminder)
mdipierro wrote:
> processing
> >
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2
You can only drop it after define.
If you know for sure the table exists it is ok to do
db=SQLDB(..)
db.define_table('student',migrate=False)
db.student.drop()
On Oct 10, 12:22 pm, "Phyo Arkar" <[EMAIL PROTECTED]> wrote:
> Code :
>
> dbOBJECT.define_table("student",
> SQLField("std_id", "
Its ok if there is no PDF,
Ther is "Web2py Man" Massimo Already :D
We can ask anything we want he will help in a flash :D .
On Fri, Oct 10, 2008 at 12:45 PM, Timothy Farrell <[EMAIL PROTECTED]>wrote:
> I'm glad to hear that. I'm looking forward to a true-PDF option.
>
> -tim
>
>
> mdipierro
No. In principle you should never drop. When you drop you lose all
your data.
On Oct 10, 12:50 pm, "Phyo Arkar" <[EMAIL PROTECTED]> wrote:
> Thanks I will try;
>
> if i alter table , have to always drop?
>
> On Fri, Oct 10, 2008 at 5:40 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> > You can only
Thanks I will try;
if i alter table , have to always drop?
On Fri, Oct 10, 2008 at 5:40 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> You can only drop it after define.
>
> If you know for sure the table exists it is ok to do
>
> db=SQLDB(..)
> db.define_table('student',migrate=False)
> db.studen
Got the message. I am kind of swamped these days. This will happen but
needs a little more design to make it right. It is in the todo list
but will now happen tomorrow.
On Oct 10, 12:29 pm, Timothy Farrell <[EMAIL PROTECTED]> wrote:
> # ps ax | grep 'dispatcher' | grep -v 'grep' | sed -e "s/ ?.*/
Dear Massimo;
Wow You going to release Online PDF for FREE
FANTASTIC!!
Really!!?? or just to scare oreilly up? :D
On Fri, Oct 10, 2008 at 3:10 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> Just send to the editor
>
> "
> My users need a true PDF option. How difficult would it be to use
> ht
I think in routes.py there should be routes on error for different
types of error. The problem is this may cause circular references.
Timothy Farrell wrote:
> # ps ax | grep 'dispatcher' | grep -v 'grep' | sed -e "s/ ?.*//"
> 123456
> # renice -10 123456
>
> (just a friendly reminder)
>
> mdipier
yeah , i lost all my data everytime i change a datatype for afield , in the
table defination..
So , how to make it work without dropping?
On Fri, Oct 10, 2008 at 6:00 PM, mdipierro <[EMAIL PROTECTED]> wrote:
>
> No. In principle you should never drop. When you drop you lose all
> your data.
>
Thats only happens in mysql , its ok with sqllite.
On Fri, Oct 10, 2008 at 6:04 PM, Phyo Arkar <[EMAIL PROTECTED]>wrote:
> yeah , i lost all my data everytime i change a datatype for afield , in the
> table defination..
>
> So , how to make it work without dropping?
>
>
>
>
> On Fri, Oct 10, 2008
Just to be technically correct.
He said he might do it for free if the publisher wasn't cooperating.
That would be great for us, but he's worked hard on this and deserves to
be paid for it.
Let's not apply any undo pressure.
=)
Phyo Arkar wrote:
> Dear Massimo;
>
> Wow You going to release O
Yeah i know :D
I am waiting to buy PDF version .
If hes going to release it , i gonna offer him my enterprise plan web
hosting for free for him :D.
On Fri, Oct 10, 2008 at 6:09 PM, Timothy Farrell <[EMAIL PROTECTED]> wrote:
> Just to be technically correct.
>
> He said he might do it for free i
I know you're busy, I just don't want this to get lost in the fray. I
don't mean to be naggy. Anyway...
I actually had that idea a while ago but never presented because I
thought you would be against it. Anyway, I like this concept better anyway.
Here's an idea:
- Have a generic error page (s
The problem I have is that when recipe=None, =form.record.any_field
fails hence the thinking that a "new" record containing defaults would
overcome this. I have had a stab with the following:
class SQLROW(SQLStorage):
"""
Return a row created from the table definition with values set to
My doubts are more like:
When exactly does a session start and ends?
Does closing the browser ends current session?
Thank you
On 10 Okt, 05:53, "Steve Shepherd" <[EMAIL PROTECTED]> wrote:
> I will have a go at this.
>
> 1. The Google account does not reply on GAE. You could be in our out of GA
A session starts the first time a page is requested from web2py where
"session.forget()" is not in the controller.
The session key is stored on the user's browser in a session cookie.
Cookies can have any preset expiration date (although IE6 is stupid
about this and defaults most cookies to be
Right now there are various types of errors:
- URL does not pass validation
- Invalid controller
- Invalid action
- Invalid static file
They all raise HTTP(400,"message",web2py_error="") and if
- A ticket is being issues
It raises HTTP(200) but the page shows the ticket number.
The value
yes.
thank you.
On 10 Okt, 22:17, Timothy Farrell <[EMAIL PROTECTED]> wrote:
> A session starts the first time a page is requested from web2py where
> "session.forget()" is not in the controller.
>
> The session key is stored on the user's browser in a session cookie.
> Cookies can have any pre
Next installment :-/ (As a reminder, the objective is to create an
SQLFORM in the controller that can be used to validate/update using
request.vars from a separate custom form. The problem was how to
include the required formkey and formkey value in the custom form.)
Please note the changes des
1) About SQLROWS below. I am not sure what it is supposed to do.
SQLFORM(table,None) should already pre-populate the form with default
values from table.field.default.
2) formname is in form.formname and defined in SQLFORM(formname='bla
bla')
3) formkey is in session._formkey but only AFTER the
correction... formkey goes in
session['_formkey[%s]' % form.formname]
perhaps this variable should be set when the form is accepted, not
when serialized
Massimo
On Oct 10, 5:31 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> 1) About SQLROWS below. I am not sure what it is supposed to do.
> SQL
I went back to Massimos original code...
and now I get this error:
TypeError: 'NoneType' object is not iterable
ticket:
for head in response.menu:
response.write('\n',escape=False)
response.write(A(head[0],_href=head[2]))
response.write('\n
\
It would be cool if the routes were configured as a WSGI plugin as in
Pylons, but I am content, it was tough to get Massimo to allow
routing :-D. In case it does get to be re-coded as a WSGI plugin, why
place error handling in it? Would it not be better to have an error
handling plugin that "gener
Yes. It would not be for every URL but it should be able to distingish
different causes or error (user error as invalid URL from internal
error that causes a ticket).
Massimo
On Oct 10, 7:55 pm, voltron <[EMAIL PROTECTED]> wrote:
> It would be cool if the routes were configured as a WSGI plugin
Ok so i have a little problem which i cant seem to solve.
In default.py controller i have a SQLFORM to display registration
form. Now in the SQLFORM i have _action=URL(r=request, c='user',
f='register') which transfer the form over to user/register. (i want
to make controller for different things
Massimo
Thanks for your answers.
> 1) About SQLROWS below. I am not sure what it is supposed to do.
> SQLFORM(table,None) should already pre-populate the form with default
> values from table.field.default.
I asked the question Oct 10 11.57am "does a function already exist?"
but didn't get this
In my original post, I used HTML tags just to illustrate what I was
trying to do. In my actual implementation, I may use non-HTML XML, the
web2py template syntax, or maybe something else.
Ed
On Oct 1, 7:57 pm, JorgeRpo <[EMAIL PROTECTED]> wrote:
> why dont you use the template syntax?
>
> Ed wr
Thanks Massimo,
I tried the code you suggest and received the following error:
table.append(TR(*[TH(field) for field in db[table].fields]))
KeyError:
Any idea why?
Ed
On Oct 1, 8:13 pm, mdipierro <[EMAIL PROTECTED]> wrote:
> You can but your implementation is not the way to do it. If y
46 matches
Mail list logo