Hi,
In the last days I've been trying to use the web2py DAL to access a
public DB shema widely used in bioinformatics (BioSQL, www.biosql.org).
this schema does not follow web2py constraints, however most of the
tables have a primarykey that can be set as the 'id' fields.
howver web2py DAL as i
is no sequence in the table
first column
get_currval_string ='select ' +
column_default[0].replace('nextval', 'currval')
self.execute(get_currval_string)
return int(self.cursor.fetchone()[0])
else:
return None #or the appropr
42, mdipierro wrote:
> Thank you Andrea! these will definitively go in.
>
> Massimo
>
> On Feb 5, 5:58 am, kralin wrote:
>
> > since in the same schema there are many to many tables with no primary
> > key,
> > a further improvement to the one described above can permit
; to fix. Please if you make these patches use dal.py, not sql.py.
>
> On Feb 5, 8:51 am, kralin wrote:
>
> > you're welcome.
> > since I'm dealing with tables without primarykeys in legacy
> > is there some web2py "standard" behaviour for this case?
so if i have no primary key should i use an empty list? []
On 5 Feb, 17:55, DenesL wrote:
> primary_key must be a list of fields from the table
>
> On Feb 5, 10:06 am, mdipierro wrote:
>
> > I do not know. You need to try that. I think if you use keyed tables
> > with primary_key=None most of it
would consider this a bug.
> How would you insert/retrieve/... records without a key?.
> Unless it has been changed to support it, this was not part of my
> original code.
>
> On Feb 5, 1:12 pm, kralin wrote:
>
> > so if i have no primary key should i use an empty list? []
>
> > On Feb 8, 5:02 am, kralin wrote:> well, a
> > primary key is always a good thing in a table, but
> > > not everybody seems to use it, particularly in many to many tables.
>
> > > while this is not in the web2py specifications( by not requiring a
> &
2 is unique?
if not are you planning to add constraint support to DAL?
I know this can be done in the application, and I'm doing this way...
On 10 Feb, 03:18, DenesL wrote:
> Don't wait for me, currently I have no plans to work on this.
>
> On 9 feb, 10:47, kralin wrote:
y you can only set unique multicol constraints at
> the web2py level (IS_NOT_IN_DB(subset,...)).
> This could be added but would make migrations a nightmare.
>
> Massimo
>
> On Feb 12, 8:42 am, kralin wrote:
>
> > I've being doing some testing
> > and actually
Hi All,
I'm diving into web2py that at the moment gives me the power and the
time do a lot of cool things. so thanks a lot to you guys.
I was wondering if any of you ever had the need to set a queue for a
heavy process.
Let's suppose I've got one heavy process that takes 2 mins to run on a
singol-
including
> cron scripts. I am not sure if the lock is really necessary (because
> of the global interpreter lock) but it is safe.
>
> queue.append(
>
> On Jul 9, 4:07 pm, kralin wrote:
>
> > Hi All,
> > I'm diving into web2py that at the moment gives me the powe
process in queue each
time the controller is called by the cron,
one by one, but I'm still convinced that using cron is not the best
way to do this, even if it works.
Am I the only one with this kind of issues? If not maybe I can post
the "solution" to AlterEgo...
On Jul 10, 3:19
sks returns.
>
> Massimo
>
> On Jul 10, 8:11 am, kralin wrote:
>
> > I finally made it, at least for now.
>
> > There is a database table where all the processes are stored, both to
> > be processed and completed ones.
>
> > db.define_t
task())
> return dict(myresult='myresult')
>
> Note that if your web server kills processes that work too long you'll
> have to increase the timeout.
>
> On Jul 10, 4:07 pm, kralin wrote:
>
> > I'm actually using the web2py cron.
> > Is the
I spent the whole afternoon trying to send an HTML formatted email
with web2py.
while I cannote use smtplib directly, cause it seems not to work, and
I think this should be "normal" in the framework.
however in the current release (Version 1.65.0 (2009-07-01 12:16:25))
it is not possible to alter
d html
> emails. You need to use the MIME encoding and that should be
> transparent to what mail.send does now. If I am wrong please provide
> an example of how to change the headers to send a MIME encoded
> message.
>
> On Jul 10, 1:31 pm, kralin wrote:
>
> > I spent the wh
ou
> want to send MIME you should not use Mail native SMTP.
>
> On Jul 10, 4:31 pm, kralin wrote:
>
> > I've also tried to use MIME to encode both the html, and an
> > alternative text/html message, however all the encoding goes after
> > the double newline
>
ehlo()
> server.login(username, password)
> server.sendmail(sender, to, msg)
> server.quit()
>
> look into the docs for datils. Mind that the docs say .ehlo and .helo
> are the same. They are not. The latter does not work with starttls
>
> On Jul 10, 4:46 pm, kralin wrote:
>
&g
I just discovered thsi LOAD function and I'm loving it!
very well done guys!! :)
just one question, I'm loading via ajax a div that takes some seconds
to come up.
in the mean time a 'loading...' string appears in the div.
is there a way to specify what has to be written (and how) while
loading?
Hi everybody,
this is my first post here.
I'm learning to use web2py since a month now, and I really appreciate
it's simplicity and speed of use.
However, I've got a problem I'm not able to solve by myself.
I read the manual and searched everywhere, but I still cannot find any
hint. So you guys ar
TY(), IS_IN_DB_OR_ADD
> > (db,'keys_table.key_name')
>
> > Hope it make sense.
>
> > (may contain a typo). If it works fine, could you post an AlterEgo
> > entry about this?
>
> > Massimo
>
> > On Feb 26, 10:03 am, kralin wrote:
>
&g
Hi,
I've got a sistem with multiple db, some are SQLlite, some are
postgresql and one in MSSQL.
is there a way to use auth authorization within tables that do not
belongs to the db where auth data is specified?
in the auth_permission table, I'm only required to add a table name,
but what if the ta
n the has_permittion
method of auth.
let me check...
On 23 Nov, 14:41, mdipierro wrote:
> You just need to remove the validator:
>
> db.auth_permission.table_name.requires = None
>
> On Nov 23, 6:19 am, kralin wrote:
>
>
>
>
>
>
>
> > Hi,
>
yes, my db objects are unfortunately too complex to be used with CRUD.
so no prob.
it worked well!
thanks a lot, again ;)
hope this helps someone else...
On 23 Nov, 15:37, mdipierro wrote:
> On Nov 23, 8:31 am, kralin wrote:
>
> > Thanks Massimo,
> > this works, but will
Hi guys,
I've been trying to use legacy postgres databases that uses a custom
sequence name.
I'm able to read and write a table, by specifying the sequence_name
parameter when declaring the Table object
lets say:
table_name = 'table'
db.define_table(table_name,
Field('%s_id'%table_nam
here it is:
http://code.google.com/p/web2py/issues/detail?id=167
thank you.
On 26 Gen, 15:58, Massimo Di Pierro
wrote:
> This is a possible bug. Could you please open a googlecode issue?
> Thanks.
>
> Massimo
>
> On Jan 26, 4:15 am, kralin wrote:
>
>
>
>
&g
there is also the "problem" that a default sequence is created by DAL
even if no sequence_name is specified, or sequence_name is set to
None.
still I don't know if this was the intended behavior.
On 26 Gen, 16:51, kralin wrote:
> here it is:
>
> http://code.google.co
this should be self explanatory
http://vimeo.com/33670166
I was using fluxflex and their great integration with github, too bad they
are no longer in business.
I'm going to try pythonanywhere now.
On Thursday, June 7, 2012 11:06:26 PM UTC+1, Omi Chiba wrote:
>
> Bruno,
>
> I'm interested in pyt
I've been testing the web2py-for-fluxflex github forking approach
and it works very well.
however there is one problem when I deploy to fluxflex all the views
that goes through generic.html
gets 404 error. I'm using the 1.99.2 web2py version. maybe this is
related to routes, but I
don't have acces
escribed above.
>
> Regards,
>
> Marin
>
> On Oct 7, 11:26 am, kralin wrote:
>
>
>
>
>
>
>
> > I've been testing the web2py-for-fluxflex github forking approach
> > and it works very well.
> > however there is one problem when I deploy to
30 matches
Mail list logo