I am using recaptcha using the following code (public and private keys not
shown):
auth.settings.register_captcha = Recaptcha(request, '',
'yy', use_ssl=False, error_message='please complete the reCaptcha')
I've registered with recaptcha.net and I not running this from a localho
rt logging
logging.basicConfig(filename='logging.log',level=logging.INFO)
logging.info('test')
#command used to run the above file
python web2py.py -M -N -S test -R applications/test/cron/log.py &
Thanks.
Avik Basu
cess with @auth.requires_login() or other auth
> recorator.
>
> On Sep 20, 6:48 pm, Avik Basu wrote:
>
>
>
> > I have a generic function called edit_db which allows for editing of
> > database records and is useful for ajax-related form functions such as
> > edit-in-plac
I have a generic function called edit_db which allows for editing of
database records and is useful for ajax-related form functions such as
edit-in-place. The URL that is exposed is something like
edit_db/tablename/row_id/fieldname?value="newvalue"
I would like to make sure that this function ca
I tried your suggestion and tracked the error to the following line
which was in my db.py:
from gluon.sqlhtml import *
I guess this import overrided the URL function. When I took it out,
everything works. Thanks so much for your patience and helping me get
through this issue so methodically! T
On Sep 18, 2010, at 1:24 PM, Avik Basu wrote:
>
>
>
>
>
>
>
> > I put this:
> > {{=URL.__name__}}
>
> > in the view of my index page and it showed
> > URL
>
> > (not _URL as you said)
>
> > Also, I don't know if its helpful to me
}}
in my index page, I get the same syntax error that I had in appadmin.
On Sep 18, 4:10 pm, Jonathan Lundell wrote:
> On Sep 18, 2010, at 12:52 PM, Avik Basu wrote:
>
>
>
> > Line 219 of gluon/compileapp.py is as you described it. I also deleted
> > the whole gluon direct
do i need to import logging?
On Sep 18, 4:10 pm, Jonathan Lundell wrote:
> On Sep 18, 2010, at 12:52 PM, Avik Basu wrote:
>
>
>
> > Line 219 of gluon/compileapp.py is as you described it. I also deleted
> > the whole gluon directory and downloaded the latest sou
following syntax error:
SyntaxError: URL: a=index c=None f=None r=None u=URL
On Sep 18, 3:33 pm, Jonathan Lundell wrote:
> On Sep 18, 2010, at 11:52 AM, Avik Basu wrote:
>
>
>
> > After restarting the server, I get the following error:
>
> > SyntaxError: URL: a=index c=N
After restarting the server, I get the following error:
SyntaxError: URL: a=index c=None f=None r=None
On Sep 18, 2:46 pm, Jonathan Lundell wrote:
> On Sep 18, 2010, at 11:40 AM, Avik Basu wrote:
>
>
>
> > When I replace the code in gluon/html.py, I still keep getting the
&g
delete the html.pyc file. Do I need to restart
the server?
On Sep 18, 2:31 pm, Jonathan Lundell wrote:
> On Sep 18, 2010, at 9:46 AM, Avik Basu wrote:
>
>
>
> > Sure, I'm happy to help debug. Send me the print statements when you
> > get a chance.
>
> FWIW, I just
Sure, I'm happy to help debug. Send me the print statements when you
get a chance.
Avik
On Sep 18, 12:39 pm, Jonathan Lundell wrote:
> On Sep 17, 2010, at 11:50 PM, Avik Basu wrote:
>
>
>
> > There is nowhere I can see that I am altering request in the models.
> >
There is nowhere I can see that I am altering request in the models.
What is the specific reason that request would break the URL
function? Any other ideas what the problem could be?
Avik
On Sep 17, 7:57 pm, Jonathan Lundell wrote:
> On Sep 17, 2010, at 4:44 PM, Avik Basu wrote:
>
>
tion (http://127.0.0.1:8000/FWv9_1_Avik/appadmin/index). Is
there some other file I need to copy?
Avik
On Sep 17, 7:24 pm, Jonathan Lundell wrote:
> On Sep 17, 2010, at 4:06 PM, Avik Basu wrote:
>
>
>
> > Hi,
>
> > I get the following error in appadmin.py which I copied ove
Hi,
I get the following error in appadmin.py which I copied over from the
welcome app in version 1.85.2:
Traceback (most recent call last):
File "/Volumes/Data/avikbasu/web2py/gluon/restricted.py", line 188,
in restricted
exec ccode in environment
File "/Volumes/Data/avikbasu/web2py/appli
I restarted the server and the issue was resolved. Sorry for the
bother.
Avik
On Sep 14, 6:24 pm, Avik Basu wrote:
> Hi,
>
> I get the following error when loading web2py version 1.84.4 on
> Dreamhost:
>
> Traceback (most recent call last):\n File "gluon/restric
Hi,
I get the following error when loading web2py version 1.84.4 on
Dreamhost:
Traceback (most recent call last):\n File "gluon/restricted.py", line
178, in restricted
in code it raises a RestrictedError containing the traceback. layer is
\n File "/home/pwoolf/foodwiki.com/applications/init/mod
Hello,
Is there a way to prevent crud.delete from redirecting to a new page.
The reason I want to do this is that I am calling crud.delete via
web2py's LOAD function? I am trying this:
form = crud.delete(db.ate,ate_id, next='')
I notice in the code that crud.update explicitly checks for an empt
Hi,
I am trying to run a query with the web2py "belongs" statement where
sometimes the value passed to the belongs may be empty. For example,
a=[]
rows = db(db.food.id.belongs(a)).select()
The database I'm using is MySQL and I get the following error:
Traceback (most recent call last):
File
any tables for it in the
model?
Avik
On Jun 28, 4:06 pm, mdipierro wrote:
> import cStringIO
> s=cStringIO.StringIO()
>
> after the same tables are defined for both dbs:
>
> db2.export_to_csv_file(s)
> s.seek(0)
> db1.import_form_csv_file(s)
>
> On 28 Giu, 13:
Hi,
I'm trying to synchronize two databases that are similar but not
exactly the same. I would like to create two connections (db1 and
db2) and go through table by table to do the synchronization.
db1 = DAL('sqlite://storage.db')
db2 = DAL('mysql://username:passw...@mysql.test.com/test_db',
pool
I am running on web2py 1.78.3 on a shared server on Dreamhost and I am
getting the following error:
An error occurred importing your passenger_wsgi.py
It seems like a PATH issue but I'm not sure. Any ideas what might be
causing this?
Avik
Turns out I was not running from source. Thanks for your help!
Avik
On May 19, 7:53 am, Alexandre Andrade
wrote:
> the correct driver is not python-mysql, but mysqldb.
>
> 2010/5/18 Avik Basu
>
>
>
>
>
> > Hello,
>
> > I am having some trouble con
Hello,
I am having some trouble connecting to a MySQL server running on my
local machine (Macbook Pro running Snow Leopard with My SQL 5.1.46).
I use the following connection string:
db = DAL('mysql://root:passw...@localhost/test', pool_size=10)
and I get the following error:
Traceback (most re
e the latest web2py?
> > This seems to work for me.
>
> > On May 3, 6:25 pm, Avik Basu wrote:
>
> > > Hi,
>
> > > I have installed a site on dreamhost and whenever I issue the command
> > > "cache.disk.clear" in an action, I get an "inval
Hi,
I have installed a site on dreamhost and whenever I issue the command
"cache.disk.clear" in an action, I get an "invalid function" error.
I thought this could be a permissions problem for the cache directory
or cache.shelve, so I added read/write permissions for everyone, but
it didn't seem t
Hi,
Is there a way to restart web2py from the command line in a linux
environment?
Avik
Hi,
Is it possible to use a lambda function within the next argument in a
crud create? I would like to redirect the user to a new page based on
the id of the record that was just created. Example:
form=crud.create(db.person,
next= lambda form:
redirect(URL(r=request,f='another_form',arg
',ajax=True)}}
>
> do
>
> web2py_component('{{=URL(r=request,c='default',f='show_foods')}}','
> mystuff')</
> script>
>
> You can also have
>
> <button
> onclick="web2py_component('{{=URL(r=request,c='default'
Hi,
Is there a way to reload a component that has been loaded with the
LOAD function without sending a request back to the server?
For example, I would like to reload a list of foods whenever the data
has been altered by the user, but I would like only the component to
reload instead of the whole
ld("food_id", db.food)
> )
>
> #controller
> form=crud.update(db.ate,ate_id)
>
> On Apr 1, 2:22 pm, Avik Basu wrote:
>
>
>
> > Hi,
> > As I understand, when crud.update(...) creates a form it pulls the
> > values of a given record into the form
Hi,
As I understand, when crud.update(...) creates a form it pulls the
values of a given record into the form as a string. If the field is a
reference to another table, then this shows up as a number. I would
like to instead show the name of the record instead of the id. I have
a represent functi
trunk or also in
> 1.76.5. Which web2py version do you use?
>
> Massimo
>
> On Mar 28, 6:18 pm, Avik Basu wrote:
>
>
>
> > I dropped all the records in the table and still get the same result.
> > I replaced the previous represent with:
>
> > represent = lam
rrupted data.
>
> Massimo
>
> On Mar 28, 4:54 pm, Avik Basu wrote:
>
>
>
> > I would like to use the represent function on a datetime object, like
> > so:
>
> > from datetime import *
>
> > db.define_table("adate",
> > Field
I would like to use the represent function on a datetime object, like
so:
from datetime import *
db.define_table("adate",
Field("date","datetime",
represent = lambda x: x.strftime("%a %m-%d-%y") if x else 'No
time' #convert datetime object to string
)
)
This works when I create a form,
s_widget(food_id)
>
> On Mar 27, 4:05 pm, Avik Basu wrote:
>
>
>
> > Also, if i wanted to extend SQLFORM.widgets.options.widget, how would
> > i go about doing that? Is it as simple as replacing:
>
> > class Units_Widget(object):
>
> > with:
>
> >
Also, if i wanted to extend SQLFORM.widgets.options.widget, how would
i go about doing that? Is it as simple as replacing:
class Units_Widget(object):
with:
class Units_Widget(SQLFORM.widgets.options.widget):
Thanks,
Avik
On Mar 27, 5:03 pm, Avik Basu wrote:
> I get the following er
; > def widget(f,v):
> > #build your widget
> > #using args
> > return widget
>
> > db.ate.units.widget = Units_Widget(food_id)
>
> > On Mar 27, 10:42 am, Avik Basu wrote:
>
> > > So, for my example, I tried y
would be the proper way to call the widget constructor?
Avik
On Mar 27, 12:02 am, mdipierro wrote:
> in the controller you can do
>
> db.table.field.widget = SomeWidgetConstructor(args)
>
> Not sure if this is what you are asking.
>
> On 26 Mar, 18:26, Avik Basu wrote:
>
Is there a way to pass arguments to a field's widget from the
controller? For example:
db.define_table("food", Field("name", "string'"))
db.define_table("units",
Field("food_id", db.food),
Field("name", "string")
)
db.define_table("ate",
Field("food_id", db.food),
Field("quantity",
t; D_db.py
>
> -Thadeus
>
>
>
> On Sat, Mar 20, 2010 at 1:17 PM, mdipierro wrote:
> > models are executed alphabetically. You have two options:
> > 1) rename one of the files:
> > 2) move the widgets to a module and import the module from db.py
>
> > On
Hi,
I have a several widgets in a file called widgets.py and would like to
use those widgets in db.py. Both db.py and widgets.py exist in the
models directory. However, when I use the widgets in defining table
fields in db.py, it does not recognize the widgets. How can I include
the widgets.py
e="..."
>
> OPTION('candy', _selected="selected", _value=1) should produce what you are
> looking for.
>
> However, when using SQLFORM the default selection can be set as well when
> you specify field.default =...
>
> -Thadeus
>
> On Wed,
Hello,
I am a Web2Py newbie trying to use the OPTION helper to create a
dropdown menu that will select the appropriate option.
I expect that
OPTION('candy', _value=1, value=1)
should produce
candy
but it only produces
candy
Am I doing something wrong? Thanks.
Avik
--~--~-~--~
44 matches
Mail list logo