Massimo,
I am using Postgres. In my application I have these tables:
db.define_table('provincie',
SQLField('provincie',label='Provincie *
',length=18,default='',notnull=True,unique=True),
migrate=False)
db.provincie.provincie.requires=[IS_LENGTH(18,error_message=T('length
exceeds 18')),
I don't think it is something you need to add to web2py. This is
really a workaround for sqlite because it doesn't respect the normal
keywords of ON DELETE RESTRICT or CASCADE. It's a simple enough work-
around that is added to the model file for sqlite but not the other
databases.
On Jun 10, 7
On Jun 11, 6:42 am, durga wrote:
> I am developing a website with web2py and sqllite. I am expecting no.
> of users of the site would increase to 50k. My question is would the
> sqllite in web2py support for 50k users or I need to migrate to
> mysql. The database would contain user information,
Hi,
I am developing a website with web2py and sqllite. I am expecting no.
of users of the site would increase to 50k. My question is would the
sqllite in web2py support for 50k users or I need to migrate to
mysql. The database would contain user information, messages and some
blogs.
thanks
durg
Nice,
>
can be done with
{{=form.custom.submit}}
and if you want to add the delete? checkbox
{{=form.custom.deletable}}
On Thu, Jun 11, 2009 at 7:12 AM, mdipierro wrote:
>
> done but it is now
>
> {{=form.custom.form.begin}}
> {{=form.custom.widget.field1}}
> {{=form.custom.widget.field2}}
>
On Thu, Jun 11, 2009 at 3:12 PM, mdipierro wrote:
>
> done but it is now
>
> {{=form.custom.form.begin}}
> {{=form.custom.widget.field1}}
> {{=form.custom.widget.field2}}
> {{=form.custom.widget.field3}}
>
> {{=form.custom.form.end}} includes hidden fields!
Fantastic! That's easy and intuitive a
I did not receive your patch but if you now do:
auth.settings.login.methods=[ldap_login(..)]
then it does not store password in db and always requres ldap auth.
If you do:
auth.settings.login.methods=[ldap_login(..), auth]
same as above but does store password in db.
if you do
auth.sett
done but it is now
{{=form.custom.form.begin}}
{{=form.custom.widget.field1}}
{{=form.custom.widget.field2}}
{{=form.custom.widget.field3}}
{{=form.custom.form.end}} includes hidden fields!
Massimo
On Jun 10, 11:27 pm, Hans Donner wrote:
> > You only need widgets
>
> >
> > {{=form.custom.wid
> You only need widgets
>
>
> {{=form.custom.widget.field1}}
> {{=form.custom.widget.field2}}
> {{=form.custom.widget.field3}}
>
> {{=form.hidden_fields()}}
>
better is to use {{=form.start}} in stead of , this will take
over any actions/methods etc that are used in the SQLFORM,
and for now {{
I just sent you another (very simple) patch that forces auth to use
the alternative login methods if present so, for example, LDAP will be
queried each time.
On Jun 9, 11:30 pm, mdipierro wrote:
> Thanks!
>
> On Jun 9, 11:03 pm, "mr.freeze" wrote:
>
>
>
> > Massimo, you should have a patch in e
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
Now I understand the problem better. No problem.
widget is always an input widget. Output widgets are called
"represent" and usually much simpler. This will do what you want:
db.location.town_id.represent=lambda id: SPAN(db.town[id].townname)
Massimo
On Jun 10, 9:28 pm, Gary wrote:
> Massimo
I understand. You do not want to use count then
db(...).select(...,limitby=(0,100))
will fetch the first 100 records.
Massimo
On Jun 10, 8:02 pm, "A. C. Censi" wrote:
> In Oracle you can use rowcount, for example, select * from table where
> rowcount<200
>
> In sql server I think you can set a
Got a little lost. Sorry. If you want me to implement this please
summarize the result and give an example of API and an example of the
SQL that should be generated.
Massimo
On Jun 10, 6:52 pm, Joe Barnhart wrote:
> Here it is:
>
> http://www.sqlite.org/cvstrac/wiki?p=ForeignKeyTriggers
>
> I
You are correct. I fixed it and I am uploading to trunk now (launchpad
904).
Massimo
On Jun 10, 5:52 pm, DJ wrote:
> Hello,
>
> I see a strange behavior when I try to validate a FORM. If there is a
> required field that is left empty Web2PY throws a "Cannot be empty"
> error message (good behav
Massimo,
I was so excited that the 'widget' worked that I failed to notice that
I have the same problem that I started with - except the code is much
cleaner. :-)
When the crud read is executed, the valued returned is the value in
the table. While this is fine for most fields, when the field i
Massimo,
Thank you. You mentioned before that widget worked in the trunk - you
are, of course correct, but I just wanted to make note to others that
it fails in the current version 1.63.5. Also, {{=form.custom.labels
[fieldname]}} did not work in the trunk. It failed with "TypeError:
'NoneType
In Oracle you can use rowcount, for example, select * from table where
rowcount<200
In sql server I think you can set a rowcount:
SET ROWCOUNT 100 (or whatever)
then do your query
SET ROWCOUNT 0 - sets it back to normal
In other I don't know.
A. C. Censi
On Wed, Jun 10, 2009 at 7:05 PM, mdipie
Here it is:
http://www.sqlite.org/cvstrac/wiki?p=ForeignKeyTriggers
I got this from carlo who mentioned it in this group earlier. His
post:
http://groups.google.com/group/web2py/browse_thread/thread/2f19933298d64478/302d7442d1bec4e1?lnk=gst&q=sqlite+trigger#302d7442d1bec4e1
On Jun 10, 2:04 pm
Hello,
I see a strange behavior when I try to validate a FORM. If there is a
required field that is left empty Web2PY throws a "Cannot be empty"
error message (good behavior). But along with this, the checkbox
fields in the form also get selected even though they were left
unchecked (unwanted act
I do not think that is possible but I may be wrong. If you teach how
to do it in SQL I will tell you how to translate in web2pyese.
Massimo
On Jun 10, 3:18 pm, Marcos Prieto wrote:
> Hi,
>
> I'm trying to do a query in which I use select() with count and
> groupby
>
> db().select(field1, field
I am planning to release 1.64 tomorrow if nothing comes up.
Massimo
On Jun 10, 4:32 pm, Philip Kilner wrote:
> Hi Massimo,
>
> 2009/6/10 mdipierro :
>
> > This is already fixed in trunk. Thanks for bringing it up.
>
> Any objection to my adding a note to the AlterEgo page to help until
> that m
Actually keepvalues=True only works and makes sense for create forms.
Massimo
On Jun 10, 3:55 pm, Fran wrote:
> On Jun 10, 7:48 pm, mdipierro wrote:
>
> > I do not think this is creating the problem. Crud is still redirecting
> > UNLESS you set crud.settings.keepvalues=True. If this what you a
On Jun 10, 3:49 pm, Gary wrote:
> Massimo,
>
> Thank you so much for your feedback. Most of the changes you
> suggested certainly made the code simpler and easier to read, but I
> have a couple of issues that I don't understand.
>
> 1) It appears that the line:
>
> getattr(crud,session.action)(d
If you run the code locally (whithout GAE) and click on [admin]/
[Languages]/[update languages] the string "Lazy subjects" will be
added to the the language files.
The problem may be that you need:
subject=str(T('Lazy subjects'))
Massimo
On Jun 10, 3:27 pm, Carl wrote:
> I am using web2py on
Hi,
I'm trying to do a query in which I use select() with count and
groupby
db().select(field1, field1.count(), groupby=field2)
but I'd like to be able to use the count column to limit the results,
adding a where clause to the SQL, something like "where count > x"
Is that possible? how?
Than
Massimo,
Sorry for the delay. Work had me unplugged for a while. Hilights --
* trigger() just there to pop the form.
* dwnld() I just took right out of your 'Rolling with...' document.
* The jQuery set is on the input field and is bound to a double
click.
* The call to dwnld() is hardcoded for s
Hi Massimo,
2009/6/10 mdipierro :
> This is already fixed in trunk. Thanks for bringing it up.
>
Any objection to my adding a note to the AlterEgo page to help until
that makes it into a release?
(Feels like a silly question - meaning that I think I should, unless
that release will be RSN - but
Sqlite does offer triggers, tho. Is it possible to rewrite the ON
DELETE...RESTRICT as a trigger and add it with pass-thru sql commands?
On Jun 9, 6:56 am, carlo wrote:
> Foreign key constraints are not implemented in Sqlite (although it
> parses the command).
>
> See:http://www.sqlite.org/omit
On Jun 10, 8:12 pm, mdipierro wrote:
> I posted the slides in Keynote format
> http://www.web2py.com/examples/static/cookbook2.key.zip
Works, but I don't have a Mac
> and PowerPoint format
> http://www.web2py.com/examples/static/cookbook2.ppt.zip
'Invalid request'
F
--~--~-~--~~--
On Jun 10, 7:48 pm, mdipierro wrote:
> I do not think this is creating the problem. Crud is still redirecting
> UNLESS you set crud.settings.keepvalues=True. If this what you are
> doing?
Yes, well done :)
Can this be made to just take effect on 'update' not 'create' forms?
(Didn't seem to work
Massimo,
Thank you so much for your feedback. Most of the changes you
suggested certainly made the code simpler and easier to read, but I
have a couple of issues that I don't understand.
1) It appears that the line:
getattr(crud,session.action)(db[tablename],record)
executes the crud call, bu
I am using web2py on GAE.
I am sending emails using GAE. I'd delimited the subject line with T
( ... ) and, you guessed it, GAE didn't like it at all.
How can I have the subject string translated *before* the call to
GAE's platform?
example code:
bSuccess = mail.send(to=to,subject=T('Lazy subj
I have this fancy little help from you guys... But I can't quite seem to
work with the data the way I like.
Basically, I want to display a list of all users that have similar tags
that I do. So I would get something like this:
Tag Name 1
-- Massimo
-- Jukka
-- Billy
Tag Name 2
-- Massimo
--
Why do you need to cache the logging module? Is this only for speed?
On Jun 10, 1:44 pm, Iceberg wrote:
> After changing from FileHandler to RotatingFileHandler, now I think
> the per-app log can be turned on by default (otherwise new comers
> won't notice this good feature).
>
> The only thing
How do you propose we include this in web2py? Should I just dump it in
contrib?
I have a feeling this should integrated with the logging function
recently proposed (for that what is logged is also sent to firebug).
What do you think?
Massimo
On Jun 10, 2:12 pm, sgtpep wrote:
> Newer version upl
I posted the slides in Keynote format
http://www.web2py.com/examples/static/cookbook2.key.zip
and PowerPoint format
http://www.web2py.com/examples/static/cookbook2.ppt.zip
Sould be nice if you could add slides about
- IS_IN_DB
- IS_NOT_IN_DB
- form.custom.widget
- CRON
Massimo
--~--~-
Newer version uploaded and accessible by the link above.
You can see screenshot of what you'll get:
http://www.picamatic.com/view/3948659_109510221650-My-Desktop/
What's added:
- skipping web2py debug messages (starts with "WEB2PY CRON")
- situations: you have a page with self-submitting form or
В сообщении от Wednesday 10 June 2009 22:45:02 mdipierro написал(а):
> Most of what you proposed is already in trunk (althought in s lightly
> different way). I added what was missing.
>
> Mind that it is not form.custom.widget.submit but form.custom.submit.
Ok, thank you.
Will have a look at the
Fran,
I do not think this is creating the problem. Crud is still redirecting
UNLESS you set crud.settings.keepvalues=True. If this what you are
doing?
Can you tell which lines causes the problem?
Massimo
On Jun 10, 1:41 pm, Fran wrote:
> On Jun 10, 12:17 am, mdipierro wrote:
>
> > Please try
Most of what you proposed is already in trunk (althought in s lightly
different way). I added what was missing.
Mind that it is not form.custom.widget.submit but form.custom.submit.
Massimo
On Jun 10, 11:10 am, Alexey Nezhdanov wrote:
> Ok.
>
> Basically I'd like you to:
> 1) apply 'inits2.dif
After changing from FileHandler to RotatingFileHandler, now I think
the per-app log can be turned on by default (otherwise new comers
won't notice this good feature).
The only thing I am still not sure is whether one can use logging and
its FileHander (or RotatingFileHander) on GAE's readonly fil
On Jun 10, 12:17 am, mdipierro wrote:
> Please try the version in trunk. No more request.env.referer.
This was r897 right?
This has caused problems for my app :/
I have pages which have a List at the top of the page (created by
crud.select) & underneath a create form (created by crud.create).
This is already fixed in trunk. Thanks for bringing it up.
Massimo
On Jun 10, 12:08 pm, Philip Kilner wrote:
> Hi Massimo,
>
> Apologies for the delay in following up.
>
> 2009/6/3 mdipierro :
>
> > If you start python from the web2py folder, can you do
> > import gluon.winservice?
> > If you s
Hi Massimo,
Apologies for the delay in following up.
2009/6/3 mdipierro :
> If you start python from the web2py folder, can you do
> import gluon.winservice?
> If you start python from the gluon folder can you do
> import winservice?
> Can you edit main and at the bottom insert
> print os.getcwd
Hi Hans,
2009/6/3 Hans Donner :
>
> see the docstring in gluon.Winservice
> it needs the win32 lib, to be installed seperately.
>
Yes - sorry, I should have mentioned that I have Mark Hammond's Win32
extensions installed.
--
Regards,
PhilK
Email: p...@xfr.co.uk
'a bell is a cup...until it
I was involved in the older thread and went ahead used the logging
module and haven't had any problems logging to file and to MySQL. I
did a bit more research and think it's thread safe. But I haven't had
many concurrent users so YMMV.
Chris
On Jun 9, 4:04 am, mdipierro wrote:
> I forgot. Thanks
Massimo,
I tried the version in trunk. Problem solved, thanks!
Kind regards,
Annet
--~--~-~--~~~---~--~~
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@googlegr
Before making this post ...
> I think it is a good idea to substitute the current calendar with a
> more straightforward one. I had a look at the dynarch site, the
> calender we use in web2py has been moved to the 'old stuff'
> section ...
I also had a look at the new dynarch calendar and read t
Ok.
Basically I'd like you to:
1) apply 'inits2.diff' - it optimises SQLTable.__init__ and SQLField.__init__
2) remove is_integer altogether and replace it everywhere with
str(id).isdigit()
3) apply custom_widget.diff. This one is not perfomance related so please
regard it as usual feature requ
Alexey,
I am lost with all the attachments. If there is something you want me
to include please send me by email one patch that applies to the
lastest trunk. I would not yet include lazy table evals just yet since
I need to think more about it. I think there may be an easier way of
doing but sinc
I ported bingapi to web2py:
http://www.reddit.com/r/programming/comments/8rdqz/use_bing_search_engine_from_web2py_try_it_here/
I changed it a bit so that it uses web2py's simplejson and web2py's
fetch, so that it runs on GAE too.
Not you can run on Google and search with Microsoft! Perverse, is
Add full web search capabilities to your app:
http://www.reddit.com/r/programming/comments/8rajk/python_wrapper_on_bing_api/
they quote "Django" but this works great with web2py out of the box.
Just copy "bingapi.py" into your app "modules" folder and import it.
The file consists of 64 lines of
yes. This is done in the admin interface, the htmledit.html view.
On Jun 10, 6:48 am, "http://voakujobi.blogspot.com";
wrote:
> That looks nice and easy to implement,but does anyone know if this
> works with JQuery, since they both hook the onload event, (I think),
> or is there a different meth
On Wednesday 10 June 2009 16:31:31 AchipA wrote:
> > > > So on my laptop try:except: function loses about 5% to regex -
> > > > probably it depends on hardware/OS.
> > >
> > > Interesting, which python/platform are you using ?
> >
> > Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
> > [GCC 4.2.3
> > > So on my laptop try:except: function loses about 5% to regex - probably
> > > it depends on hardware/OS.
>
> > Interesting, which python/platform are you using ?
>
> Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52)
> [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Hm, is it perhaps 32bit ? Th
That looks nice and easy to implement,but does anyone know if this
works with JQuery, since they both hook the onload event, (I think),
or is there a different method
Thanks in advance
Victor
On Jun 9, 5:46 pm, pk wrote:
> oh thanks, it`s a cool tool.
>
> peter
>
> On 9 Jun., 18:16, annet wro
On Wednesday 10 June 2009 12:40:44 AchipA wrote:
> On Jun 10, 7:01 am, Alexey Nezhdanov wrote:
> > I get these results (best timing):
> > try-variant: 10.24s
> > regex: 9.58s
> > So on my laptop try:except: function loses about 5% to regex - probably
> > it depends on hardware/OS.
>
> Interest
WOW Iceberg! That should also work well for me. Thanks for sharing
your solution idea! I'm going to try it later today.
And I agree the 'uncomment me if you need app-logging' approach in
combination with the per-application-log-file seems also to me the
best (backward compatible, flexible).
Since
Not quite, but has the same effect (hence the copy)
for every component processed, it 'adds' the child components to the
end of the processing que.
So it searches layer by layer
On Wed, Jun 10, 2009 at 10:29 AM, AchipA wrote:
>
> @massimo: thanks for the clarification, I just remember seeing
> c
On Jun 10, 7:01 am, Alexey Nezhdanov wrote:
> I get these results (best timing):
> try-variant: 10.24s
> regex: 9.58s
> So on my laptop try:except: function loses about 5% to regex - probably it
> depends on hardware/OS.
Interesting, which python/platform are you using ?
> And as Massimo po
@massimo: thanks for the clarification, I just remember seeing
copy.copy-s there which mislead me. But does it work recursively ?
@johnmc: I'm talking about server-side helpers, not browser-side html
elements
On Jun 10, 3:21 am, JohnMc wrote:
> If form --
>
> $('form').find('#whatever')
>
>
but can I manage warning messages for the user this way? I think could
be preferable something at model level
Marco
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this grou
63 matches
Mail list logo