Thank you for your reply,
On 25 abr, 18:09, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
On a new database you should run at least once with migrate=True and
then you can set migrate=False and it should work.
I did it, and didn't work.
If you are getting the errors below I assume you
I upgraded to this version, then plugin_wiki is broken, it return an error
at menu.py sating that attribute str has not xml method.
Oscar.
With 1.95.1 is the same :(
I think now is working fine, and yes was affected by ec2 outage.
2011/4/25 luckysmack luckysm...@gmail.com
well seems their effected my an epic level ec2 outage. that sucks
cause ive been wanting to try them (or possibly kodingen.com as well).
Hope it's fixed soon.
On Apr 25, 3:10 pm,
Hello,
Is there a way to select concatenation of fields as :
select concat_ws( ' ', codes.prefix,codes.suffix,codes.name )as
name from codes
How can do this by db().select()??
Thanks in Advance
Why not move the 'promotion' field out of the 'inventory' table into a
new table? That way you don't have to store a promotion value for
every item. You might also then need to add a reference to the
promotion in the order. If that all makes sense.
On Apr 24, 7:44 pm, JoshC
I turn everything into modules, so I use local_import() ALOT. If I have a
local import that looks like this:
DEBUG = True
my_module = local_import('my_module', reload=DEBUG)
How would I write that with the new importer?
http://code.google.com/p/web2py/issues/detail?id=248
Than the safe way is:
1) delete database
2) recreate database (empty, no tables)
3 use
DAL('mysql://...') # the default with no arguments like
migrate_enabled=True, fake_migrate_enabled=True
On Apr 26, 1:03 am, Oscar oscar.m...@gmail.com wrote:
Thank you for your reply,
On 25 abr, 18:09,
In you menu you have...
URL(...).xml() but should be URL(...) without .xml().
On Apr 26, 1:18 am, Oscar oscar.m...@gmail.com wrote:
I upgraded to this version, then plugin_wiki is broken, it return an error
at menu.py sating that attribute str has not xml method.
Oscar.
You cannot. You can use a virtual field.
On Apr 26, 5:12 am, Neveen Adel nevo.a...@gmail.com wrote:
Hello,
Is there a way to select concatenation of fields as :
select concat_ws( ' ', codes.prefix,codes.suffix,codes.name )as
name from codes
How can do this by db().select()??
The price changes with time. You need to store how much each user paid
for the item at the time of sale. It is not just for promotions.
On Apr 26, 6:43 am, Stodge sto...@gmail.com wrote:
Why not move the 'promotion' field out of the 'inventory' table into a
new table? That way you don't have to
import my_module # not right now always assumes reload=False (I
think).
On Apr 26, 7:07 am, Ross Peoples ross.peop...@gmail.com wrote:
I turn everything into modules, so I use local_import() ALOT. If I have a
local import that looks like this:
DEBUG = True
my_module =
And how do I update the structure of the database in production? I can not
delete it andcreate again.
_
*Gilson Filho*
*Web Developer
http://gilsondev.com*
2011/4/26 Massimo Di Pierro massimo.dipie...@gmail.com
Than the safe way is:
1) delete
I just assumed these were being served statically. It didn't hit me
that they were run from a controller. To those reading, I was not
able to reproduce Philip's issue on my machine. Perhaps someone who
has a similar setup as him could test it.
On Apr 25, 10:53 am, pbreit
The web2py has been a tool that is improving and evolving over time, and who
uses itknows it. Only for people to learn these new features or fixes to
existing becomes moredifficult when there is no consistent documentation. As
far as I know, Massimo web2pywhich updates the book, but with so many
Oh...that setup is:
Mac OS X.6.7
web2py 1.94.6
Server: Rocket 1.2.2 Python/2.5.1
Contact Philip, if you have something similar and are willing to test.
On Apr 26, 7:39 am, Timothy Farrell explori...@gmail.com wrote:
I just assumed these were being served statically. It didn't hit me
that
yeah, i think just like on crm application, the promotion known as campaign
on crm is separate with inventory table. just a little suggestion to move
out field status on orders table and field type on inventory table into the
new tables. i think users and admin is more convinience when they are
good idea
On Tue, Apr 26, 2011 at 7:39 PM, Gilson Filho cont...@gilsondev.com wrote:
The web2py has been a tool that is improving and evolving over time, and
who uses itknows it. Only for people to learn these new features or fixes to
existing becomes moredifficult when there is no consistent
I'd like to propose a (very) little feature request:
method store under class Field in dal.py can be modified as follows
where line 3 and 4 are new in order to define the upload folder even in
case you define a custom_store through the uploadfolder property of
the Field... do you agree it
Dear all,
We certainly can do this
count = db.person.field.count()
for row in db(db.person.field==db.dog.owner).select(db.person.name, count,
groupby=db.person.field):
print row.person.name, row[count]
but what if we have a person.field of type list:string. I know the field has
a 'contains'
Why happened it?
Did you changed some thing in the last update?
Thank you,
Oscar.
On 26 abr, 08:25, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
In you menu you have...
URL(...).xml() but should be URL(...) without .xml().
On Apr 26, 1:18 am, Oscar oscar.m...@gmail.com wrote:
That solved the issue :-)
I removed .xml from every URL object in that line.
Oscar.
On 26 abr, 08:25, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
In you menu you have...
URL(...).xml() but should be URL(...) without .xml().
On Apr 26, 1:18 am, Oscar oscar.m...@gmail.com wrote:
On Tuesday, April 26, 2011 9:05:49 AM UTC-4, Oscar wrote:
Why happened it?
Did you changed some thing in the last update?
Back in September, URL was changed to return an XML object, giving it an
xml() method (see
On 26 avr, 08:28, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
import my_module # not right now always assumes reload=False (I
think).
Yes, assume reload is False. This is the normal behavior for Python.
So the code can be:
if my_module in dir() and DEBUG:
I can get stuff done using web2py, but sometimes I have a little
trouble understanding exactly when controller code is called in
certain cases. For self-submitting forms, I'm not sure I quite get
it.
My current understanding is that the controller function is called
twice. Once for generating the
Oups, reload does not take a string but a module object so forget the
quotes.
It would be difficult to change the behavior of reload.
Is reload(my_module) working? I didn't try.
On 26 avr, 10:04, pierreth pierre.thibau...@gmail.com wrote:
On 26 avr, 08:28, Massimo Di Pierro
On Apr 26, 2011, at 5:07 AM, Ross Peoples wrote:
I turn everything into modules, so I use local_import() ALOT. If I have a
local import that looks like this:
DEBUG = True
my_module = local_import('my_module', reload=DEBUG)
How would I write that with the new importer?
You can of course
On Apr 26, 2011, at 7:13 AM, pierreth wrote:
Oups, reload does not take a string but a module object so forget the
quotes.
It would be difficult to change the behavior of reload.
Is reload(my_module) working? I didn't try.
It'd be worth testing. In fact, how about a unit test module for
On 26 avr, 10:04, pierreth pierre.thibau...@gmail.com wrote:
if my_module in dir() and DEBUG:
I made a test.
The 'in dir()' does not work because the variable is not there yet.
You can write:
import my_module
if DEBUG:
my_module = reload(my_module)
reload is working well.
As Jonathan
On 26 avr, 10:33, Jonathan Lundell jlund...@pobox.com wrote:
It'd be worth testing. In fact, how about a unit test module for both flavors
of import (local custom)?
It would have been a good idea to do so from the start but now that is
working it is a bit late. It is now tested by putting it
On Apr 26, 2011, at 7:41 AM, pierreth wrote:
On 26 avr, 10:33, Jonathan Lundell jlund...@pobox.com wrote:
It'd be worth testing. In fact, how about a unit test module for both
flavors of import (local custom)?
It would have been a good idea to do so from the start but now that is
hi! I was wondering how could I customize the html table that results
from a crud.search() query??
I mean, how could I send the query results to powerTable for example,
or datatables.
On 26 avr, 10:44, Jonathan Lundell jlund...@pobox.com wrote:
It's never too late for unit tests. Seriously.
Would you like to write them?
Yes. But I think the book might not be the appropriate place for
this. I am not sure but I think it might be better to start a wiki.
On Apr 26, 7:39 am, Gilson Filho cont...@gilsondev.com wrote:
The web2py has been a tool that is improving and evolving over time, and who
uses itknows it.
Thanks Massimo for ur reply
On Apr 26, 2:26 pm, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
You cannot. You can use a virtual field.
On Apr 26, 5:12 am, Neveen Adel nevo.a...@gmail.com wrote:
Hello,
Is there a way to select concatenation of fields as :
select
On Apr 26, 2011, at 7:59 AM, pierreth wrote:
On 26 avr, 10:44, Jonathan Lundell jlund...@pobox.com wrote:
It's never too late for unit tests. Seriously.
Would you like to write them?
I'd like to, but I don't know the code all that well. I'd be willing to help.
It applies for Postgre too?
Oscar.
On 26 abr, 08:23, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
Than the safe way is:
1) delete database
2) recreate database (empty, no tables)
3 use
DAL('mysql://...') # the default with no arguments like
migrate_enabled=True,
So,
If I don't use any argument at all, does Web2py set true as default?
Oscar.
On 26 abr, 08:23, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
Than the safe way is:
1) delete database
2) recreate database (empty, no tables)
3 use
DAL('mysql://...') # the default with no
On Apr 25, 5:09 pm, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
this case you must run with
DAL(,migrate_enabled=True, fake_migrate_enabled=True)
Does DAL(,migrate_enabled=False, fake_migrate_enabled=True) work
exactly the same as DAL(,migrate_enabled=True,
On Tuesday, April 26, 2011 10:12:57 AM UTC-4, jensk_dk wrote:
I can get stuff done using web2py, but sometimes I have a little
trouble understanding exactly when controller code is called in
certain cases. For self-submitting forms, I'm not sure I quite get
it.
My current understanding
I think the new router and MULTIUSER_MODE doesn't quite work together
nicely. Specifically, when a user creates a new app (through admin
interface). Sometimes, the new router does not route /app correctly.
It might have thought /app to be a controller of the main app.
On Apr 26, 10:18 am,
Hello,
Is there a way to export the data resulting in plugin_jqgrid? And
also how can i display a records with a specific criteria in a table
instead of displaying all records by default?
Thanks in Advance
On Tuesday, April 26, 2011 11:42:03 AM UTC-4, VP wrote:
On Apr 25, 5:09 pm, Massimo Di Pierro massimo@gmail.com
wrote:
this case you must run with
DAL(,migrate_enabled=True, fake_migrate_enabled=True)
Does DAL(,migrate_enabled=False, fake_migrate_enabled=True)
On Apr 26, 2011, at 8:47 AM, VP wrote:
I think the new router and MULTIUSER_MODE doesn't quite work together
nicely. Specifically, when a user creates a new app (through admin
interface). Sometimes, the new router does not route /app correctly.
It might have thought /app to be a controller
What I have issues with (perhaps wrongly) is the complication in
distinguishing migrate and fake_migrate. I'm not talking about where
it is used (in DAL(...) or in define_tables(...)).
I think there's a logical thing in terminology that might needs to
straighten up, whenever appropriate.
On
Will reloading apache have the same effect?
On Apr 26, 10:57 am, Jonathan Lundell jlund...@pobox.com wrote:
On Apr 26, 2011, at 8:47 AM, VP wrote:
I think the new router and MULTIUSER_MODE doesn't quite work together
nicely. Specifically, when a user creates a new app (through admin
On Apr 26, 2011, at 9:45 AM, VP wrote:
Will reloading apache have the same effect?
If doing so reloads web2py, yes. I believe that others have reported that it
works.
On Apr 26, 10:57 am, Jonathan Lundell jlund...@pobox.com wrote:
On Apr 26, 2011, at 8:47 AM, VP wrote:
I think the
I tried to use migrate_enabled but i having returned the following
error:
p4089
sS'key'
p4090
S'migrate_enabled'
p4091
sssS'traceback'
p4092
S'Traceback (most recent call last):\n File /home/dotcloud/current/
gluon/restricted.py, line 181, in restricted\nexec ccode in
environment\n File
You cannot count within a list:string
On Apr 26, 7:54 am, rāma ranjeev...@gmail.com wrote:
Dear all,
We certainly can do this
count = db.person.field.count()
for row in db(db.person.field==db.dog.owner).select(db.person.name, count,
groupby=db.person.field):
print row.person.name,
not the best way but you can get the rows out of the table.
form,table = crus.search()
if table:
table = SQLTABLE(table.sqlrows,)
On Apr 26, 9:45 am, Ialejandro ialejandr...@gmail.com wrote:
hi! I was wondering how could I customize the html table that results
from a crud.search()
On Tuesday, April 26, 2011 12:44:26 PM UTC-4, VP wrote:
What I have issues with (perhaps wrongly) is the complication in
distinguishing migrate and fake_migrate. I'm not talking about where
it is used (in DAL(...) or in define_tables(...)).
I think there's a logical thing in terminology
A new name might not be a bad idea both because fake_migrate isn't that
clear and it does sound hacky.
I've just rolled my database into production and have been struggling with
migrations so any extra clarity would really help.
It seems to me that something like rebuild metadata should be
Hello Ross,
I though it would be cool if web2py automatically reloads any modified
module in debug mode.
It is already the case for controllers, models and views. It seems to
be just the right thing to do regardless of the module.
I can implement this for a future version.
What do you think (I
I would suggest doing that in the controller.
def controller()
if auth.user.id:
return dict()
else:
redirect()
And I'm not really sure what you are trying to do with numquest.
Also, what you have coded looks similar to what happens if you decorate with
@auth.requires_login():
http://web2py.com/book/default/chapter/08#Decorators
Since I have not received any answers here is how to do it.
The problem is that to create the links as requested you need access
to the whole subheading record, and the internal processing of crud
and SQLTABLE only gives you access to the value of one of the fields
at a time.
So how can you get
I have a couple of INPUT class=date to search in a date range.
FORM action=search_results
input name=date1 /
input name=date2 /
input type=submit /
/FORM
I thought over a search code like this:
def search_results():
d1=request.vars.date1
d2=request.vars.date2
Reloading would be awesome, but making it optional would be the best choice,
as sometimes you want your modules to persist across requests for
performance reasons (so that modules don't get reloaded for every request in
a production environment).
On 26 avr, 15:31, Ross Peoples ross.peop...@gmail.com wrote:
Reloading would be awesome, but making it optional would be the best choice,
as sometimes you want your modules to persist across requests for
performance reasons (so that modules don't get reloaded for every request in
a production
I just came across this site: simpleauth.com, its a Janrain
alternative that allows for 3rd party authentication on websites, and
the best part of it is that its totally free.
P.S: I am in no way affiliated with SimpleAuth
Tell web2py that those fields are supposed to be dates and it'll take care
of the date format for you.
Here's a form I use for finding stats between two dates, should be easy
enough to modify for your purposes
form = FORM(TABLE(TR(TD(First Date:),
TD(
Hi to all,
do you know how to format a date/time to show as one hour ago and such?
I know i could be done with time delta, but it is any helper available in
web2py to do this?
thanks in advance
best regards
danto
from gluon.tools import prettydate
post_time = prettydate(post.published_on)
2011/4/26 danto web2py.n...@gmail.com
Hi to all,
do you know how to format a date/time to show as one hour ago and such?
I know i could be done with time delta, but it is any helper available in
web2py to do this?
i think that auto reload is very cool! it would be nice if the
OPTION_RELOAD would could allow DEBUG to function without the
auto_reload, simply because changes may impact in multiple places, so
sometimes getting the change (or the error) to persist all the way
through is helpful (at least I do
Documented here: http://web2py.com/book/default/chapter/12#Pretty-dates
On Tuesday, April 26, 2011 7:32:23 PM UTC-4, Martin.Mulone wrote:
from gluon.tools import prettydate
post_time = prettydate(post.published_on)
2011/4/26 danto web2p...@gmail.com
Hi to all,
do you know how to format
Hi,
is there a built-in helper (function) to do searches of all tables
(which may or may not return many results) ?
Hi,
is it expected for a text field to split the text on line breaks and
insert the '|' character? If yes, is there a way to change that
behavior?
Thanks,
Mart :)
oh thank you, I must be tired.
M-x rtfm
Can anyone tell me how to take the date from a db field with type date
and compare it with a system one? I need to be able to filter rows
with dates in the last week, month, or year.
Hi Mart,
not that I know of.
Besides, searching all tables sounds strange.
Can you provide a use case?.
On Apr 26, 8:13 pm, mart msenecal...@gmail.com wrote:
Hi,
is there a built-in helper (function) to do searches of all tables
(which may or may not return many results) ?
request.now contains your current date and time, so you could do:
import datetime
delta=datetime.timedelta(hours=1)
rows=db(db.table.field = request.now-delta).select()
You can also use:
delta=datetime.timedelta(minutes=30)
delta=datetime.timedelta(days=10)
delta=datetime.timedelta(weeks=3)
Scratch months;
only days, seconds, microseconds, milliseconds, minutes, hours, or
weeks.
Hi,
Is it possible to decentralize user tables (auth_user, auth_group,
auth_*) on other database ?
Thanks
I guess it'll be trunk [?] - from hg clone https://web2py.googlecode.com/hg/
On Apr 25, 10:28 pm, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
trunk or stable?
On Apr 25, 11:07 pm, Julio Schwarzbeck ju...@techfuel.net wrote:
hey Denes,
yeah like this:
the DB holds data describing infrastructure info (this is our build
releases web site DB) build specific info as well.
User go there to find build location, status, pull stats , etc and
also (and this is the problematic area) build detail. most of the
users
pardon me, is timedelta is used for show the differ between 2 date time?
like timediff
On Wed, Apr 27, 2011 at 8:14 AM, DenesL denes1...@yahoo.ca wrote:
Scratch months;
only days, seconds, microseconds, milliseconds, minutes, hours, or
weeks.
If you try to mix and match these two methods in your layouts:
i.e.
link rel=stylesheet type=text/css href=css/blablah.css/
and
{{response.files.append(URL('static','css/blahblah.css'))}}
I found out that some of my files i.e. CSS in this case where not
being imported and applied to the layout.
Also try the dateutil module from http://niemeyer.net/python-dateutil
examples:
NOW = datetime.now()
NOW+relativedelta(months=+1, weeks=+1)
datetime.datetime(2003, 10, 24, 20, 54, 47, 282310)
relativedelta(datetime(2003, 10, 24, 10, 0), TODAY)
relativedelta(months=+1, days=+7, hours=+10)
hi,
is it possible to store janrain api key on the static folder?
e.g.
from gluon.contrib.login_methods.rpx_account import RPXAccount
auth.settings.actions_disabled = ['register',
'change_password',
'request_reset_password']
On Tuesday, April 26, 2011 10:03:20 PM UTC-4, Pystar wrote:
If you try to mix and match these two methods in your layouts:
i.e.
link rel=stylesheet type=text/css href=css/blablah.css/
and
{{response.files.append(URL('static','css/blahblah.css'))}}
I found out that some of my files
This plugin may helps you (but I did not tested it yet)
web2py full text search plugin
http://web2pyslices.com/main/slices/take_slice/115
http://web2pyslices.com/main/slices/take_slice/115
--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
On Tue, Apr 26, 2011 at 10:43 PM, mart
Is there any advantage to the append approach? (besides being able to
trigger a load from somewhere else)
Needs to be absolute because it is used by Janrain.
a, i c, thank you so much for your info, pbreit. i've tried to use the
janrain log in from the wizard one, but i don't know how to configure it,
for the absolute path, it seems the login form is appears, but it can't be
access after i log in, is there any problem in my code? and, is there any
can you write an adapter? I will include it.
On Apr 26, 4:12 pm, Pystar aitoehi...@gmail.com wrote:
I just came across this site: simpleauth.com, its a Janrain
alternative that allows for 3rd party authentication on websites, and
the best part of it is that its totally free.
P.S: I am in no
No. Can you provide an example of code that make that happen?
On Apr 26, 7:17 pm, mart msenecal...@gmail.com wrote:
Hi,
is it expected for a text field to split the text on line breaks and
insert the '|' character? If yes, is there a way to change that
behavior?
Thanks,
Mart :)
yes as long as you do not have references to is but only 'integer'
fields
On Apr 26, 8:29 pm, Alexandre Strzelewicz
strzelewicz.alexan...@gmail.com wrote:
Hi,
Is it possible to decentralize user tables (auth_user, auth_group,
auth_*) on other database ?
Thanks
hi,
i've tried to implement what was wrote on the web2py book on chapter 8
bout openid auth:
from gluon.contrib.login_methods.openid_auth import OpenIDAuth
auth.settings.login_form = OpenIDAuth(auth)
no error occured, but i can't login, did anyone know how to implement
it?
thank you so much
Hi,
so, this part is done using DAL (scripted).
I use subprocess like below to run external scripts and stuff. when
failures, I want to dump the log in the DB.
proc = subprocess.Popen(strCmd,shell=True,
stdin=subprocess.PIPE,
woops! almost forgot, in the sqlite db, the log field will have
something like this:
|'', 'java.lang.NoClassDefFoundError: org/antlr/Tool\r|Caused by:
java.lang.ClassNotFoundException: org.antlr.Tool\r|\tat
java.net.URLClassLoader$1.run(Unknown Source)\r|\tat
Hi Bruno,
Thanks for the info! I will certainly give that try and post results!
You may have saved me from a high dose of nasty headaches! :)
Thanks
Mart :)
On Apr 26, 11:23 pm, Bruno Rocha rochacbr...@gmail.com wrote:
This plugin may helps you (but I did not tested it yet)
web2py full
92 matches
Mail list logo