On 12 May 2012 21:04, Sebastian E. Ovide wrote:
>
> what problems have you got moving the DB to another computer ?
>
As I understand it the id's get rebuilt if you export a table as csv-file
and import it on another computer. When the whole database gets exported
and imported the relationship
I am working on candidate employment tracking portal.. wherein the
requirement is to collect Permanent Address, Current Address.
Situation is similiar to Shipping and Billing Address scenario...
Also how should i separate the address details in 2 different tables and
link to main registration t
Hi there,
1. I am working at my first mobile website recently. At first I spent
(quite) some time to know and download the hard-to-find
web2py.plugin.jqmobile.w2p, then I realize the main resource I need is just
its views/plugin_jqmobile/layout.html, so it comes to an idea. Why not just
pack t
Hi Massimo,
thanks for you help!
i'm going ahead with little steps, i stored your code in a web2py controller :
mpl.py espone index, plot_interference
i tried it without modification, or just changing the return function to :
return dict(image=plot(data={'interferemce':[(x,x**2) for x
>
>
>
> As I understand it the id's get rebuilt if you export a table as csv-file
> and import it on another computer. When the whole database gets exported
> and imported the relationships stays consistent.
>
>
Yes, I've learned this the hard way. Moving the database between computers
is OK
*In the following code I create a new table in db1. However when I open a
second DAL connection to the same database the new table is not shown. Why
is that?*
*
*
*db1 = DAL('sqlite://storage.sqlite', folder=dbfolder, auto_import=True)*
*print(db1.tables)*
*
*
*db1.executesql("DROP TABLE IF EXIST
I don't think you are supposed to open more than one connection to a SQLite
database at a time. It is file-based and doesn't have multi-connection
abilities like other databases like MySQL and PostgreSQL.
On Monday, May 14, 2012 7:29:44 AM UTC-4, simon wrote:
>
> *In the following code I create
Hi,
I'm porting a commercial project from django + djangoappengine (
http://www.allbuttonspressed.com/) to web2py and one thing I could'nt find
at all is how to manage per field indexes on App Engine.
My project is database intensive so every entity is written hundreds of
thousend times a day a
I would like to see the implementation. I am pretty sure this will break
the bytecode compilation of apps.
On Monday, 14 May 2012 04:30:23 UTC-5, Ray (a.k.a. Iceberg) wrote:
>
> Hi there,
>
> 1. I am working at my first mobile website recently. At first I spent
> (quite) some time to know and do
After you define your custom auth_user table, you still have to call:
auth.define_tables()
Anthony
On Monday, May 14, 2012 6:44:45 AM UTC-4, Yogesh Kamat wrote:
>
> AttributeError: 'NoneType' object has no attribute 'fields'
>
> Getting the above mentioned error.
>
> I have just created a custo
On Monday, May 14, 2012 8:41:59 AM UTC-4, Massimo Di Pierro wrote:
>
> I would like to see the implementation. I am pretty sure this will break
> the bytecode compilation of apps.
>
{{extend response.layout or "layout.html"}}
Yes -- to compile, the view to extend has to be known at compile time,
Can you pack and attach a minimal app the reproduces the problem?
On Monday, May 14, 2012 2:08:47 AM UTC-4, Larry Weinberg wrote:
>
> I'm not sure if this is web2py question or javascript related issue.
>
> In an HTML view I am trying to call a subview with a form in it that has a
> jquery
> auto
Some databases allow you to temporarily turn off auto-generating IDs so
that you can import a table keeping its original IDs intact. I wrote a
database abstraction layer a few years back for another project that
specifically allowed you to make an identical copy of a database from a
MySQL datab
Definitively. Please open a ticket about this. Thanks Ross.
On Monday, 14 May 2012 07:58:57 UTC-5, Ross Peoples wrote:
>
> Some databases allow you to temporarily turn off auto-generating IDs so
> that you can import a table keeping its original IDs intact. I wrote a
> database abstraction layer
According to the sqlite FAQs http://www.sqlite.org/faq.html#q5
"Multiple processes can have the same database open at the same time.
Multiple processes can be doing a SELECT at the same time. But only one
process can be making changes to the database at any moment in time,
however. "
On Monday
I have created issue
796: http://code.google.com/p/web2py/issues/detail?id=796
While creating the issue, I noticed that I had made an error with the MSSQL
part. This was corrected in the issue.
Flatpages plugin
https://groups.google.com/forum/?fromgroups#!topic/web2py/sgbPpPZ4QX8
answered all my questions at this time
Thanks
On 14 May 2012 15:36, Ross Peoples wrote:
> I have created issue 796:
> http://code.google.com/p/web2py/issues/detail?id=796
>
>
>
Thanks Massimo, Ross. This will be of great help.
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (P
Even if I remove "fieldname", et.al. after the table name, no data.
On Friday, May 11, 2012 8:13:59 PM UTC-4, Larry Wapnitsky wrote:
>
> better, but still no data showing up.
>
> On Fri, May 11, 2012 at 7:23 PM, Massimo Di Pierro <
> massimo.dipie...@gmail.com> wrote:
>
>> The second argument is t
Flatpages plugin
https://groups.google.com/forum/?fromgroups#!searchin/web2py/Mariano$20Reingart$20$20flatpages
answered all my questions at this time
and is a good point to start with
Thanks
On Monday, April 23, 2012 1:38:24 AM UTC+2, yus wrote:
>
> Hi all,
>
> I just joined this group. I am ne
Flatpages plugin
https://groups.google.com/forum/?fromgroups#!searchin/web2py/Mariano$20Reingart$20$20flatpages
answered all my questions at this time
and is a good point to start with
Thanks
hello one and all,
i am trying to create a form to takes people's opinion within each section
contained by a DIV. so my html page might have one or ten sections, each
one containing a loop created form. so here is some pseudo code:
first the table structure:
db.define_table('lecture_item_opin
On Monday, May 14, 2012 8:56:41 PM UTC+8, Anthony wrote:
>
> On Monday, May 14, 2012 8:41:59 AM UTC-4, Massimo Di Pierro wrote:
>>
>> I would like to see the implementation. I am pretty sure this will break
>> the bytecode compilation of apps.
>>
>
> {{extend response.layout or "layout.html"}}
>
>
Where's the logic for processing the form? Note, if you've got multiple
forms on the same page, they each need a unique name -- see
http://web2py.com/books/default/chapter/29/7#Multiple-forms-per-page.
Anthony
On Monday, May 14, 2012 10:12:30 AM UTC-4, lucas wrote:
>
> hello one and all,
>
> i
Is it possible to have a nested CRUD form?
>From a logical perspective it sometime doesn't make sense, for
example, to add an Address before you add a Customer.
db.define_table('address',
Field('line1','string', required=True),
Field('line2','string'),
Field('suburb','string', require
In my experience, "can" doesn't always mean "should". There may be an issue
with db2 not seeing the table definitions from db1. For testing, do
something like this to explicitly share the "test" table definition:
def define_tables(db, migrate=False):
db.define_table('test', Field('testfield')
Think you should read the book section about more then one form per page
and about component. What you want to do is hide a second form in the same
page... Those form should be embeded in the page as component en then you
have to write the proper logic in ajax and jQuery to make appears your
second
Hi,
There is a {{super}} syntax to bring the parent block. Fine. (See its doc
here. http://web2py.com/books/default/chapter/29/5#Blocks-in-views )
But if using {{block undefined_block}}{{super}}{{end}} will generate error
ticket. This brings trouble if I am switching different layouts for some
I'm reading through the profile log, not that I'm an expert on profiling or
anything, but I do have a few possible tips:
1. Most of your calls are done in ~86 ms. That's pretty respectable.
2. Most of your time is spent on database calls, with compiling being
the second biggest time co
While not the prettiest solution, you can always use
{{try:}}{{super}}{{catch}} in views. I know that sounds like a bandaid, but
I think an exception is the desired behavior here. Otherwise, returning an
empty string would make troubleshooting difficult if you accidentally
mistyped the name of
>
>
>1. Your "adviewer/viewads" makes 10 calls to the database. Try to
>optimize this either by writing fewer queries, creating a view, and/or
> only
>selecting fields that you need. Also make sure you get the criteria right
>so that you (ideally) don't have any extra, unneeded
Correction, that should be:
{{try:}}{{super}}{{catch:pass}}
On Monday, May 14, 2012 11:45:37 AM UTC-4, Ross Peoples wrote:
>
> While not the prettiest solution, you can always use
> {{try:}}{{super}}{{catch}} in views. I know that sounds like a bandaid, but
> I think an exception is the desire
Guess you mean {{try:}}{{super}}{{except: pass}}
Unfortunately it fails too.
So a fix is a must?
Regards,
Ray
On Monday, May 14, 2012 11:50:45 PM UTC+8, Ross Peoples wrote:
>
> Correction, that should be:
> {{try:}}{{super}}{{catch:pass}}
>
>
>
> On Monday, May 14, 2012 11:45:37 AM UTC-4, Ross
Hello,
I wonder if some of the speed problem that web2py has could be address by
translate some of the web2py module into C??
There is already many walk around for speed problem, but could there is
some major speed improvement by rewrite some of web2py fondation into C?
I am just curious about t
On Monday, May 14, 2012 11:50:06 AM UTC-4, Anthony wrote:
>
>
>>1. Your "adviewer/viewads" makes 10 calls to the database. Try to
>>optimize this either by writing fewer queries, creating a view, and/or
>> only
>>selecting fields that you need. Also make sure you get the criteria r
The problem with doing it as a C module is that it would have to be
compiled. I know that this is something that has been mentioned before but
was shot down because web2py wouldn't be easily accessible, modified, etc,
which is the goal of web2py. Alternatively, maybe running web2oy in PyPy
envi
This is cool : cache.ram.clear(key)
I didn't thought about it, I figure out that you trigger this in the
function that create new records for a given cached select... Good trade
off with caching and up to date select.
Thank for this one Ross.
Richard
On Mon, May 14, 2012 at 12:02 PM, Ross Peop
Yes right, it could not be anymore included into a single zip file that you
just unpack and good to go.
About PyPy, I read long time ago from someone that has make works web2py
with it that there was not that much speed improvement.
Richard
On Mon, May 14, 2012 at 12:06 PM, Ross Peoples wrote:
the issue is definitely the missing definition of the table on the second
connection.
Remember that DAL does NOT introspect databases.
You can have potentially 31098312098 tables in a database, and define only
one, and you'll be able to access that via DAL (of course with executesql
there is an
definitely the way to go, I faced the issue before myself, sorry not to
have reported that ;-)
I don't think it's a issue per se, scheduler is quite nice to manage at
"low level".
Il giorno lunedì 14 maggio 2012 04:46:11 UTC+2, Yarin ha scritto:
>
> Sorry, figured this out- db calls made with th
Niphlod,
I thought that with postgres you were stock at 1000 columns :)
Richard
On Mon, May 14, 2012 at 12:19 PM, Niphlod wrote:
> the issue is definitely the missing definition of the table on the second
> connection.
> Remember that DAL does NOT introspect databases.
>
> You can have potenti
>
> If you want to use db.executesql() but remain portable, you can still have
>> the DAL generate the SQL for you by using the ._select() method:
>>
>> db.executesql(db(query)._select(...))
>>
>> Obviously in that case you don't get to hand optimize the SQL, but you
>> still get the speed advan
But the auto_import is supposed to read the data definitions from the
database so you don't have to define_table
On Monday, 14 May 2012 17:19:24 UTC+1, Niphlod wrote:
>
> the issue is definitely the missing definition of the table on the second
> connection.
> Remember that DAL does NOT introspe
DAL *ONLY* know about tables defined in your model files. DAL has *ZERO*
knowledge about what your DB actually looks like.
Sorry, been switch between languages a lot this morning. If you are still
getting the error, then I'm not sure. Maybe someone else has a thought.
On Monday, May 14, 2012 11:56:45 AM UTC-4, Ray (a.k.a. Iceberg) wrote:
>
> Guess you mean {{try:}}{{super}}{{except: pass}}
>
> Unfortunately it fails
Thank you very much, Anthony! This was exactly what i was looking for.
Problem solved.
Op vrijdag 11 mei 2012 19:07:32 UTC+2 schreef Anthony het volgende:
>
> Are you trying to auto-complete a reference field, and you want to be able
> to add new records to the referenced table? The built-in aut
On Monday, May 14, 2012 12:06:28 PM UTC-4, Ross Peoples wrote:
>
> The problem with doing it as a C module is that it would have to be
> compiled. I know that this is something that has been mentioned before but
> was shot down because web2py wouldn't be easily accessible, modified, etc,
> which
Aren't 135 table definitions going to be a problem in a high volume app?
Aren't many/most of those 85k-100k function calls going to
examining/parsing all those tabledefs?
I merge autocomplete with SELECT_OR_ADD_OPTION and name it :
AutocompleteWidgetSelectOrAddOption
It available here at the bottom of the thread :
https://groups.google.com/forum/?fromgroups#!topic/web2py/9KamKgHKUwU
Or I will create a web2py slice soon, I hope...
Richard
On Mon, May 14, 2012 at
Attached (assuming google groups accepts it) is my unit testing
controller that i run on GAE development SDK.
also note that my db connection is defined as:
db = DAL('google:datastore') # connect to Google BigTable
if request.test_db or request.function == "_TEST":
db = DAL('go
Can't you put an empty version of that block in your jQuery Mobile layout
as well?
Anthony
On Monday, May 14, 2012 11:56:45 AM UTC-4, Ray (a.k.a. Iceberg) wrote:
>
> Guess you mean {{try:}}{{super}}{{except: pass}}
>
> Unfortunately it fails too.
>
> So a fix is a must?
>
> Regards,
> Ray
>
> On
That would be nice. I think there are more people who can use this.
2012/5/14 Richard Vézina
> I merge autocomplete with SELECT_OR_ADD_OPTION and name it :
> AutocompleteWidgetSelectOrAddOption
>
> It available here at the bottom of the thread :
> https://groups.google.com/forum/?fromgroups#!top
>From the book:
If we just need access to the data but not to the web2py table attributes,
we get away without re-defining the tables but simply asking web2py to read
the necessary info from the metadata in the .table files:
1.
2.
3.
from gluon import DAL, Field
db = DAL('sqlite://storage.sqli
So how would you do that in Python? Would you need to use vars()['form%s' %
i] or can you do a list or dict of forms?
yes, anthony, i knew of that section in the manual. an i see how and why
it is done when you can hard-code the forms, giving them hard-coded
variable names. but how do i do that with soft-coded variable names when i
don't know how many DIV/sections i am going to have on a single page? or,
wh
I don't really understand the point of auto_import or what it does exactly
but it does *NOT* read the database. Per the book it reads the metadata in
the .table files (which your code is deleting
with os.remove(dbfolder+"/test.table")).
Maybe it's time to ask: what are you trying to do?
Consider the easiest approach first: put all the address fields in the
"candidate" table.
If you have good reason to believe this is not the DB design you want, then
consider a separate "address" table. That will complicate the code a bit
because you'll need to program the logic to link the add
I want to improve it before because I don't like the way the Select
_OR_ADD_Otion works... It changes the select and options class name and it
prevent the use of other jQuery plugin with the autocomplete widget... For
example, I want to use my AutocompleteWidgetSelectOrAddOption and asmSelect
or bs
>
> I don't really understand the point of auto_import or what it does exactly
> but it does *NOT* read the database. Per the book it reads the metadata in
> the .table files (which your code is deleting
> with os.remove(dbfolder+"/test.table")).
Correct, auto_import looks at the *.table file
can you use chrome to see what is the ajax request? Can you try call the
url of the ajax request manually? What do you get? A ticket?
On Monday, 14 May 2012 08:55:53 UTC-5, Larry Wapnitsky wrote:
>
> Even if I remove "fieldname", et.al. after the table name, no data.
>
> On Friday, May 11, 2012 8
Please open a ticket about this. I do not think this belongs to the welcome
app but, if we can use it in admin (instead of the current mobile admin
also based on jquery mobile) then you will be able to do:
{{extend '../../admin/views/jqm_layout.html'}}
On Monday, 14 May 2012 04:30:23 UTC-5, Ray
If one has more than 10 tables, one should use conditional models and one
should move all state dependent settings into the controllers that need
them,
Massimo
On Monday, 14 May 2012 11:36:00 UTC-5, pbreit wrote:
>
> Aren't 135 table definitions going to be a problem in a high volume app?
> Ar
404 not found
On Monday, May 14, 2012 2:02:37 PM UTC-4, Massimo Di Pierro wrote:
>
> can you use chrome to see what is the ajax request? Can you try call the
> url of the ajax request manually? What do you get? A ticket?
>
> On Monday, 14 May 2012 08:55:53 UTC-5, Larry Wapnitsky wrote:
>>
>> Even
can I send you a copy of the project directory for a quick analysis?
On Monday, May 14, 2012 2:02:37 PM UTC-4, Massimo Di Pierro wrote:
>
> can you use chrome to see what is the ajax request? Can you try call the
> url of the ajax request manually? What do you get? A ticket?
>
> On Monday, 14 May
Thanks. That seems to work. Wouldn't it make sense for auto_import to look
for all .table files though?
On Monday, 14 May 2012 19:00:08 UTC+1, Anthony wrote:
>
> I don't really understand the point of auto_import or what it does exactly
>> but it does *NOT* read the database. Per the book it rea
On Monday, May 14, 2012 2:16:22 PM UTC-4, simon wrote:
>
> Thanks. That seems to work. Wouldn't it make sense for auto_import to look
> for all .table files though?
Well, you only want it to read the .table files associated with the
particular database to which you are connecting. The default .
There must be conflict with the callback in the autocomplete widget when
used with component.
Richard
On Mon, May 14, 2012 at 8:58 AM, Anthony wrote:
> Can you pack and attach a minimal app the reproduces the problem?
>
>
> On Monday, May 14, 2012 2:08:47 AM UTC-4, Larry Weinberg wrote:
>>
>>
Yes, I have started moving everything from models to custom api modules
this weekend.
I am going to try to use most of the tips provided by everyone.
For the adviewer I will look to see what is calling 10 query's. However I
can not cache this query as the returned ads most be random for every use
Hello everyone,
I need -a little push in the right way- on implementing authorization.
Here is what I have and what I want:
'ProjectA' has:
* Multiple Users
* Multiple Documents
* Multiple Groups
A user can have many documents
A user can be a member of multiple groups
A user can have multiple
I think that the RBAC built-in in web2py can handle most part of your need,
but I think you will have to build the logic you need around RBAC, noting
that fancy come out of the box. Maybe there is already available app that
does something similar.
Richard
On Mon, May 14, 2012 at 3:11 PM, Remco K
What's the url? this should be calling an action in plugin wiki. must be
there.
On Monday, 14 May 2012 13:11:03 UTC-5, Larry Wapnitsky wrote:
>
> 404 not found
>
> On Monday, May 14, 2012 2:02:37 PM UTC-4, Massimo Di Pierro wrote:
>>
>> can you use chrome to see what is the ajax request? Can you
Here's what it's generating:
Whitelisted Addresses