you need to db.commit() after creating the table
Il giorno mercoledì 10 luglio 2013 09:21:39 UTC+2, Prasad Muley ha scritto:
Hello all,
I have created one table called 'Programmer'. Table
creation is done successfully but whenever I tried to insert data it shows
me
Just to be clear on my requirement :
Taking Image Blog example provided in web2py manual, I want to achieve
the following functionality :
1) Multiple user's to be able to add images.
2) There should be one View Records page which should display all the
records with buttons like
https://groups.google.com/d/msg/web2py/feh1ksfdkGk/YoY9jUTXDi4J
Il giorno mercoledì 10 luglio 2013 11:50:16 UTC+2, Sushant Hosley ha
scritto:
Can we write postgis (postgresql) queries i.e spatial queries in web2py .
if yes please explain with an example ,
--
---
You received this
post your sql.log .
Il giorno mercoledì 10 luglio 2013 17:45:30 UTC+2, Ramos ha scritto:
I started a new mysql database to make sure the no table exists.
Still the same error
( I´m using mysql on amazon RDS )
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
Not sure what is going on here. The code that I posted above generates the
following SQL which does not make sense
SELECT risks.id, risks.title, risks.status, risks.description, risks.
event_description, risks.cause_description, risks.result_description, risks.
team, risks.user,
Finally, I am able to do it :)
http://www.web2pyslices.com/slice/show/1622/how-to-authorize-users-editing-records-only-for-records-that-were-created-by-tho
On Thursday, July 11, 2013 12:37:53 PM UTC+5:30, Sarbjit singh wrote:
Just to be clear on my requirement :
Taking Image Blog example
as you can see it holds all the commands issued to the database. It will be
more helpful if you move databases/sql.log to sql.log.bak and let web2py
recreate to see what commands are indeed failing. your current one shows
ALL the history including the creation of the tables in your previous
Il try that.
Thank you Niphold for your time, as always :)
Best regards
António
2013/7/11 Niphlod niph...@gmail.com
as you can see it holds all the commands issued to the database. It will
be more helpful if you move databases/sql.log to sql.log.bak and let web2py
recreate to see what
here the new log
timestamp: 2013-07-11T11:46:35.319760
CREATE TABLE t_docs(
id INT AUTO_INCREMENT NOT NULL,
f_trab_ref INT, INDEX f_trab_ref__idx (f_trab_ref), FOREIGN KEY
(f_trab_ref) REFERENCES trabalhador (id) ON DELETE CASCADE,
f_titulo VARCHAR(512),
f_doc VARCHAR(512),
the same error ( previous email i deleted the sql.log)
Traceback (most recent call last):
File /home/ubuntu/web2py/gluon/restricted.py, line 212, in restricted
exec ccode in environment
File /home/ubuntu/web2py/applications/EMPRE/models/db.py
db( (db.MatchPlayers.player==playerID) (db.MatchPlayers.match_ ==
db.Matches.id) (db.Matches.started == None) ).delete()
gives:
raise RuntimeError(Too many tables selected)
any hints?
http://web2py.com/books/default/chapter/29/06#count,-isempty,-delete,-update
I don't find examples for
You cannot update() or delete() when there are joins.
From which table do you want to delete records? MatchPlayers or
Matches? Or both?
If you set the ondelete=cascade (I think it's the name of it) in your
parent table, children records will be deleted when you delete one
record from it.
On
From which table do you want to delete records?
MatchPlayers , but Matches would be left intact
--
---
You received this message because you are subscribed to the Google Groups
web2py-users group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
ps: by the way, would be nice to have a shortcut
db( (db.MatchPlayers.player==playerID) (db.MatchPlayers.match_.started ==
None) ).
(for me it didn't work, but in in W2P nonquery syntax this works (and in
Django such magic works i queries, if I recon correctly )
2013 m. liepa 11 d.,
there's no support for deleting records that are a result of a join.
However, if you are NOT using the devious mysql, you can delete a subselect.
db(db.whatever.field.belongs(yourquery_withjoins._select()).delete()
Il giorno giovedì 11 luglio 2013 14:17:46 UTC+2, Jurgis Pralgauskis ha
scritto:
then t_docs is definitely ALREADY there!
error 150 from mysql means I can't create a table cause it's already
there.
And there's no way that web2py on an empty database is creating a table two
times unless you're fiddling badly with your models.
--
---
You received this message because
I have a controller method with a SQLFORM.grid in it.
The following setup:
query = db.pricingIngredient.pricingIngredientId 0
left =
[db.productSite.on(db.pricingIngredient.productSiteId==db.productSite.productSiteId),
db.site.on(db.productSite.siteId==db.site.siteId),
It was working with sqlite !
i use mysqlworkbench and it is not there that table!!!
i read that error 150 could be this
In addition to SHOW
ERRORShttp://dev.mysql.com/doc/refman/5.6/en/show-errors.html,
in the event of a foreign key error involving InnoDB tables (usually Error
150 in the MySQL
I don't think it's portable accross different rdbms.
One can use raw sql as a last resort, if there are many Matches in
this situation.
On Thu, Jul 11, 2013 at 10:42 AM, Niphlod niph...@gmail.com wrote:
there's no support for deleting records that are a result of a join.
However, if you are
I was able to import rows which have minimal quotes, using the default
import settings.
Here is a sample row which worked for me:
Atlanta,4214,GANGV19175,GANGV1917,S2C1,437,RBS6601W,15-B
I think to get the represent in csv you need a custom csv export
function... I understand you want represent in SQLFROM.grid... Sorry.
Richard
On Wed, Jul 10, 2013 at 5:49 PM, greenpoise danel.sega...@gmail.com wrote:
read it. Dont have a clue yet.. If I use represent, the values wont show
Personnaly, I use Datatables.net and it button export facility...
Richard
On Thu, Jul 11, 2013 at 11:28 AM, Richard Vézina
ml.richard.vez...@gmail.com wrote:
I think to get the represent in csv you need a custom csv export
function... I understand you want represent in SQLFROM.grid...
Hello,
I would like to know when the browser have finish to receive a file with
response.stream(file)... Is any one had implement something about that?
First answer here explain a technic
:
http://stackoverflow.com/questions/1106377/detect-when-browser-receives-file-download
Thanks
Richard
Thanks a lot Alan for the idea, I just tested and I had to do some
modifications to the code:
pdfasastring = fpdfobject.output(dest=S)
import StringIO
sio = StringIO.StringIO()
sio.write(pdfasastring)
sio.seek(0)
The following instruction create a mime type for the attachment and now,
the
THX.
W dniu sobota, 29 grudnia 2012 06:48:51 UTC+1 użytkownik Richard Penman
napisał:
These work:
DAL(uri, migrate=False, fake_migrate=False)
DAL(uri, migrate=False, fake_migrate=True)
These produce Runtime error:
DAL(uri, migrate=True, fake_migrate=False)
DAL(uri, migrate=True,
I am using trunk and I cannot reproduce this.
On Monday, 8 July 2013 04:22:12 UTC-5, Edwin Haver wrote:
Hello,
The SQL statement produced by the following query is trimmed or cut-off
somehow and therefore produces an error. Surely this must be a bug?
In [5] : print
It is possible to use matplotlib but do not use the pylab interface because
it is not thread safe.
Use this or examples of code from it:
https://github.com/mdipierro/canvas
On Monday, 8 July 2013 10:43:34 UTC-5, Lamps902 wrote:
Is it possible to use pylab in web2py to generate a visualization?
1) Do not do .sys.path.append(...) in a controller. it is not thread safe
and you will end up with a memory leak.
2) You should use processing.Popen('external script') you can cache in ram
the resulting object.
On Monday, 8 July 2013 14:20:56 UTC-5, pratt wrote:
*
*
*I would like to run the
Do not use pylab, not thread safe. Use the normal OOP interface to
matplotlib. Here is an example:
https://github.com/mdipierro/canvas/blob/master/canvas.py#L27
On Monday, 8 July 2013 12:38:56 UTC-5, Lamps902 wrote:
I'm attempting to do the following:
img_buffer = io.BytesIO()
It is true but not an issue. Django is faster only in hello world examples
because does not perform as many header validation/conversions as web2py
does and because you cannot turn off sessions in web2py. As soon as one
uses templates, web2py is faster. If you use databases the speed is about
Thanks Richard! appreciate your help! I might revisit datatables. I
remember trying it before.
THanks again!
d
On Thursday, July 11, 2013 8:30:03 AM UTC-7, Richard wrote:
Personnaly, I use Datatables.net and it button export facility...
Richard
On Thu, Jul 11, 2013 at 11:28 AM,
I see.
In that case, I think it would be advisable to note that in presentations,
as peope might get the wrong impression...
On Thursday, July 11, 2013, Massimo Di Pierro massimo.dipie...@gmail.com
wrote:
It is true but not an issue. Django is faster only in hello world
examples because does not
The current calendar.js is fine for date picker, but for datetime picker it
is not so good; select a specific time is a headache.
It seems this one is superior:
http://tarruda.github.io/bootstrap-datetimepicker/
I wanted to swap out but that doesn't seem to be easy. Any idea?
Thanks,
VP
I can save you some time with the initialization, just ask here I will take
look a couples more times...
On Thu, Jul 11, 2013 at 12:47 PM, greenpoise danel.sega...@gmail.comwrote:
Thanks Richard! appreciate your help! I might revisit datatables. I
remember trying it before.
THanks again!
What is difficult is communicating asynchronously with the script.
You can use processing.Popen to start the script. Here is an example inside
existing web2py code:
https://github.com/web2py/web2py/blob/master/applications/admin/controllers/gae.py#L77
On Tuesday, 9 July 2013 06:43:39 UTC-5,
blobs in DB are base64 encoded in ram. that menas you probably need twice
that in ram.
On Wednesday, 10 July 2013 06:32:34 UTC-5, Joel Samuelsson wrote:
Hi,
I am using an sqlite db to store a blob locally. The blob is a pickled
file of a list I have in memory. Reading the entire list into
Have you given jQuery UI a chance?
You can roll your own themes to match your site, too:
http://jqueryui.com/datepicker/
On Thursday, July 11, 2013 9:51:34 AM UTC-7, VP wrote:
The current calendar.js is fine for date picker, but for datetime picker
it is not so good; select a specific time is
Hey Massimo et al,
Your diligence in forums in commendable, and it definitely helps in times
like this!
I have a situation where I want to run basic auth in a single controller
only, and, instead of authenticating against the auth_user table, I want to
do my own custom username/password
grid can only edit one table. smartgrid can edit referenced tables but not
join them.
Unfortunately we cannot support both because logically it would be too
complex. You can create your own custom button.
On Thursday, 11 July 2013 09:02:09 UTC-5, Jim S wrote:
I have a controller method with
I agree. I will do.
On Thursday, 11 July 2013 11:51:39 UTC-5, Arnon Marcus wrote:
I see.
In that case, I think it would be advisable to note that in presentations,
as peope might get the wrong impression...
On Thursday, July 11, 2013, Massimo Di Pierro
massimo@gmail.comjavascript:
The requirement is to have a calendar that does not depend on other JS
(apart for jQuery) and CSS and supports both date and datetime.
Does the calendar you propose meet these specs?
On Thursday, 11 July 2013 11:51:34 UTC-5, VP wrote:
The current calendar.js is fine for date picker, but for
Massimo:
I just came across it, so I don't know 100% for sure. But I think it only
depends on bootstrap which is included in web2py.
On Thursday, July 11, 2013 12:11:28 PM UTC-5, Massimo Di Pierro wrote:
The requirement is to have a calendar that does not depend on other JS
(apart for
I think I saw some light in here! this did the trick for me:
Field('supplier', 'reference supplier',compute=lambda row:
db.series(row.series).supplier),
didnt know you could do that. Thanks Richard for the offer. I might come
back to it later on though! :)
On Thursday, July 11, 2013
Thanks for the reply Massimo. I know grid can only edit one table and that
is what I want. I'm just wondering how it chooses which table it is
editing if the left parameter is specified. Also, in my example above, it
should be
grid = SQLFORM.grid(query, left=left)
-Jim
On Thu, Jul 11, 2013
But we do not want the popup to break when people replace bootstrap with a
different style.
On Thursday, 11 July 2013 12:19:33 UTC-5, VP wrote:
Massimo:
I just came across it, so I don't know 100% for sure. But I think it only
depends on bootstrap which is included in web2py.
--
---
Good point! It should be the first table mentioned in the query but, this
could be customizable. Please open a ticket about this.
On Thursday, 11 July 2013 12:47:42 UTC-5, Jim S wrote:
Thanks for the reply Massimo. I know grid can only edit one table and
that is what I want. I'm just
I'll make up a little test app, submit a ticket and add the app for testing.
On Thu, Jul 11, 2013 at 1:04 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
Good point! It should be the first table mentioned in the query but, this
could be customizable. Please open a ticket about this.
I have a field that is similar to this: Field('fav',
requires=IS_IN_SET(['red','green','blue')], multiple=True))
Let's say I have an entry with this field selected with multiple values.
On an update form, the existing values should have been selected. But
they are not selected. I think
On Thursday, July 11, 2013 1:21:11 PM UTC-4, greenpoise wrote:
I think I saw some light in here! this did the trick for me:
Field('supplier', 'reference supplier',compute=lambda row: db.series(row.
series).supplier),
Should be the same as:
lambda row: row.series.supplier
assuming
Dear web2py,
I recently tried to re-initialize the web2py admin password for my website,
joecodeswell.com , on Webfaction using CentOS 6 - 64bit.
I followed Alexandre Andrade's post
herehttps://groups.google.com/forum/#!topic/web2py/WEXWcAP52IY.
But i continually get invalid password.
After search I found the solution to this. The type of the field should
be list:string.
Thanks.
On Thursday, July 11, 2013 1:18:18 PM UTC-5, VP wrote:
I have a field that is similar to this: Field('fav',
requires=IS_IN_SET(['red','green','blue')], multiple=True))
Let's say I have
But in this case you don't have the id of the referenced record as relation
key... I am not sure it's what you want. But you question is really vague
so difficult to answer correctly to your I think :P
Richard
On Thu, Jul 11, 2013 at 2:21 PM, Anthony abasta...@gmail.com wrote:
On Thursday,
Oops, sorry, I read that wrong -- thought it was a represent function
rather than a compute function. Yes, not sure you want to store a value
other than the db.series.id value in a reference field for db.series.
Anthony
On Thursday, July 11, 2013 2:39:39 PM UTC-4, Richard wrote:
But in this
Ticket 1581
On Thursday, July 11, 2013 1:13:06 PM UTC-5, Jim S wrote:
I'll make up a little test app, submit a ticket and add the app for
testing.
On Thu, Jul 11, 2013 at 1:04 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
Good point! It should be the first table mentioned
I agree it is nicer and easier to use than the current date/time popup.
Yes, it does support time. Is there a way it could be an optional feature
you could turn on if you're using bootstrap?
-Jim
On Thursday, July 11, 2013 1:03:09 PM UTC-5, Massimo Di Pierro wrote:
But we do not want the
(Original
questionhttp://stackoverflow.com/questions/16783197/web2py-compile-slowing-down-response-timesposted
to SO, but I realized this may be a better venue)
I am trying to boost the performance of a web2py application I have running
so I turned on the profiler and noticed an item that is
Let's please move this discussion on web2py-developers. Open a new thread.
Anyway. There are two possibilities:
1) calls to re.compile (compiles regular expressions) there are many but
should only happen at startup
2) https://github.com/web2py/web2py/blob/master/gluon/restricted.py#L194
This
I just thought, could the following be causing a problem?
$ uname -a
Linux web396.webfaction.com 2.6.32-358.2.1.el6.x86_64 #1 SMP Wed Mar 13
00:26:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ python
Python 2.7.5 (default, May 16 2013, 20:16:09)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)] on linux2
Hello Joe,
I think you want this : sudo -u www-data python -c from gluon.main import
save_password; save_password('123456',443)
Change the 443 for the appropriate port you use to connect and obviously
replace 123456 by you desired password...
Richard
On Thu, Jul 11, 2013 at 2:22 PM,
Ok..I started playing around with an empty and smaller database for the
sake of speed. This is what I have:
db.define_table('supplier',
Field('suppliercode'),
Field('suppliername'),
format='%(suppliercode)s')
db.supplier.suppliercode.requires =
Thanks, Richard. I'll give this a try.
Love and peace,
Joe
On Thursday, July 11, 2013 1:07:50 PM UTC-7, Richard wrote:
Hello Joe,
I think you want this : sudo -u www-data python -c from gluon.main import
save_password; save_password('123456',443)
Change the 443 for the appropriate port
Ok, figured it out. The format specifier in the 'requires' is the magic
one, not the one in the 'represent'. So my original:
db.script.configs.requires = IS_IN_DB(db, db.config, '%(name)s',
multiple=True)
Became:
db.script.configs.requires = IS_IN_DB(db, db.config, lambda r:
requires for dropbox control representation (in you requires : '%(name)s'
is what determine what are you option format)
represent for representation on select
Richard
On Thu, Jul 11, 2013 at 4:18 PM, Michael Nagy mn...@voalte.com wrote:
Ok, figured it out. The format specifier in the
Hmmm... I think your model is wrong...
You can't use a compute on a reference field..
What you are trying to do exactly?
Why you need to concatenate thing? For representation purpose?
I think I really can help you what you need is easy but I can't understand
your goal from the model you
haa..Its an odd model I know. But it works!! punch it in in a blank project
and you will see..
With my model I am trying to:
1. Concatenate the fields I just mentioned
2. I want to compute the supplier code for products so I dont have to
add/select it in over and over.
3. I want to export the
So you don't want to reference the series and supplier... So, I think that
your model should be better in this case if your field were of type
'string', since you control the contain of the dropbox with requires anyway.
That said... What I still don't understand is that you just seems to want
the
Must probably because I dont know! :( Let me give it a try what you just
posted and will write back. Thanks!
On Thursday, July 11, 2013 1:58:10 PM UTC-7, Richard wrote:
So you don't want to reference the series and supplier... So, I think that
your model should be better in this case if
I have *2.5.1 *and if I filter results and click on csv export, I also get
a blank csv file..
On Monday, April 15, 2013 5:47:16 PM UTC-7, Tito Garrido wrote:
Hi Folks,
When I use the search field to filter the results and click on csv to
export the result I get a 0 byte file... is it
I just posted a question about 30 minutes ago, and I don't see it in the
forum anywhere.
I thought if I just waited it would show. It was regarding what I think
might be a bug in IS_MATCH()
--
---
You received this message because you are subscribed to the Google Groups
web2py-users
I have a form with a text input, and I want to make sure the user entry is
prefixed with a specific UNC path.
For example:
\\server\blah\blah\file
is acceptable
\\bad\boo\hoo
is not.
In order to get this to work, I've tried the following, among other things:
INPUT(_name='file',
Maybe try:
IS_MATCH(r'server\\', 'You must provide a valid location')
Anthony
On Thursday, July 11, 2013 6:00:46 PM UTC-4, Josh Grigonis wrote:
I have a form with a text input, and I want to make sure the user entry is
prefixed with a specific UNC path.
For example:
Or alternatively:
IS_MATCH('server', 'You must provide a valid location')
but don't do that. ;-)
For more details, see
http://docs.python.org/2/howto/regex.html#the-backslash-plague.
Anthony
On Thursday, July 11, 2013 8:15:56 PM UTC-4, Anthony wrote:
Maybe try:
Massimo, how about you writing an article about this subject and share with us?
So, this could be spread.
On Thu, Jul 11, 2013 at 2:12 PM, Massimo Di Pierro
massimo.dipie...@gmail.com wrote:
I agree. I will do.
On Thursday, 11 July 2013 11:51:39 UTC-5, Arnon Marcus wrote:
I see.
In that
Hi Viniciusan
Can you share the link of that thread.
Thanks
On Tuesday, 9 July 2013 17:13:39 UTC+5:30, viniciusban wrote:
Yes, it is possible.
I answered the same question yesterday, in another thread.
On Tue, Jul 9, 2013 at 7:39 AM, Rohitraj Sharma
rohitra...@themislexsol.com
Please open a ticket. Will review this asap.
On Thursday, 11 July 2013 16:42:35 UTC-5, greenpoise wrote:
I have *2.5.1 *and if I filter results and click on csv export, I also
get a blank csv file..
On Monday, April 15, 2013 5:47:16 PM UTC-7, Tito Garrido wrote:
Hi Folks,
When I use
75 matches
Mail list logo