I'm thinking a few possibilities...
we can, as a possible option, give folks the opportunity to either
register there install of web2py with additional user registration
option (depending of your philosophy wrt that) - which could also
serve as tracking mechanism to encourage people to keep up wit
> Each time the
> site engine was crashing (not web2py, long ago) the stack trace was emailed
> to me along with all variables values that existed at all levels of the
> trace.
good method to improve web apps development , getting feedback helping
to minimize bugs interesting...
REF: issue/bug loging:
useful for auto-send-error-to-server for error collecting ? (issue
tracking for validation on IS_BUG). Anyways, looks exciting, think
I'll play with this module for a while... Thanks for sharing!
Mart :)
On Aug 26, 11:26 pm, Alexey Nezhdanov wrote:
> Yes, once I used it t
I think the inspect module could be useful in deployed production
code: if you have a function with side effects, such as:
def update_and_return(value):
# 1. store value in database
# 2. read another value from database
# 3. do some very heavy calculations based on the passed
#value an
Hello,
I have a problem when I try to connect to an Oracle database with this
connection string:
db = DAL("oracle://username:password@//network_server:1521/
database_name")
Traceback (most recent call last):
File "C:\MyApps\web2py\gluon\restricted.py", line 186, in restricted
exec ccode i
I think so but I did not try it.
On Aug 26, 11:40 pm, Narendran wrote:
> Hello Michele/Massimo,
> Has this fix been taken in? Is it available in any web2py build now?
>
> On Aug 22, 4:10 am, Michele Comitini
> wrote:
>
> > Massimo here is the full patch with modifications for
> > oauth*_account.
That is not the sytnax for oracle uris. The oracle syntax is:
DAL(''oracle://username:passw...@database' )
The oracle driver does not support connecting to a remote server. You
must be run a oracle client locally.
On Aug 27, 8:06 am, ionel wrote:
> Hello,
>
> I have a problem when I try to conn
Hello,
I am trying to generate a field with a default value based on the
record id -- but it doesn't work. For example:
db.define_table('article',
Field('designation', type='string', length=200, required=True,
requires=IS_NOT_EMPTY()),
Field('details', type='string', length=2000),
Fie
it cannot be done because the computation is done before the insert
while the id is assigned by the database after the insert.
On Aug 27, 8:32 am, dederocks wrote:
> Hello,
>
> I am trying to generate a field with a default value based on the
> record id -- but it doesn't work. For example:
>
> d
Hello,
have a look at the Sphinx web app from this years GSoC:
http://gsoc.jacobmason.us/demo/contents
Done by jacob Mason (http://gsoc.jacobmason.us/blog/?cat=3).
This is a good opportunity to make web2py docs commenatble online.
Actually, the plan was to make the docs editable online but move from
reST to MARKMIN and use our own software.
On Aug 27, 9:38 am, Timmie wrote:
> Hello,
> have a look at the Sphinx web app from this years GSoC:
>
> http://gsoc.jacobmason.us/demo/contents
>
> Done by jacob Mason (http://gsoc.jac
I'm using Pyjamas to build my client app and Web2py to build the
server.
I'm submitting a HTML form (generated by Pyjamas) to the Web2py server
code.
Where should I look to see how I can handle the submission using
Web2py?
I already have a function defined in /app/controllers/default.py which
ge
On Aug 25, 2010, at 8:12 PM, Jonathan Lundell wrote:
>
> On Aug 25, 2010, at 7:56 PM, mdipierro wrote:
>>
>> This is a bug. I fixed it in trunk. Thanks Jonathan.
>
> It's fixed in the sense that it won't raise an exception. But now how is
> calling _unlock different from calling forget?
Nag.
do you want to access to the image uploaded with form for example?.
use download function in controller
On Aug 27, 12:08 pm, Carl wrote:
> I'm using Pyjamas to build my client app and Web2py to build the
> server.
>
> I'm submitting a HTML form (generated by Pyjamas) to the Web2py server
> cod
You are right. Please check trunk again.
Massimo
On Aug 27, 10:25 am, Jonathan Lundell wrote:
> On Aug 25, 2010, at 8:12 PM, Jonathan Lundell wrote:
>
>
>
> > On Aug 25, 2010, at 7:56 PM, mdipierro wrote:
>
> >> This is a bug. I fixed it in trunk. Thanks Jonathan.
>
> > It's fixed in the sense t
Massimo, that gave me a ticket with this:
Traceback (most recent call last):
File "C:\repo\anima\gluon\restricted.py", line 186, in restricted
exec ccode in environment
File "C:/repo/anima/applications/welcome/controllers/default.py",
line 754, in
File "C:\repo\anima\gluon\globals.py", l
The fixes have been applied, they are on trunk
http://code.google.com/p/web2py/source/checkout
they should work here is an updated version of the example app running on GAE:
http://grafbook.appspot.com/helloFacebook/graph
if it works it should mantain the url above even after authentication with
thanks for replying.
It's not an image that's being uploaded but instead an XML file which
I will be parsing the contents of into a database table.
Carl
On Aug 27, 5:24 pm, "Martin.Mulone" wrote:
> do you want to access to the image uploaded with form for example?.
> use download function in c
On 2010-08-27, 15:06 ionel wrote:
> Hello,
>
> I have a problem when I try to connect to an Oracle database with this
> connection string:
>
> db = DAL("oracle://username:password@//network_server:1521/
> database_name")
>
>
Hello,
Replacing ":" with "/" works for me on Oracle 11.0.2.
By
On 2010-08-27, 15:06 ionel wrote:
> Hello,
>
> I have a problem when I try to connect to an Oracle database with this
> connection string:
>
> db = DAL("oracle://username:password@//network_server:1521/
> database_name")
Hello,
Replacing ":" with "/" in "username:password" works for me on Or
Marcin, did you connect to a remote server?
which : did you replace with / ?
there is someone else which can test with other versions of oracle?
2010/8/27 Marcin Jaworski
>
> On 2010-08-27, 15:06 ionel wrote:
>
> > Hello,
> >
> > I have a problem when I try to connect to an Oracle database wi
I am trying to store dynamically generated DB into session but it fails with
error . is that supported or if i want to share DB Globally , across
controller , only within a session, but it is dynamically generated how
should i share without puttint into models??
case_db=DAL('mysql://r...@localh
strings is very neat unix/linux command to extract Strings (with more than 4
chars by default) inside any type of files (even binary files, images ,
etc).
so if there a python implemantion of it , if u know i will use it. as Kevin
shows theres not much speed difference in IO compare to C. (even fa
On 2010-08-27, 19:50 Bruno Rocha wrote:
> Marcin, did you connect to a remote server?
>
> which : did you replace with / ?
>
> there is someone else which can test with other versions of oracle?
Hello,
I'm using local connection. Colon was replaced with "/" in "username:password"
string. Wit
not possible. A db contains an open socket. It cannot be serialized.
On Aug 27, 12:54 pm, Phyo Arkar wrote:
> I am trying to store dynamically generated DB into session but it fails with
> error . is that supported or if i want to share DB Globally , across
> controller , only within a session,
It is not possible because a DB contains a database connection. That
cannot be serialized.
On Aug 27, 12:54 pm, Phyo Arkar wrote:
> I am trying to store dynamically generated DB into session but it fails with
> error . is that supported or if i want to share DB Globally , across
> controller , o
ok i c so theres no possible way to share ? so how the dbs inside models
works? they have to re-execute every time requested?
On Sat, Aug 28, 2010 at 12:57 AM, mdipierro wrote:
> not possible. A db contains an open socket. It cannot be serialized.
>
> On Aug 27, 12:54 pm, Phyo Arkar wrote:
> >
Excellent! I was just coming up on a personal project that requires
me to use a legacy database. I wasn't looking forward to writing the
models myself. Thanks for this plugin.
Dalen
On Aug 26, 5:36 pm, selecta wrote:
> Create the web2py code needed to access your mysql legacy db.
>
> To make
Hi all, we have added a section in our "examples" wiki page for
web2py:
http://projects.unbit.it/uwsgi/wiki/Example
I hope this can be useful
--
Roberto De Ioris
http://unbit.it
JID: robe...@jabber.unbit.it
thanks massimo
so now i try to re execute :
>
> case_db=DAL('mysql://root@
localhost/'+ request.vars.db_name)
> case_db.define_table(...)
> session.case_db=case_db
on every controller of every function which needs it.
On Sat, Aug 28, 2010 at 12:56 AM, mdipierro wrote:
> It is not possible be
Hi everyone, this is a long one
today I noticed one of my _settings.table file was written
everytime. The table definition was changed a long ago, from the old
chema:
CREATE TABLE settings(
id INTEGER PRIMARY KEY AUTOINCREMENT,
key CHAR(512),
value CHAR(512)
);
to the new:
CREAT
-
(please do not get too excited about the next lines)
-
no way ;-)
tks.
Niphlod
Nice!
On Aug 26, 5:36 pm, selecta wrote:
> Create the web2py code needed to access your mysql legacy db.
>
> To make this work all the legacy tables you want to access need to
> have an "id" field.
>
> This plugin needs:
> mysql
> mysqldump
> installed and globally available.
>
> Under Windows yo
2010/8/27 Phyo Arkar :
> strings is very neat unix/linux command to extract Strings (with more than 4
> chars by default) inside any type of files (even binary files, images ,
> etc).
> so if there a python implemantion of it , if u know i will use it. as Kevin
> shows theres not much speed differ
hello,
I'm proud to present the first pre-alfa release of Web2Py_CC.
*Windows*: as it's developed under windows, it runs without exceptions (and of
course a few bugs ;-)
Sorry, I wasn't able to produce an executable, because py2exe had problems
(probably with my
recently upgraded wxPython, a
hello,
I'm looking if I can embed debugging in Web2Py_CC,
but I've a few questions before I start my attempts.
1. What is the allowed / preferred debugger, pdb or winpdb ?
2. A run some tests in a debugger (winpdb) and saw that exceptions are caught
always in web2py
(which might be a very logi
I ran it, got error
D:\Development\python\web2py_cc\Web2Py>python Web2py_CC.py
Traceback (most recent call last):
File "Web2py_CC.py", line 15, in
"""]
TypeError: list indices must be integers, not tuple
Pai
On Aug 27, 3:13 pm, Stef Mientki wrote:
> hello,
>
> I'm proud to present the
Just wondering why the SQLiteAdapter uses CHAR as the format for 'string'
instead of VARCHAR like the other adapters?
From here- http://sqlite.org/datatype3.html:
"If the declared type of the column contains any of the strings "CHAR", "CLOB",
or "TEXT" then that column has TEXT affinity. Noti
Yes i do use forks before in C and Python .
But i have not tried with web2py yet , i dont know how web2py will behave .
Forks works well on web2py?
if not i will just write a twisted base daemon, which will listen on a unix
ipc socket for requests and if the crawling is done , will report
"number
I have a similar but perhaps simpler problem. When I detect excessive
activity that might be a bot, I want to
1. Log the user out
2. Force a re-captcha on the next login only.
So if I have something like:
try:
if form.accepts(...):
etc ...
except ActivityLimitException:
session.f
2010/8/27 Phyo Arkar :
> Yes i do use forks before in C and Python .
> Forks works well on web2py?
>From my experience I would say so.
>
> what i am doing now is trying to parse any kind of files. well lets say it
> is a crawler (not and indexer) yet. it crawls and insert into database.
>
> for i
Ok then i should start trying fork on web2py , thx michele.
On Sat, Aug 28, 2010 at 3:32 AM, Michele Comitini <
michele.comit...@gmail.com> wrote:
> 2010/8/27 Phyo Arkar :
> > Yes i do use forks before in C and Python .
> > Forks works well on web2py?
> From my experience I would say so.
> >
>
>
Closed :)
On Sat, Aug 28, 2010 at 1:24 AM, Phyo Arkar wrote:
> thanks massimo
>
> so now i try to re execute :
>
>
> >
> > case_db=DAL('mysql://root@
> localhost/'+ request.vars.db_name)
> > case_db.define_table(...)
> > session.case_db=case_db
>
> on every controller of every function which need
Both MySQL and Postgre have index searching , yes. I have not tried
PostgreSQL FTS but SphinxSearch is renowned for fastest indexing and fastest
search. its python api is very easy too, you should give it a try.
http://sphinxsearch.com/
On Sat, Aug 28, 2010 at 3:32 AM, Michele Comitini <
michele.
Can you explain your design?
On Aug 27, 1:54 pm, Phyo Arkar wrote:
> thanks massimo
>
> so now i try to re execute :
>
>
>
> > case_db=DAL('mysql://root@
>
> localhost/'+ request.vars.db_name)
>
> > case_db.define_table(...)
> > session.case_db=case_db
>
> on every controller of every function wh
thanks. Some users have experience dropped requests with uWSGI on
heavy traffic. Can you reproduce the problem?
On Aug 26, 11:32 pm, Roberto De Ioris wrote:
> Hi all, we have added a section in our "examples" wiki page for
> web2py:
>
> http://projects.unbit.it/uwsgi/wiki/Example
>
> I hope this
> so, for SQL databases, if a column is removed or dropped, it's not
> migrated for sqlite. Is there a reason for this?
sqlite does not support drop columns.
On Aug 27, 2:03 pm, Álvaro J. Iradier
wrote:
> Hi everyone, this is a long one
>
> today I noticed one of my _settings.table file was
its python api is very easy too, you should give it a try.
>
> http://sphinxsearch.com/
yes I will
Here is how it works:
At Home page , theres a list of DBs , lets say
Db Name , Owner , Description
Db1 , JohnSmith, Test
Db2 , JaneSmith, Test
Db3 , JohnDoe, Test
in jqgrid.
User uploads files as an archive then clicks on Db1 and click start
processing.(note i have to us
On 27-08-2010 22:32, Pai wrote:
> I ran it, got error
>
> D:\Development\python\web2py_cc\Web2Py>python Web2py_CC.py
> Traceback (most recent call last):
> File "Web2py_CC.py", line 15, in
> """]
> TypeError: list indices must be integers, not tuple
sorry I uploaded the wrong file.
cheers,
I seem to be having problems getting my head around the default argument to
Field.
I am using SQLite as the backend.
If I do:
Field('grade_date','date',default=request.now,required=True,notnull=True)
I get a database column with a DEFAULT of todays date, not what I want:
grade_date DATE NOT NU
I dont know if I understand clearly what you want, but..
May be :
def get_sql_date():
return db.executesql('select CURRENT_DATE')
Field('grade_date','date',compute=get_sql_date,required=True,notnull=True)
or
Field('grade_date','date',default=request.now.date().strftime('%Y-%m-%d'),required
OPs..
you have to parse the executesql() return, replace with that
db.executesql('select CURRENT_DATE')[0][0].encode()
2010/8/27 Bruno Rocha
> I dont know if I understand clearly what you want, but..
>
>
> May be :
>
> def get_sql_date():
>return db.executesql('select CURRENT_DATE')
>
> F
On Friday 27 August 2010 4:15:17 pm Bruno Rocha wrote:
> I dont know if I understand clearly what you want, but..
>
>
> May be :
>
> def get_sql_date():
>return db.executesql('select CURRENT_DATE')
>
> Field('grade_date','date',compute=get_sql_date,required=True,notnull=True)
>
> or
>
> Field('
Hi All,
I'm going to have to use a MySQL orm in a project in near future.
Do you think web2py DAL is good for that purpose regarding scalability
and performance ?
And what files do I need to import or execute to use only web2py DAL ?
Thanks.
Ok, now I got it.
But, I dont think DAL has a method for doing that.
I know just "notnull", "unique" and "ondelete" that are enforced at the
level of the database.
I think you should use raw SQL for that
db.executesql('ALTER TABLE..;)
2010/8/27 Adrian Klaver
> On Friday 27 August 2010
Hi,
I am running a web2py application at my home server,
that is published and I have some clients using for accurracy tests.
But , every 3 hours+- the server fails with the message
Exception in thread Thread-20:
Traceback (most recent call last):
File "/usr/lib/python2.6/threading.py", line
On Friday 27 August 2010 5:05:40 pm Bruno Rocha wrote:
> Ok, now I got it.
>
> But, I dont think DAL has a method for doing that.
>
> I know just "notnull", "unique" and "ondelete" that are enforced at the
> level of the database.
>
> I think you should use raw SQL for that
>
> db.executesql('ALTE
may be I am wrong .
Wait for Massimo's response
2010/8/27 Adrian Klaver
> On Friday 27 August 2010 5:05:40 pm Bruno Rocha wrote:
> > Ok, now I got it.
> >
> > But, I dont think DAL has a method for doing that.
> >
> > I know just "notnull", "unique" and "ondelete" that are enforced at the
> >
Looking sql.py I found:
'notnull': 'NOT NULL DEFAULT %(default)s'
If I understand it well, that could be yor solution.
SQL_DIALECTS = {'sqlite': {'boolean': 'CHAR(1)',
'string': 'CHAR(%(length)s)','text': 'TEXT',
'password': 'CHAR(%(length)s)','blob': 'BLOB',
'uplo
>.< DON'T DO IT!
The DAL is ment for functional programming... so be careful if you
have to use it in a class based system. Plus you will have to have
your stand alone application manage the .table files too. Just keep it
in mind.
In any case...
You will need.
gluon/LICENSE
gluon/sql.py
gluon/p
Thanks Thadeu, that will be very useful for me too, I will try to follow
your instructions.
BTW, I am using DAL for a Py/Gtk Application,
besides the migration ( does not works very well )
everything else is running ok.
I am going to speak about DAL in PyCon Brasil.
(google translated)
http://tr
Run the web server with -N (no cron) and run a separate backrgound
process for cron. Anyway, there is no way to control how much memory
cron consumes if a cron task takes longer than expected. It is safer
not to use cron (-N) and use this instead:
http://www.web2py.com/book/default/chapter/04#Back
On Friday 27 August 2010 5:42:04 pm Bruno Rocha wrote:
> Looking sql.py I found:
>
> 'notnull': 'NOT NULL DEFAULT %(default)s'
>
>
> If I understand it well, that could be yor solution.
>
>
>
> SQL_DIALECTS = {'sqlite': {'boolean': 'CHAR(1)',
> 'string': 'CHAR(%(length)s)','text
Thanks Massimo.
,
2010/8/27 mdipierro
> Run the web server with -N (no cron) and run a separate backrgound
> process for cron. Anyway, there is no way to control how much memory
> cron consumes if a cron task takes longer than expected. It is safer
> not to use cron (-N) and use this instead:
>
try this:
from guon.sql import Expression
db.define_table(.,Field(...,default=Expression('CURRENT_DATE')),)
On Aug 27, 9:19 pm, Adrian Klaver wrote:
> On Friday 27 August 2010 5:42:04 pm Bruno Rocha wrote:
>
>
>
> > Looking sql.py I found:
>
> > 'notnull': 'NOT NULL DEFAULT %(default)s'
Cool!
hidden tricks and magics of DAL, that is useful, needs to be on the /book
2010/8/27 mdipierro
> try this:
>
> from guon.sql import Expression
>
> db.define_table(.,Field(...,default=Expression('CURRENT_DATE')),)
>
> On Aug 27, 9:19 pm, Adrian Klaver wrote:
> > On Friday 27 Augu
On Friday 27 August 2010 7:24:13 pm mdipierro wrote:
> try this:
>
> from guon.sql import Expression
For those following along: from gluon.sql import Expression
> db.define_table(.,Field(...,default=Expression('CURRENT_DATE')),)
>
> On
I tried the above and got:
Traceback (most recent c
Of course, it is always an option (and never a difficulty) to wrap
functional programming concepts in an object oriented wrapper --
that's more a benefit of the functional style than then anything OOP
gives to you though.
On Aug 27, 7:13 pm, Thadeus Burgess wrote:
> >.< DON'T DO IT!
>
> The DAL i
Try
db.define_table(.,Field(...,default=Expression('CURRENT_DATE',db=db)),)
I cannot promise this works but let us know.
On Aug 27, 9:46 pm, Adrian Klaver wrote:
> On Friday 27 August 2010 7:24:13 pm mdipierro wrote:
>
> > try this:
>
> > from guon.sql import Expression
>
> For those fo
I use web2py's DAL in my project (daemon).
I modified db.py so that all calls to create_table happen with migrate=False
(because I reuse the same db as in web app).
So all I need from DAL is .select, .update, .delete and .insert. Also I take
care to
call these functions only from single thread. Tha
On Friday 27 August 2010 8:27:31 pm mdipierro wrote:
> Try
>
> db.define_table(.,Field(...,default=Expression('CURRENT_DATE',db=db)),.
>...)
>
> I cannot promise this works but let us know.
>
No exceptions. What it created was:
CREATE TABLE default_test(
id INTEGER PRIMARY KEY AUTOINCREME
> thanks. Some users have experience dropped requests with uWSGI on
> heavy traffic. Can you reproduce the problem?
Never had specific report about this (socket misconfiguration apart), they
should post relevant data to the uWSGI mailing-list.
uWSGI will never take down your machine if the load
73 matches
Mail list logo