Update operation in Oracle gives ORA-12899 error if update value exceeds
length of a string field (VARCHAR2 type in Oracle).
This issue is correctly processed in INSERT statement, something like
if db.type == 'oracle' and field.type == 'string': value =
value[:field.length]
Please add same code
Maybe on Linux it works better but for me the worst thing is memory
leak. Python can not handle more than 1 Gig of RAM, and my process
reaches this limit after several hours of processing. Speed loss is
also very apparent.
On 18 май, 22:48, Vasile Ermicioi wrote:
> I also use dal (outside web2py)
Please help me to build DAL expression to create this query:
select * from addresses t1 join (select id from addresses order by
address) t2 on t1.id = t2.id limit %d offset %d
FYI, this query does the same as 'select * from addresses order by
address limit offset' but works 10x faster (simple que
Vasile,
I am using Python 2.5 on Windows XP,
MySQL mysql Ver 14.14 Distrib 5.1.32, for Win32 (ia32)
InnoDB engine, UTF-8 encoding
I have large database with lots of data, hard to reproduce here.
Application works fine on web2py version 1.86.2 and works with many
small errors in web2py 1.95, abou
.
Best regards,
Sergey Podlesny
On 16 май, 15:00, SergeyPo wrote:
> I get the following error when call SQL table, when I have reference
> fields in my data table.
> E.g.:
>
> db.define_table('alarms',
> SQLField('function_name', 'string', le
I get the following error when call SQL table, when I have reference
fields in my data table.
E.g.:
db.define_table('alarms',
SQLField('function_name', 'string', length=64),
SQLField('created_at', 'datetime',
default=datetime.datetime.now()),
SQLField('header', db.headers),
SQLFiel
Python 2.5, MySQL 5.1, OS Windows XP, many different PC's tried both
source code version and Windows version of web2py, 1.94.6; same thing
on Debian with packed Linux installation...
I am experienced web2py user, until this week used version 1.82 all
the time and this Friday updgraded... I am stuc
Hello everyone!
I want to do something like:
def selector():
try:
x = db.headers[request.vars.ID]
if x is None:
response.flash = T('ID incorrect')
redirect(URL(r=request, f='index',
args=(request.args[1])))
except:
response.flash = T('ID inc
you already have a
> validator that is limiting the size)
>
> On Oct 28, 7:11 am, SergeyPo wrote:
>
> > I need to paste large texts into a db table field using appadmin.
> > Table field is defined as 'text' and in MySQL is mapped to 'longtext'.
> > L
I need to paste large texts into a db table field using appadmin.
Table field is defined as 'text' and in MySQL is mapped to 'longtext'.
Longtext capacity is 4GB or so... I need to paste approx. 1 Mb of text
into the field.
When I do it in web2py appadmin I get an error "enter from 0 to 65536
char
In gluon/tools.py
function register()
starting from line 1246
must read:
elif self.settings.registration_requires_approval:
table_user[form.vars.id] = dict(registration_key='pending')
Currently it is:
elif self.settings.registration_requires_approval:
user[form.vars.id] = dict(registrati
Hi everybody,
is it possible in DAL/GAE to aggregate values by several criteri?
E.g. SELECT SUM(x) where z <= 100 and z > 0 and y <= 1000 and y >=
200;
I have done a simple OLAP engine using 'multidimensional hierarchical
clustering' approach, it does not need joins and works pretty fast in
MySQL
107000 from Russia
107000 from Finland
same number after clearing cache.
On Mar 28, 6:04 am, "mr.freeze" wrote:
> I was getting 108k in Texas but it jumped to 607k after clearing the
> browser cache.
>
> On Mar 27, 9:55 pm, mdipierro wrote:
>
>
>
> > this is odd. When I do
>
> >http://www.googl
s
<<>> FROM %s%s%s) w_tmp WHERE ROWNUM<=%i)
%s %s %s;' % (sql_s, sql_f, sql_f, sql_t, sql_w, sql_o, lmax, sql_t,
sql_w_row, sql_o)
leaving outer select with only the fields requested by SQLSet.
Hope this helps,
Sergey
On Mar 1, 5:22 pm, SergeyPo wrote:
> Limitby clause works w
anyway using a trick (three
> nested select as suggested by the oracle docs) but the trick breaks
> down with joins.
>
> On Feb 27, 11:50 am, SergeyPo wrote:
>
> > If you remove limitby it works. I reported this error about 6 months
> > ago, tried many workarounds and th
Disregard previous msg. Problem is in conflict with 'represent'
attribute.
On 1 мар, 17:04, SergeyPo wrote:
> Somehow when it calls formatter in line 2006 of validators.py, it uses
> IS EMPTY OR validator, passes empty string there and tries to call
> strftime for this
Somehow when it calls formatter in line 2006 of validators.py, it uses
IS EMPTY OR validator, passes empty string there and tries to call
strftime for this string.
URGENT
On 1 мар, 16:43, SergeyPo wrote:
> I have the following definition in models:
>
> SQLField('created
I have the following definition in models:
SQLField('createdat', 'datetime', default=datetime.datetime.now())
It automatically timestamps record when it's created. Used to work
well with oracle under web2py version 1.65.1
Now it stopped working, error is validators.py line 2006. Str object
has n
imb here.
>
> Have you tried the query where it selects all columns instead of just
> name and komment?
>
> -Thadeus
>
> 2010/2/27 SergeyPo :
>
>
>
> > SELECT headers1.name, alarms1.komment FROM (SELECT w_tmp.*, ROWNUM
> > w_row FROM (SELECT headers1.name
rgs)
DatabaseError: ORA-00904: "HEADERS1"."ID": invalid identifier
On 26 фев, 21:22, Thadeus Burgess wrote:
> please print the output of
>
> db(db.headers.id == db.alarms.header)._select(db.header.name,
> db.alarms.komment, limitby=(0,5))
>
> -Thadeus
>
&g
Limitby clause still is not working with Oracle backend when used in
queries that have any kind of join, left or inner.
db.define_table('headers',
SQLField('name', 'string')
)
db.define_table('alarms',
SQLField('header', db.headers),
SQLField('komment', 'string')
)
data = db(db.heade
I am evaluating web2py CAS appliance for the following application:
central authentication and moneykeeping for many auctions. CAS should
not only validate users for many auction sites but also store user's
payments, balance, respond to requests (soap/rpc) on balance
available, blocking amounts etc
Sorry guys I pressed 'Report as spam' unintentionally! Please restore
if possible.
On Dec 8, 9:28 pm, mdipierro wrote:
> I think the problem is that it is running from the python.exe folder
> and not the web2py folder therefore it is not finding the libraries.
> As a test. try edit web2py.py and
; > still work?
>
> > > > > ~Brian
>
> > > > > On Dec 4, 9:52 am, mdipierro wrote:
>
> > > > > > There is a logical problem. the web server andcronare two processes
> > > > > > and therefore they should be threated as two different ser
For those who is interested, I downloaded curl for windows, wrote bat
file
'curl.exe http://.../appname/controllername/actioname'
and put it into windows scheduler. Web2py Cron service would be much
more elegant.
On Dec 4, 11:52 pm, SergeyPo wrote:
> What is the best way to run co
27;d rather do the cleanup before adding cron to win
> service.
>
> Massimo
>
> On Dec 4, 4:32 am, SergeyPo wrote:
>
>
>
> > Hello,
>
> > I am having problem with cron. My crontable:
>
> > */5 * * * * root *default/getcaptypes
>
> > C
Hello,
I am having problem with cron. My crontable:
*/5 * * * * root *default/getcaptypes
Controller method 'default/getcaptypes' works fine when you call it
directly. It works fine when called by cron when web2py is running as
console. But it is not working when I start web2py as windo
Dec 1, 2:08 pm, SergeyPo wrote:
>
>
>
> > Works under SQLite, but under MySQL table creation script generates
> > the following sql: 'VARCHAR(16),\n\tcms_url VARCHAR(255),\n\tagency
> > VARCHAR(32),\n\tuser VARCHAR(32),\n\tpas' - notice \n\t !
>
> &
Works under SQLite, but under MySQL table creation script generates
the following sql: 'VARCHAR(16),\n\tcms_url VARCHAR(255),\n\tagency
VARCHAR(32),\n\tuser VARCHAR(32),\n\tpas' - notice \n\t !
Error traceback
Traceback (most recent call last):
File "C:\web2py\gluon\restricted.py", line 184,
Here is a possibility to make DAL a bit more transparent for those who
use Oracle:
when we use statements like:
db(db.tablename.fieldname.belongs(the_list)).update(x=y)
Oracle (unlike its open-source counterparts) fires an error coded
ORA-01795 if length of 'the_list' exceeds 1000. There is no w
May I share a helper function borrowed from RoR, that renders a button
which is inline by default (meaning you can put it anywhere on web
page just like a link, no line feed will happen) but you can set any
style. Put it somewhere to models directory. Call it from your
template code as e.g.
{{=BUT
Yes I was running two different applications, and that's what wondered
me - why different apps (actually two different python web2py
processes) affected each other. I still prefer to keep things simple
and avoid various configuration files but do you agree, this is
completely normal approach if I
like this example...
> > I think this could have to take into consideration. ¿or not?
>
> > Alex F
>
> > El 19/10/2009 16:32, Wes James escribió:
>
> > > On Mon, Oct 19, 2009 at 8:26 AM, SergeyPo wrote:
>
> > >> Run two different web2py applications
Run two different web2py applications on same machine using two
different ports (127.0.0.1:8000 and 127.0.0.1:8002). Open two browser
windows for two apps (two tabs in Safari).
Log in 1st application admin in 1st window.
Log in 2nd app admin in 2nd window.
Try to do smth in 1st window - it will as
Without this clause the query does not work at all. In shown case it
works in mysql and sqlite.
On Oct 12, 6:11 pm, mdipierro wrote:
> I think there is something wrong with the query:
>
> groupby=db.carts.ALL
>
> is not allowed.
>
> Massimo
>
> On Oct 12, 8:45 am, Ser
Forgot to write that the code works in mysql and sqlite.
On Oct 12, 5:45 pm, SergeyPo wrote:
> The following statement gives strange error with Oracle. This has
> something to do with oracle_fix in gluon/sql.py
>
> many_to_many = (db.c_h.cart_id==db.carts.id)
> db(db.car
The following statement gives strange error with Oracle. This has
something to do with oracle_fix in gluon/sql.py
many_to_many = (db.c_h.cart_id==db.carts.id)
db(db.carts.id>0).select(db.carts.ALL, db.c_h.cart_id.count(),
left=db.c_h.on(many_to_many),
Yes, in my application comma creates "invalid request' error too. I
had to write a special javascript routine to ensure that there is no
commas in requests (they are produced by flot library when you drag an
area in the chart). I recommend to use /geocoder/index/london/ontario
and retrieve values
Session can store only basic Python data types like strings, integers,
floats. It can not store custom class data (SQLFORM). You can
serialize SQL FORM object with pickle and store a resulting string in
the session, and then use pickle.loads(string) do deserialize the
object. No sure it is more ec
I understand that Rb does something like I am doing: uses web2py with
SQLite for standalone mode; without a server. At least this feature
initially convinced me to try web2py. This make a very appealing
proposition: use simple, easy to use tools (python + html) to develop
a cross-platform applicat
Works, Thanks, Fixed.
On Jul 9, 5:40 pm, mdipierro wrote:
> OK. possibly fixed. Uploading to trunk. Give it a try in a couple of
> minutes.
>
> On Jul 9, 3:24 am, SergeyPo wrote:
>
>
>
> > If I put old (v 1.75) regex there (line 75), version 1.65.1 stops
> &
/bazaar.launchpad.net/%7Emdipierro/web2py/devel/revision/917#gl...>
>
> > On Thu, Jul 9, 2009 at 1:40 AM, SergeyPo wrote:
>
> >> In version 1.57 this worked: 127.0.0.1:8000/appname/controllername/
> >> function/1/-1/10/-10<http://127.0.0.1:8000/appname/contro
In version 1.57 this worked: 127.0.0.1:8000/appname/controllername/
function/1/-1/10/-10
(notice negative numbers in arguments)
In version 1.65 this causes 'Invalid Request' error. This makes my app
incompatible. Please help me where to look to patch.
--~--~-~--~~~---~
lar could be implemented in the new DAL without slowing down
> anything. Actually I expect the new DAL to be faster because there are
> no table lookups.
>
> Massmo
>
> On Jul 8, 11:09 am, SergeyPo wrote:
>
>
>
> > Please don't! DAL is minimalist now but tha
Please don't! DAL is minimalist now but that's what positively differs
web2py from others. In return it works fast (I'd say 10x faster than
RoR) and takes no time to learn.
On Jul 8, 6:35 pm, mdipierro wrote:
> I think this is gone off topic. The issue is whether it should be
> possible for a t
, 10:27 am, SergeyPo wrote:
> I gave bad example with User.is_logged but obviously having center
> place where to put model logic is good thing. In web2py I write
> functions (not methods in OOP sense) into db.py to get reusable code
> that has to be called from various controllers. In Ro
have an ORM and we have a DAL. In
> > practice this is syntactical difference more than a functional one.
> > They say
>
> > record.is_logged()
>
> > we say
>
> > is_logged(record)
>
> > The rails syntax can easily be implemented on top of web2p
ey say
>
> record.is_logged()
>
> we say
>
> is_logged(record)
>
> The rails syntax can easily be implemented on top of web2py and I do
> not completely exclude it will be supported in the new DAL (without
> going to a full ORM).
>
> Massimo
>
>
I like web2py and prefer it over RoR but two things I am missing:
1. migrations (RoR migrations are really more powerful, you write the
script that not only changes database scheme but also can update data,
you have full control etc.)
2. models (web2py model layer is purely database layer which yo
I place several large js libraries into 'static' directory, also my
application generates MANY graphical files into this dir. Is it
possible to display only "standard" directories in static? Otherwise
loading app admin page takes too much time/memory as it loads thusands
of file names that are sto
not convinced. why should it find applications and not find its
> own path?
> anyway, where do you think it should go?
>
> massimo
>
> On Jun 9, 1:04 am, SergeyPo wrote:
>
>
>
> > There are problems with these in Windows when web2py is run as
> > service. They sh
There are problems with these in Windows when web2py is run as
service. They show path to python.
After many trials I came to this ugly solution:
import applications.advantage.modules.pathfinder as pathfinder
PATH_TO_ME = os.path.dirname( os.path.realpath( pathfinder.__file__ ))
Here 'pathfinder
;I am feeling lucky' approach that works without much overhead:
an_Amoxycilin = db(db.drugs.name.like('Amoxycilin')).select(limitby=
(0,1))
On Jun 2, 11:10 am, Horst Herb
wrote:
> On Tue, Jun 2, 2009 at 4:48 PM, SergeyPo wrote:
>
> > This works for sure in sqlite, m
This also looks like Ruby on Rails approach, however you can write
your own classes in web2py, put them to models dir and use them as you
have used to. E.g. you have an sql table 'users' in DAL, and you can
write a class
class Users:
def findUser(login):
u = db(db.users.login==login).s
This works for sure in sqlite, mysql and oracle:
db().select(db.tablename.fieldname, distinct=True)
and this is correct approach because I can not imagine biz logic when
you want to select distinct values AND their ID's etc. fields. You
normally use select distinct when you need a list of availa
My vote for it too, I've reported this problem before.
Sergey
On May 28, 8:13 am, Mariano Mara wrote:
> G'night everyone.
>
> I'm defining a table like this:
>
> db.define_table("BillHourType", SQLField("hourtype", db.HourType),
> SQLField("billtype", db.Billable
There is an example of string streaming on the site, and I have
implemented my streaming controller function using this example (yes,
it involves diving into file interface but not too much):
#class streams long CSV to file-like object
#I pasted it here unchanged, so code may be excessive
class C
I am using a pagination of <<< 1 | 2 | 3 >>> style in mysql and
Oracle. I agree that OFFSET slows down in MySQL after 20,000 records,
that's why I suggest my clients to use Oracle after their database
grows.
If you are interested in my pager code I can post it here, although
it might be written
Hi Timmie
I m using matplotlib and instead of show() just use savefig
('filepath', dpi=dpi)
I make filepath inside static dir, something like /static/myfiles/
tmp0123
This of course requires periodic cleaning by some cron script, e.g.
delete all files older than 4 days. Or try to use python's tmp
Great! Thank you, Massimo.
On Apr 27, 9:42 am, mdipierro wrote:
> I added the link.
>
> On 27 Apr, 00:37, SergeyPo wrote:
>
> > My company Zarealye develops personal loans data mining application
> > with web frontend, uses web2py. Link to English web page
>
My company Zarealye develops personal loans data mining application
with web frontend, uses web2py. Link to English web page is
http://zarealye.com/ca/Collect_Advantage/
And we have large CRM project with call centre intergration in our
plans.
On Apr 27, 8:44 am, mdipierro wrote:
> If you work
pr 16, 8:02 pm, mdipierro wrote:
> Try 1.61.1 anyway Sqlite is buggy on Mac. I have had issue myself. I
> suggest also try running from the binary distribution.
>
> On Apr 16, 10:20 am, SergeyPo wrote:
>
> > No, am on 1.57
>
> > On Apr 16, 5:04 pm, mdipierro wrote:
&g
= str(row.id)
table.append(TR(''' add columns ''',
_onclick="javascript:document.location = 'blah/blah' + current_id"))
On Apr 20, 11:49 am, weheh wrote:
> SergeyPo - Many thanks to you for your earlier post with which I am
> already intimat
It's my specialty in this forum to give link to a thread for SQLTABLE
personalizing.
SQLTTABLE looks like one of the biggest attractors of the whole
web2py, so some effort for extra features and documentation is
required.
Lambda function example and another home-made method is described
here:
htt
No, am on 1.57
On Apr 16, 5:04 pm, mdipierro wrote:
> 1.61.1 ?
>
> On Apr 16, 5:39 am, SergeyPo wrote:
>
> > Greetings!
>
> > I am running web2py on Mac OS X, SQLite from source code (for
> > development).
> > Sporadically I get this error:
>
>
Greetings!
I am running web2py on Mac OS X, SQLite from source code (for
development).
Sporadically I get this error:
ERROR:root:Traceback (most recent call last):
File "/Users/vasilina/Documents/_Development/ADVANTAGE/web2py copy/
gluon/main.py", line 316, in wsgibase
File "/Users/vasilina/
Hello group!
I want to mimic the behavior of console application through web
interface: I invoke a process in web2py controller function and try to
pipe its stdout to user's browser (no keyboard input is needed). These
are time-consuming processes that print out their progress with simple
python
I hope my today's activity with Oracle testing helps to improve
web2py!
Model:
db.define_table('settings',
SQLField('created_at', 'datetime', default=datetime.datetime.now
()),
SQLField('meta', 'text'),
)
Controller action:
outp = 'Long text longer than 4000 symbols'
db.settings.insert
Oracle handles DATE type similarly to DATETIME so it outputs date with
timestamp 00:00:00. If you print out SQLRow you will see that it
contains datetime.datetime(2009, 4, 6, 0, 0)
But for portablility it should be datetime.date(2009, 4, 6, 0, 0)
I could not identify correct place to patch in gluo
If you try to limitby complex query in oracle you get an error
(duplicate records). Gluon currently works well for queries like
db().select(db.details.ca_date, orderby=~db.details.ca_date, limitby=
(0,1))
but does not work for joint tables e.g.:
db(db.headers.id==db.details.header) \
.se
This code works in MySQL, SQLite:
db(cond).select(db.carts.ALL, db.c_h.cart_id.count(),
left=db.c_h.on(many_to_many),
groupby=db.carts.id,
orderby=carts_orderby,
us bad symbols here. The only workaround I have
found for now is manual removing the field from the table and running
a 'migration'. This makes me suspect that '__tmp' part of name is
bad...
On 6 апр, 14:22, SergeyPo wrote:
> One problem resolved: "ProgrammingErro
One problem resolved: "ProgrammingError: LOB variable no longer valid
after subsequent fetch "
this error can be eliminated. In gluon/sql.py modify SQL_DIALECTS for
oracle: make
'string': 'NVARCHAR2(%(length)s)',
'text': 'NCLOB',
instead of
'string': 'VARCHAR2(%(length)s)',
'text': 'CLOB',
Reaso
gth=512))
gives ORA-00911 error (bad symbol!)
sql log shows correct ALTER TABLE statements...
Anything I am missing?
On Mar 28, 1:37 pm, SergeyPo wrote:
> Sorry I was typing by memory; there is no syntax error in real code,
> database is created in reality. Only with those problems I described.
> > SQLFIELD('header_id', 'header')
> > )
>
> should be
>
> db.define_table('headers',...)
>
> db.define_table('details',
> SQLFIELD('header_id', db.header)
> )
>
> On Mar 27, 1:10 am, SergeyPo wrote:
>
code
(string, 'utf-8') and so on similar to your code in SQLTABLE truncate
does not help - Oracle VARCHAR2(255) does not let my strings in.
Thank you!
Sergey
On Mar 27, 8:29 am, mdipierro wrote:
> Thank you. Will look into these asap.
>
> Massimo
>
> On Mar 26, 9:46 am, Se
Hi all,
these probolems may be caused by unicode support by Oracle DB (or not
- I don't know). The code works fine with MySQL and SQLite.
1. DAL migrations do not work if you change length of 'string' field.
E.g. I have this:
SQLField('komment', 'string', length=255)
and I try to change it to
SQ
I like the ability to prepare forms inside controllers. This really
makes difference from Rails, for e.g. And you get much cleaner View
code.
In controller you build your form and form processing code.
In view you place your form inside HTML as single {{=form}} statement
and glue javascript etc.
Massimo,
Regarding the killer app.
I am finalizing the first version of financial risk management system
for retail banking using your wonderful framework. I have not yet
decided that I release it in open source (I defnitely have several
clients willing to buy it so at least I should sell to them
Hi all,
can you recommend an elegant way to download CSV file from web2py?
Using gluon code, I wrote a controller function that creates good CSV
for me in cStringIO object, but my recordsets are large and I'd like
to stream download file. I.e. approach when I write temp file and then
download it
have at least a constructor and two methods (getSQL and
getHTML).
On Mar 9, 10:49 am, Fran wrote:
> On Mar 9, 7:12 am, SergeyPo wrote:
>
> > session.something = Klaas()
> > #this will be stored in session and in session file you will see
> > correct pickle representation of
For second question see
http://groups.google.com/group/web2py/browse_thread/thread/a0c789cccafe8014/f1f96197a13cfeb7?show_docid=f1f96197a13cfeb7
for an idea...
On Mar 9, 7:54 am, weheh wrote:
> I'm really loving SQLTABLE and how concisely one can display a DB and
> sort columns. BUT ...
>
> 1) I
Problem solved:
that was not ajax or web2py fault. Sessions are broken when you try to
store any custom class (not only db-related class). Example:
class Klaas: pass
session.something = Klaas()
#this will be stored in session and in session file you will see
correct pickle representation of the
Thank you Massimo,
however this did not help.
--~--~-~--~~~---~--~~
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,
Sorry this is not spamming but I keep trying to fix problem with
sessions and javascript.
My site uses frames and this may lead to problems. For example the
following link from 'left' frame works (opens something in right
frame):
_onclick="javascript:top.frames['right'].location.reload()"
But th
I found other posts here with same problem, all unanswered. Please
reply do you have positive examples of jQuery sending cookies with
ajax?
I tried to pass session-id with hidden form field but get other
strange error.
Controller function (called by ajax):
from gluon.storage import Storage
def
Safari and FireFox on Mac, Fox and IE on Windows,
ajax sends only http-cookies, env cookies are empty
This is the printout from BEAUTIFY(request) - however I don't know how
to paste it retaining table structure:
application
:
advantage
args
:
body
:
', mode 'w+b' at 0x65a4530>
client
:
127.0.0.
A bit more details:
this controller function is called by ajax:
def add_filter():
#append new custom object to list in session.filter
#Filter object contains only strings and dicts
session.filter.append(Filter())
#update session.filter list with some computations, it works
up
I have strange problem when trying to make ajax calls (all with jquery
supplied with web2py). After an Ajax call previously created session
becomes lost, and new empty session is created. I tried file storage
and db sessions storage, it does not matter. After ajax call, any
other call to the site
I see what happened: I was just using version 1.47 on my development
machine, so did not see new possibilities in source code. And with all
those T2, T3 discussions in mailing list, there was a misconception
that widgets, representation and other cool stuff are provided by T2,
T3. I do not need mo
Pity that I did not grasp it from docs and this mailing list... Do I
need to import t2 or anything else to use it?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, s
For those of us who loves using SQLTABLE but is missing some simple
personalizing methods (more link columns, image instead of 'id' in
links etc.) here is very basic function. It allows to update the whole
column of a SQLTABLE object using regular expressions. I hope it helps
someone who is as laz
Hi group!
When I run py scripts within web2py context using -S -M -R flags, when
I make mistake in model files I get always the same non-informative
error:
Traceback (most recent call last):
File "web2py.py", line 5, in
start()
File "/Users/vasilina/Documents/Development/ADVANTAGE/web2p
I am sure you can do it all with Python but I think you should put
your dictionaries into underscored files and construct databases in
non-underscored.
If I uderstood you correctly you want to store a lot of meta-data with
your fields/tables definitions. Incidentally I did the same in order
to 'D
Files in /models directory get loaded automatically so you can create
as many files as you wish. I prefer this way: I name all my files with
starting underscore, this ensures that the files are loaded before
db.py In each 'underscored' file I create definitions for different
tables or sets of tabl
In case when I need to run many updates to database in long cycle,
what is preferred for speed - to have one db.commit() at the end or
commit() after every db update?
E.g.
for i in range(10):
db(db.details.id==i).update(**dict([(destination_field, i)]))
db.commit()
or
for i in rang
Hi group!
I run my own python scripts wihin web2py framework and importing
web2py models by shell comand:
python2.5 web2py.py -S appname -M -R myscript.py -d --DATE 2008-11-30
param1 param2
The above works. You see that I need to pass options to my script.
When my options coincide with web2py's
erby=db.time_based.ca_date,*full_qualifiers)
>
> On Nov 30, 4:04 am, SergeyPo <[EMAIL PROTECTED]> wrote:
>
> > Hello!
>
> > This is probably Python question, but maybe you can help:
> > I need to prepare the list of fields to be selected from DB
> > programm
Hello!
This is probably Python question, but maybe you can help:
I need to prepare the list of fields to be selected from DB
programmatically:
full_qualifiers = [] #list of SQLTABLE fields
time_based_details = db().select(*full_qualifiers,
_orderby=db.time_based.ca_date)
But Python does not a
Hi guys!
My code:
db(db.data_storage.ca_date==a_date).select(limitby=(limit, offset))
If I use a_date='2007-01-01' I get a result set (that I actually have
in database)
but if a_date='2007-1-1'or a_date='2007-01-1'or etc. - it can
not find the records dated 1st January 2007.
--~--~-
1 - 100 of 103 matches
Mail list logo