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',
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
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('%'+
,
--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 form.accepts(request.vars, session):
redirect(URL(r=request,f='test_boolean_forms
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,
--Peter
--~--~-~--~~~---~--~~
You received this message because
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 mdipie...@cs.depaul.edu wrote:
Something is wrong with this:
db.define_table('dogs',
...
Field('vaccination_id', db.vaccinations
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:30 am
That works! Thanks!
--Peter
On Oct 8, 12:17 pm, Thadeus Burgess thade...@thadeusb.com wrote:
You can set those in your controller dynamically.
for example
def admin_edit():
db.tablename.fieldname.writable = True
db.tablename.fieldname.readable = True
return dict(form
is 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
# should be something like web2py.mydomain.com
, *sys.argv)'
f=open(subdomain+/wsgihandler.py,w)
f.write(\n.join(ws))
f.close()
os.system(python2.5 +subdomain+/web2py.py)
--
On Sep 23, 3:19 pm, Peter Woolf pwo...@gmail.com wrote:
After too much frustration, I made a simple script for installation
* to False as 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
. It maens you can want to edit/update
the field but not show it in crud.read and SQLTABLEs
On Jul 1, 8:04 am, Peter peter.kleyn...@gmail.com wrote:
Given this controller:
def vread():
db.auth_user.something.readable=False
db.auth_user.something.writable=True
return dict
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
Thanks, that worked!
On Jun 10, 2:12 am, mdipierro mdipie...@cs.depaul.edu 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
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
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
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
Try this page selector/paginator for
web2pyhttp://99babysteps.appspot.com/how2/default/article_read/2.
Built as a function that can be called from web2py views. Also optionally
shows percentages.
Feedback welcomed.
--~--~-~--~~~---~--~~
You received this message
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
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
--~--~-~--~~~---~--~~
then 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 peter.kleyn...@gmail.com wrote:
Hi
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 compte...@gmail.com wrote:
As mentioned before it is so the developer
) 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 compte...@gmail.com wrote:
As mentioned before it is so the developer can put in their own messge.
-wj
On Mon, Feb 9, 2009 at 9:04 AM, Peter
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=form)
# db.py:
db.define_table('t2_person
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 this
separately.
-Peter
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 mdipie...@cs.depaul.edu wrote:
I think the problem
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()[0]
fields =
['name','email
, onvalidation=lambda
form,fields=fields:
myvalidator(form,fields)):
redirect(URL(r=request,f='index'))
return dict(form=form,p=p)
On Feb 8, 1:14 pm, Peter peter.kleyn...@gmail.com wrote:
My assumption is that an onvalidation callback has access to the
'fields' list as a local
I'll
leave this to someone else.
For myself, the next stop is subclassing Auth... one reason being to
adapt email registration.
Cheers,
-Peter
On Feb 8, 6:04 pm, murray3 ch...@murraypost.net wrote:
Massimo,
having trouble getting email registration to work on localhost with
the T2 Puppies app
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 mdipie...@cs.depaul.edu wrote:
Peter,
if you and some others (Fran? Ceej?) want to take over T2 and move it
on top of tools.py please go ahead.
the source
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 Etchells
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 mdipie...@cs.depaul.edu wrote:
oops. Thank you
On Feb 4, 12:57 pm, Douglas Andrade dsandr...@gmail.com wrote:
Hi Massimo,
It is set in these files:
grep
it? :-) This way, I can really go to
town on the html as generated by SQLFORM.
Thanks again!
-Peter
On Jan 19, 11:02 am, mdipierro mdipie...@cs.depaul.edu wrote:
I think what is provided is not much different than what you asking
a=DIV()
a.append(H1())
a.append(H2())
a[0].append('hello
='+URL(r=request,f='step1')+';) )
Sorry for that, folks.
-P
On Jan 19, 4:21 pm, Peter peter.kleyn...@gmail.com wrote:
Okay Massimo, that's exactly the clarity I'm looking for! I couldn't
really find it in the docs, but if I can use this as a more or less
official API, I'm happy. For one thing, I
(). This works, but the direct use of the
internal form/div structure to insert a new xml node is an eyesore. Is
there a better way to do this?
Ideally, I'd be looking for a sort of formalized API that I could use
to manipulate the entire xml tree of the form, eg, similar to the
DOM.
Cheers,
-Peter
afraid I am lacking both in experience and
in time... ;-)
Cheers,
-Peter
On Jan 19, 3:34 am, mdipierro mdipie...@cs.depaul.edu wrote:
At this time using [i], .element, .append and .insert are the only
methods to manipulate the form. Can you provide an example of the API
you would like to have
[..] stuff -- eg, through the new
elements interface?
Cheers again...
-Peter
On Dec 29, 7:10 am, mdipierro mdipie...@cs.depaul.edu wrote:
define a widget, something like:
def myhelper(field,value):
field_id='%s_%s' % (field._tablename,field.name)
inp=INPUT(_type='file',_id=field_id,_class
,
-Peter
On Dec 29, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote:
1) I am sorry. I do not understand without a code example.
2) not possible. I agree there should be a way to do it.
Using the latest trunk you can do
form.element(_type='submit').update(_value='click me!')
Massimo
On Dec
=modified_on... but instead it starts afresh with tr
id=t2_person_name_row, ie, the top table row. I can send you both
html outputs if you like.
Cheers,
-Peter
On Dec 29, 3:21 pm, mdipierro mdipie...@cs.depaul.edu wrote:
1) I am sorry. I do not understand without a code example.
2) not possible. I
with formname=None instead of session;
- form.accept without any second argument
-- no luck with any of them.
What am I doing wrong??
Cheers,
-Peter
On Nov 10, 9:15 pm, mdipierro mdipie...@cs.depaul.edu wrote:
You can havecustomforms. You always could. Since version 1.48
(posted today) it is even easier
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',
SQLField('name',length=40,requires=IS_NOT_EMPTY
message, no
update in db).
Cheers,
-Peter
On Dec 28, 6:50 pm, Peter peter.kleyn...@gmail.com 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 add the name=id
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 mdipie...@cs.depaul.edu wrote:
I see. You need
form=SQLFORM(db.t2_person
need. Maybe I should give it another shot. Care to share
some T2 secrets? ;-)
Cheers,
-Peter
On Dec 29, 12:14 am, Fran francisb...@googlemail.com wrote:
On Dec 28, 9:42 pm, Peter peter.kleyn...@gmail.com wrote:
BTW, I would really appreciate a more formal API for SQLFORM that is
more geared
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 mdipie...@cs.depaul.edu wrote
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 yark...@gmail.com wrote:
Hi Peter -
IF you are doing this for T3, then you should look at the include in
applications/t2/models/db.py ---
plugins_t2
/shutdown process...
Cheers,
-Peter
On Dec 15, 3:29 pm, Peter peter.kleyn...@gmail.com 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 instantiate a t2 object at the bottom
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 mdipie...@cs.depaul.edu wrote:
Hi Peter
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 group.
To post to this group, send email to web2py@googlegroups.com
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://mdp.cti.depaul.edu
401 - 450 of 450 matches
Mail list logo