[web2py] Re: problem with migrating a sqlite db

2010-03-28 Thread Peter Etchells
finger trouble... but this update did not work: ( I may have mistyped the below, but something like it ran error-free, but no changes) dx.fields[otherfield.first()]=dict(value=db.staging[row.staging.id].English) I don't know if the negative ids were a factor - Peter E -- You received

[web2py] Re: problem with migrating a sqlite db

2010-03-28 Thread Peter Etchells
Thanks for your comment, Yarko I had disabled the table references because the anki (non-web2py) database has over 20 tables, including two tables that cross-reference each other. I did not need those references for my purposes, hence the integer fields. I was able to successfully update the 'fie

[web2py] Re: problem with migrating a sqlite db

2010-03-26 Thread Peter Etchells
.fields.id > 0, which filtered these out. It had nothing to do the the empty value field. Thanks for sorting this out for me. I enjoy using web2py. Regards Peter Etchells -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to th

[web2py] problem with migrating a sqlite db

2010-03-25 Thread Peter Etchells
I am getting a conflict between the number of records in a migrated table shown by web2py vs two other applications, including sqlite database browser I am trying to access a sqlite db created by another application (anki). One table is fields: dx.define_table('fields', Field('ordinal', 'integer

[web2py] Re: DAL Cassandra support

2010-03-25 Thread Peter Woolf
I would be appreciative if anyone did add Cassandra support for DAL in web2py too! -- You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web...@googlegroups.com. To unsubscribe from this group, send email to web2p

[web2py] Re: AutocompleteWidget suggestion

2010-03-19 Thread Peter Etchells
to continue, after finger trouble... .select(distinct=distinct, with argdistinct=False in __init-- another less useful suggestion is to optionally allow the search on any part of the string, rather than just the beginning. rows = self.db(field.like('%'+ self

[web2py] AutocompleteWidget suggestion

2010-03-19 Thread Peter Etchells
Autocomplete is a very useful widget, thanks. In case it has missed anyone's attention, it can be used to autocomplete strings without reference to another table or field, eg db.person.name.widget=AutocompleteWidget(request, db.person.name) In this case, it is useful to have a autocomplete list

[web2py] SQLFORM.factory and boolean values

2010-02-22 Thread Peter Woolf
L. Am I doing something wrong here? Thanks, --Peter - def test_boolean_forms():   default_val=True   if request.get_vars.DefaultTrue=="False":     default_val=False   form=SQLFORM.factory(Field("DefaultTrue","boolean", default=default_val))   if

[web2py:32707] Re: crud forms for multiple records? Multiple tables?

2009-10-11 Thread Peter Woolf
thanks Massimo! Let me see if I can get this going via the SQLFORM.factory--thanks for the suggestion. --Peter On Oct 11, 9:37 pm, mdipierro wrote: > Something is wrong with this: > > db.define_table('dogs', >     ... >     Field('vaccination_id', db

[web2py:32701] crud forms for multiple records? Multiple tables?

2009-10-11 Thread Peter Woolf
‘dogs” and ‘vaccinations’ with one submit button. Any thoughts on how to do this? I can easily make a crud form for a single record, but this would mean I have many submit buttons on a page or a very long series of pages to do something simpler. Any thoughts would be appreciated. Thanks, --Pete

[web2py:32506] Re: problem with crud custom forms

2009-10-08 Thread Peter Woolf
That works! Thanks! --Peter On Oct 8, 12:17 pm, Thadeus Burgess wrote: > You can set those in your controller dynamically. > > for example > > def admin_edit(): >       db.tablename.fieldname.writable = True >       db.tablename.fieldname.readable = True > >

[web2py:32498] Re: problem with crud custom forms

2009-10-08 Thread Peter Woolf
This could work, but this solution is more permanent than I want. I'd like to make it so that I could dynamically select the fields I want to edit. I know I can do it with SQLform but without all of the nice features that crud provides. Other thoughts? thanks! --Peter On Oct 8, 11:

[web2py:31559] Re: Almost working on the dreamhost server... $50 to the person that can make this a script!

2009-09-23 Thread Peter Woolf
if line=='INTERP = "/home/'+user+'/bin/python2.5"': found=1 if found==1: print "wsgihandler.py already modified" else: for l in range(len(ws)): if ws[l]=="#!/usr/bin/env python": ws[l]

[web2py:31552] Re: Almost working on the dreamhost server... $50 to the person that can make this a script!

2009-09-23 Thread Peter Woolf
below. If anyone can build on this to allow access to the admin window it would be most appreciated! --Peter code for web2py.install.py -- subdomain="yourDomaiNname.com" ## <--CHANGE THIS user="yourUserID" ## <-- CHANGE THIs

[web2py:25433] Re: Readable/writable fields and crud.read / SQLFORM readonly

2009-07-01 Thread Peter
Tested on trunk (r1090), works OK now. Thanks! -P On Jul 1, 5:03 pm, mdipierro wrote: > I think this is now fixed in trunkk, but give it a try. > > On Jul 1, 9:08 am, Peter wrote: > > > > but not show it in crud.read and SQLTABLEs > > > Exactly, that is what I w

[web2py:25411] Re: Readable/writable fields and crud.read / SQLFORM readonly

2009-07-01 Thread Peter
ou can want to edit/update > the field but not show it in crud.read and SQLTABLEs > > On Jul 1, 8:04 am, Peter wrote: > > > Given this controller: > > def vread(): > >     db.auth_user.something.readable=False > >     db.auth_user.something.writable=True >

[web2py:25402] Readable/writable fields and crud.read / SQLFORM readonly

2009-07-01 Thread Peter
well the field does disappear from the crud.read output. Problem (if it is that) seems to be in the underlying SQLFORM(..., readonly=True). Is this behavior correct, or have I misunderstood the semantics for readable/writable... ;-) This is using the 1.64.4 release. Cheers, -Peter

[web2py:24447] Re: how to get validator details for a field?

2009-06-18 Thread Peter Etchells
;integer': >     if isinstance(field.requires[0],validator.IS_INT_IN_RANGE): >        minimum = field.requires[0].minimum >        maximum = field.requires[0].maximum > > On Jun 18, 2:16 am, Peter Etchells wrote: > > > Hi web2pyzeans > > I want to be able to a

[web2py:24411] how to get validator details for a field?

2009-06-18 Thread Peter Etchells
Hi web2pyzeans I want to be able to access the type and parameters of validators for a given field. How would I do something like: myfield=db['mytable'][field] if field.type=='integer': if field.requires[0] == validator.IS_INT_IN_RANGE: min = the min arg of the IS_INT_IN_RANGE validator for

[web2py:23865] Re: problem with selfreference left outer join

2009-06-10 Thread Peter Etchells
Thanks, that worked! On Jun 10, 2:12 am, mdipierro wrote: --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe fr

[web2py:23661] Re: problem with selfreference left outer join

2009-06-09 Thread Peter Etchells
prints: SELECT dog.name, dog.name, dog.name FROM LEFT JOIN dog ON dog.id=dog.father_id LEFT JOIN dog ON dog.id=dog.mother_id; --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to t

[web2py:23646] problem with selfreference left outer join

2009-06-08 Thread Peter Etchells
When trying the example in the new slide show: ...db = SQLDB('sqlite://storage.sqlite') db.define_table('dog', SQLField('name'), SQLField('father_id','reference dog'), SQLField('mother_id','reference dog')) .. data: 5 selected dog.id dog.namedog.father_id dog.mother_id 1

[web2py:22855] Another page selector /page navigator

2009-05-28 Thread Peter Etchells
Try this page selector/paginator for web2py. Built as a function that can be called from web2py views. Also optionally shows percentages. Feedback welcomed. --~--~-~--~~~---~--~~ You received this message b

[web2py:22853] another page selector /page navigator

2009-05-28 Thread Peter Etchells
Try this simple page selector for web2py --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send

[web2py:19343] Re: display two different links for the same field

2009-04-06 Thread Peter Etchells
Thanks, Massimo I will proceed on the basis that the above method is the best to achieve that. I am enjoying working with web2py - it is the best out of those that I have tried for getting meaningful apps up and running quickly. Regards, PE --~--~-~--~~~---~--~~

[web2py:19323] display two different links for the same field

2009-04-06 Thread Peter Etchells
I am trying to display a field twice in the same row, with two different links, along the lines of View per row: id(with href to function1)...sameid(with href to function2)...more fields from same row I can't see how to duplicate the id in the controller at the select, for example with db(qu

[web2py:18195] Idea: Application of the Week / Month

2009-03-17 Thread Peter L
h mythtv and/or freevo. What do you say? Possible or a far off day dream? Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegro

[web2py:16086] Re: new puppy example please?

2009-02-09 Thread Peter
olute) link to the verify_email function, currently not easily provided by web2py -- that is what this is about. Cheers, -Peter On Feb 9, 5:07 pm, Wes James wrote: > As mentioned before it is so the developer can put in their own messge. > > -wj > > On Mon, Feb 9, 2009 at 9

[web2py:16083] Re: new puppy example please?

2009-02-09 Thread Peter
h nah nah nah nah" or 2. Fix it, since it is trivial enough. ;-) Maybe this is my chance to contribute: please put my suggestion to Chris in the "official web2py documentation", by way of implementing option 1. ;-)) Cheers, -Peter On Feb 9, 5:07 pm, Wes James wrote: > As ment

[web2py:16079] Re: new puppy example please?

2009-02-09 Thread Peter
be something like auth.messages.verify_email = \ 'Click on the link: %(validate_url)s/%(key)s to verify your email' I would be happy to suggest a patch, but I don't want to sneak in a fullurl() helper... ;-) Cheers, -Peter On Feb 9, 3:56 pm, Peter wrote: > Hi Chris,

[web2py:16071] Re: new puppy example please?

2009-02-09 Thread Peter
for that user. If you run into any problems, please post. I'm in Amsterdam GMT+1 so timewise that's closer than you may think. ;-) Cheers, -Peter On Feb 9, 2:59 pm, murray3 wrote: > Peter, > thanks for this I will have a go later (I'm in Dublin GMT), just one > thing

[web2py:16060] Re: new puppy example please?

2009-02-08 Thread Peter
T2" needs to be redone, I have more interest in documenting and expanding what is now in tools.py than what was left out of it. ;-) Cheers, -Peter On Feb 9, 12:47 am, mdipierro wrote: > Peter, > > if you and some others (Fran? Ceej?) want to take over T2 and move it > on top of t

[web2py:16041] Re: new puppy example please?

2009-02-08 Thread Peter
, linkto=URL(r=request,f='data',args= ['read'])) return dict(form=form, items=items) (Note: the T2 requires_login had the option of specifying a 'next' function which was passed in the vars._destination... This is missing in tools for now, AFAICT) --- I don&#x

[web2py:16040] Re: MySQL and 1.56.1: 'no such record' error

2009-02-08 Thread Peter
] =='': form.errors[f]='error' > >   form=SQLFORM(db.t2_person,pers,fields=fields) > >   if form.accepts(request.vars, session, onvalidation=lambda > form,fields=fields: > myvalidator(form,fields)): >     redirect(URL(r=request,f='index')) > >  

[web2py:16028] Re: MySQL and 1.56.1: 'no such record' error

2009-02-08 Thread Peter
7; list that has ALL fields in the table, instead of the fields array that I passed to SQLFORM -- which I think is how it should be. Note that this is *not* mysql-related, it also occurs with sqlite. Cheers, -Peter # default.py def valtest(): pers = db(db.t2_person.id==t2.person_id).select(

[web2py:16021] Re: MySQL and 1.56.1: 'no such record' error

2009-02-08 Thread Peter
the fields array as passed to SQLFORM, and in 1.56 it includes all fields in the database table? Is that possible? At any rate, I can repair this by explicitly specifying the fields to be validated in the validator function. Cheers, -Peter On Feb 8, 6:39 pm, mdipierro wrote: > I think th

[web2py:16019] Re: MySQL and 1.56.1: 'no such record' error

2009-02-08 Thread Peter
Hi Massimo, The printed values are " '9' 9L " in both cases. Your first suggestion is ineffective, but the second one solves this problem: self.table._db(self.table.id==self.record.id).update(**fields) I have another issue that seems to be mysql related, I'll post

[web2py:16015] MySQL and 1.56.1: 'no such record' error

2009-02-08 Thread Peter
the old t2 module I still use? Cheers, -Peter # default.py: def testmysql(): pers = db(db.t2_person.id==t2.person_id).select()[0] form = SQLFORM(db.t2_person,pers) if form.accepts(request.vars,session): redirect(URL(r=request,f='index')) return dict(form=f

[web2py:16003] web2py documentation site: http://www.99babysteps.com/how/base/index

2009-02-07 Thread Peter Etchells
http://www.99babysteps.com/how/base/index This is my first attempt at a web2py app, & contains some web2py documentation - a work in progress. Currently not taking registrations or allowing comments. Any constructive comments welcome. regards, Peter Etch

[web2py:15878] Re: new web site?

2009-02-04 Thread Peter
ation, it's all there. If you do decide to try Mediawiki, be sure to also copy the CSS over from the WP codex. ;-) Cheers, -Peter On Feb 4, 8:35 pm, mdipierro wrote: > oops. Thank you > > On Feb 4, 12:57 pm, Douglas Andrade wrote: > > > Hi Massimo, > &g

[web2py:15295] Re: future of T2 is *almost* here

2009-01-22 Thread Peter
s as well. I'd be happy to contribute where I can -- within the limitations that come with my "occasional" status. Hope this helps, Cheers, -Peter On Jan 21, 10:46 am, mdipierro wrote: > yes but only so that you can test them and provide feedback. I hope to > finalize the AP

[web2py:15117] Re: Custom forms again

2009-01-19 Thread Peter
ue=T > ('<     submit_tr[1].append( INPUT( _type='submit', _value=T('Next>>') ) ) > > Looks a lot better, doesn't it? :-)  This way, I can really "go to > town" on the html as generated by SQLFORM. > Thanks again! > -Peter > &g

[web2py:15116] Re: Custom forms again

2009-01-19 Thread Peter
27;submit_record__row') # get rid of the submit button and append two new INPUTs in its place del(submit_tr[1][0]) submit_tr[1].append( INPUT( _type='button', _value=T ('<>') ) ) Looks a lot better, doesn't it? :-) This way, I can really "go to

[web2py:15104] Re: Custom forms again

2009-01-18 Thread Peter
send you a patch for html.py, but I'm afraid I am lacking both in experience and in time... ;-) Cheers, -Peter On Jan 19, 3:34 am, mdipierro wrote: > At this time using [i], .element, .append and .insert are the only > methods to manipulate the form. Can you provide an example of t

[web2py:15090] Custom forms again

2009-01-18 Thread Peter
Hi Massimo et al, First of all, the onvalidation callback that is now in SQLFORM (in trunk) is a real winner, thanks! The validation rules in my app are largely context-sensitive, and that was a big problem -- until now. I am still struggling to find the best way to customize SQLFORM views, thou

[web2py:14263] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-29 Thread Peter
t should have but instead it starts afresh with , ie, the top table row. I can send you both html outputs if you like. Cheers, -Peter On Dec 29, 3:21 pm, mdipierro wrote: > 1) I am sorry. I do not understand without a code example. > > 2) not possible. I agree there should be

[web2py:14259] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-29 Thread Peter
When do you expect this functionality to appear in a production release? If that is within a week or two, I can use trunk for my current project... Cheers & thanks for a great tool, -Peter On Dec 29, 3:21 pm, mdipierro wrote: > 1) I am sorry. I do not understand without a code example. &

[web2py:14237] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-29 Thread Peter
way is to manipulate the components[..] stuff -- eg, through the new elements interface? Cheers again... -Peter On Dec 29, 7:10 am, mdipierro wrote: > define a widget, something like: > > def myhelper(field,value): >     field_id='%s_%s' % (field._tablename,field.name) &g

[web2py:14223] Re: Inline images in SQLFORM, general SQLFORM API...

2008-12-28 Thread Peter
t you need. Maybe I should give it another shot. Care to share some T2 secrets? ;-) Cheers, -Peter On Dec 29, 12:14 am, Fran wrote: > On Dec 28, 9:42 pm, Peter wrote: > > > BTW, I would really appreciate a more formal API for SQLFORM that is > > more geared towards using it pi

[web2py:14220] Inline images in SQLFORM, general SQLFORM API...

2008-12-28 Thread Peter
able to get going quickly with SQLFORM and T2 CRUD, but so far, it's been a bit of an uphill battle, I'm afraid... All the more frustrating because I think it's very very close to what I need. Cheers, -Peter --~--~-~--~~~---~--~~ You received this message

[web2py:14210] Re: Proposal: MVC separation - son of custom views

2008-12-28 Thread Peter
Check -- that did the trick. I didn't know that specifying the fields in the SQLFORM had this effect on the scope of the update. You live and learn... Thanks for the support! -Peter On Dec 28, 7:48 pm, mdipierro wrote: > I see. You need > >     form=SQLFORM(db.t2_perso

[web2py:14204] Re: Proposal: MVC separation - son of custom views

2008-12-28 Thread Peter
t (no flash message, no update in db). << Cheers, -Peter On Dec 28, 6:50 pm, Peter wrote: > Massimo, thanks for the incredibly fast turnaround -- on a Sunday > even. ;-) > > I've done some more experimenting. This works beautifully on my > PRODUCT table. I do have to

[web2py:14202] Re: Proposal: MVC separation - son of custom views

2008-12-28 Thread Peter
UT I keep having the same problem as described above with my T2_PERSON extended table. Adding the name="id" field makes no difference. If you have any further ideas, please let me know... Somehow related to T2?? Cheers, -Peter In db.py: db.define_table('t2_person', SQ

[web2py:14189] Re: Proposal: MVC separation - son of custom views

2008-12-28 Thread Peter
em: nothing happens if I click submit (no flash message, no update in db). Among much else, I've tried: - adding "action" and "method' attributes to form; - form.accept with "formname=None" instead of session; - form.accept without any second argument -- no luck with

[web2py:14093] Re: IMPORTANT: Bill's patch

2008-12-23 Thread Peter
Sorry, please ignore. It seems I missed the new thread on this: http://groups.google.com/group/web2py/browse_thread/thread/4cd0a75de54f32aa/2c20dbcbd9d8aa9d?lnk=gst&q=custom+forms#2c20dbcbd9d8aa9d Cheers, -P On Dec 23, 10:55 pm, Peter wrote: > This looks like what I need:customformswith

[web2py:14091] Re: IMPORTANT: Bill's patch

2008-12-23 Thread Peter
This looks like what I need: custom forms with fields that can tie into model and database, including validation,etc. But this modified version of "Bill's patch" hasn't yet made it into production yet (1.54), is that correct? -Peter On Nov 10, 8:01 am, mdipierro wrote: >

[web2py:13585] Re: Editing T2 -- caching problems?

2008-12-15 Thread Peter
OK, thanks! Most Python/web stuff I have experience with doesn't have such long-running processes-- which, in a way, I guess is to web2py's credit. ;-) Anyway, now that I know I can learn to live with it. Cheers, -Peter On Dec 15, 8:29 pm, mdipierro wrote: > Hi Peter, > >

[web2py:13572] Re: Editing T2 -- caching problems?

2008-12-15 Thread Peter
he startup/shutdown process... Cheers, -Peter On Dec 15, 3:29 pm, Peter wrote: > Yarko, thanks.  I'm doing this "only" for the registration/auth/authZ > functions in T2. > As such, I don't have strong preferences where the code is > located. ;-) > > I instant

[web2py:13571] Re: Editing T2 -- caching problems?

2008-12-15 Thread Peter
rror handling); - if so, completely stop and restart web2py after each edit; - in order for email reg to work, T2 assumes a working SMTP server on localhost:25 Cheers, -Peter On Dec 15, 12:57 am, "Yarko Tymciurak" wrote: > Hi Peter - > IF you are doing this for T3, then you s

[web2py:13552] Editing T2 -- caching problems?

2008-12-14 Thread Peter
l get the original flash message... which might explain why the log.infos that I put in also come up empty. Thanks in advance, -Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" gr

[web2py:13235] Re: User management and registration

2008-12-09 Thread Peter
So...I've just finished watching the T2 video on Vimeo. It will take me a few days to digest this, but... wow! I'm going to try and re-write my Django app in web2py, see how far I can get... Thank you! -Peter On Dec 7, 7:42 pm, mdipierro <[EMAIL PROTECTED]> wrote: > http:/

[web2py:13097] User management and registration

2008-12-07 Thread Peter
" sounds promising but seems to be a work-in-progress at the moment. If anyone here have example code or advice, I'd be very grateful. Cheers, -Peter --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups &qu

[web2py:12575] Re: web2py book in PDF at $12.50

2008-11-27 Thread Peter L
Thanks for providing the PDF book to such a nice price. However I'm missing a content navigation panel. I guess it's not due to my readers as I have tried a couple. Will you add that in a future revision? Peter On Nov 19, 2:45 am, mdipierro <[EMAIL PROTECTED]> wrote: >

<    1   2   3   4   5