On Mon, 14 Nov 2011 14:29:52 +0630
Phyo Arkar
wrote:
> Cool , i am so bored to study for certs but i think this one is cool!
Huh... $400 bucks for one course...I believe I'm going to buy 4th ed. of
web2py book and learn. :-D
Sincerely,
Gour
--
signature.asc
Description: PGP signature
Hi
I've worked in a plugin using part of the code of autocomplete widget
but using jquery autocomplete and contains insted of like when a third
parameter (search_field) is used. It works perfectly in GAE.
The idea is being able to look in a field of kind list:string to
retrieve the id in the associ
I have found one solution which works for me:
In static/css/basic.css I commented:
/*.web2py_grid td { white-space:nowrap; }*/
Regards
Johann
--
Because experiencing your loyal love is better than life itself,
my lips will praise you. (Psalm 63:3)
On 15 November 2011 00:37, Jim Steil wrote:
> Just created a test app with trunk from this morning. I see that the
> arrow keys now work appropriately but I'm not sure how to select an item
> when I have it in the list.
>
> Thoughts?
>
>
Some time ago I had problems with the autocomplete widget
On 14 November 2011 17:53, Massimo Di Pierro wrote:
> On a second thought... all readable fields should be searchable even
> if not displayed. I fixed this and columns is gone again.
>
>
Thanks. The original functionality is back again. Ths also solved another
problem I had with the query-widget
This may help
http://stackoverflow.com/questions/822707/php-generate-file-for-download-then-redirect
I think the "easiest" solution is to have a page with an iframe. The
iframe is hidden (size zero) and links the file to download (this will
initiate the download automatically). The page containin
You're right. In short, I was just looking for the typical, easy web2py
method for http-equiv; something similar to response.meta.refresh().
I think if I spend some more time wrapping my head around response, I'll be
able to better determine what I should do. In simple terms, I want to issue
m
forget about it, it is working now... using retrieve (dahhh GAE stores a
blob)
On Tue, Nov 15, 2011 at 2:40 AM, Bruno Rocha wrote:
>
> Hi,
>
>
> I have this code working on localhost:
>
> *def download():
>> **import os
>> **response.stream(os.path.join(request.folder, 'uploads',
>> req
Hi,
I have this code working on localhost:
*def download():
> **import os
> **response.stream(os.path.join(request.folder, 'uploads',
> request.args(0)))*
But does not works on GAE
Any hint?
--
Bruno Rocha
[http://rochacbruno.com.br]
this was it.
Thank you much
On Tue, Nov 15, 2011 at 2:00 AM, Michael Toomim wrote:
> (Massimo, I'm not sure what the problem is you're referring to with
> creating an instance before I cache.)
>
Cache expects a callable object, instances are not callable, they have to
be called inside cache logic.
--
Bruno Rocha
[http
Thanks, I have been looking for something like this.
On Mon, Nov 14, 2011 at 3:57 PM, mikech wrote:
> Thanks, very useful.
--
Best regards,
Kiem Nguyen
www.KiemNguyen.com
So let me tease these problems apart.
1. Some objects are not pickleable. These cannot be cached to disk.
2. If the object's class is not defined in the scope available to
gluon/cache.py, then the object cannot be unpickled.
Both of these problems can be avoided by using cache.ram. (That's what
I
Yes, those are the pre-built jQuery UI themes (see "Gallery"
tab): http://jqueryui.com/themeroller/. You can also create your own using
ThemeRoller.
On Monday, November 14, 2011 10:52:40 PM UTC-5, tomt wrote:
>
> Thanks for the responses,
>
> After reading the notes, I dug around and discovered
Thanks for the responses,
After reading the notes, I dug around and discovered the following
list of themes that can be used in layout.html.
base
black-tie
blitzer
cupertino
dark-hive
dot-luv
eggplant
excite-bike
flick
hot-sneaks
humanity
le-frog
mint-choc
overcast
pepper-grinder
redmond
smoothne
Even if they are pickable. it is possible that they get pickled but
web2py cannot unpickle them.
On Nov 14, 9:10 pm, Bruno Rocha wrote:
> I notice that if you are planning to run on GAE, your cached object needs
> to be Pickable, in my case, the config object instance is a king of
> Storage, whic
I notice that if you are planning to run on GAE, your cached object needs
to be Pickable, in my case, the config object instance is a king of
Storage, which acts like a dict.
So follow what Massimo said, and store only dict like objects in GAE,
otherwise you will heve this issue:
PicklingError:
Ok, so i'm writing a plugin write now that is a wrapper for a certain
api. So, I've written the api. I've tested my methods and such, and
they work.
So, now I have a few questions:
1.
I'd like to call terminal commands from web2py. Is there a way to do
this? Specifically i'd like to start a seco
I am caching my configuration class, I am passing the class to cache.ram()
and it will be called to create a new instance, and the instance will be
cached.
/modules/config.py
class Config():
> def __init__(self, db):
> # inside config I use cache to read config from db and sometimes
there are two problems:
you are creating the instance before you cache, so the caching does
nothing (would do nothing if it worked). It does not work because it
cannot be serialized since Blah is not defined in a module but in a
model/controller. You will avoid lots of headaches if you cache
dictio
true. fields should also work with expressions
db.table.field1*db.table.field2+1 although I did not try.
On Nov 14, 3:36 pm, JaapP wrote:
> One more reason to stick to using fields could be that with fields you
> can specify the order in which the columns are shown, this didn't work
> for 'column
Thanks to everybody.
Archibald
On 14 nov, 21:33, Vinicius Assef wrote:
> SQLite? Just delete yourdatabasefile.
>
> Web2py will recreate it next time you execute your app.
>
> If it doesn't help, try something like that in web2py
> shell:http://pastebin.com/w0q4yKkK
>
> --
> Vinicius Assef.
>
>
Here's what I would do.
(not tested)
db.define_table('Model',
Field('Name'),
Field('Unit'),
format='%(name)s')
-Jim
On 11/14/2011 4:55 PM, Omi Chiba wrote:
I want to show the reference field value ('Name' in Model table) on
the grid instead of the original value (Model_ID in P
Indeed, I don't. That's the solution I actually came to before I
rechecked the forum! Thanks much.
For future reference, I checked whether the login_form was already
defined as follows (the two instances of the form are formatted
differently):
{{if not 'login_form' in locals():}}
form code
{{pass}
add "requires=[]" on the unique field to disable the vaidation, if you need
the validate_and_update for any of the other fields.
The database itself should validate it for you (you'll get an sql error,
rather than a web2py error).
In your first case, just dropping the "name='') from the update w
I want to show the reference field value ('Name' in Model table) on
the grid instead of the original value (Model_ID in Product table).
Is there easy way to do it ?
Controller
---
def admin():
db.Product.id.readable = False
products =
SQLFORM.grid(db.Product,create=Fa
Just created a test app with trunk from this morning. I see that the
arrow keys now work appropriately but I'm not sure how to select an item
when I have it in the list.
Thoughts?
-Jim
On 11/14/2011 4:27 PM, Jim Steil wrote:
Hi
Are many people using the autocomplete widget out there?
Hi all, it appears I can't use any of my own classes in the cache:
class Blah:
pass
b = blah()
cache.disk('blah', lambda: b)
This results in:
AttributeError: 'module' object has no attribute 'Blah'
I think this is because the things I'm defining (e.g. in models/)
isn't acces
Hi
Are many people using the autocomplete widget out there?
I'm having some inconvenient behavior with it. First off, I think it
would be great if it would do a .contains instead of a .like when it
filters the data being returned. Second, when using the control I'm
seeing the following:
1
Hi,
So regarding web2py validators:
When I define my model using the unique=True constraint on a field, it
adds an IS_NOT_IN_DB validator to that field. But if I try to do a
validate_and_update on that field, it throws an error in the following
examples:
Case 1: Passing in the whole record
Say I
Hi Bruno,
Thanks so much, deleting the files in the database folder fixed this problem.
Is it normal that those files would have been copied over between systems or
was it a botch somewhere?
- Original Message -
From: "Bruno Rocha"
To: web2py@googlegroups.com
Sent: Monday, 14 November,
Thanks, very useful.
Why do you need two distinct login forms in the same page? Can it be just
one login form (i.e., one call to auth.login()) that you display twice? For
example:
def myaction():
[do stuff]
return dict(..., login_form=auth.login())
View:
{{=login_form # show it here}}
...
{{=login_form # s
On Monday, November 14, 2011 4:24:12 PM UTC-5, Chris wrote:
>
> {{if user_id:}}
>
Note, auth.user_id returns the id of the current logged in user or None
otherwise, so you can use:
{{if auth.user_id}}
> Welcome {{=user_current().first_name }}!
>
Also, auth.user retu
One more reason to stick to using fields could be that with fields you
can specify the order in which the columns are shown, this didn't work
for 'columns'
On 14 nov, 18:13, Jim Steil wrote:
> Ok, columns are gone again...
>
> Might just be best to stick with using fields.
>
> -Jim
>
> On 11
After doing some more digging, it appears that each time you call
auth.login(), you generate a new formkey. The first formkey must get
overloaded, so the XSRF protection prevents either form from
submitting.
Any way I can get around this? Sample code:
{{top_login_form = auth.login()}}
Cool, thanks guys.
I do have decorators on certain login-only pages, but I want a page
that's visible to both members and guests. The idea is to have a login
form that shows up only under certain circumstances.
I've done some further tests, and I think auth.login() is working in-
template, but it
auth.login() handles its own processing, so you don't need to do
login_form.accepts(). So, just use auth.login() wherever you need it.
Anthony
On Monday, November 14, 2011 3:58:52 PM UTC-5, Chris wrote:
>
> Hello,
>
> I'd like to make a login form and have it be accessible in multiple
> pages,
Here it is :
Redefine auth table like this :
auth_table = db.define_table(
auth.settings.table_user_name,
Append to default auth user field this field :
Field('logged_on','boolean', writable=False, readable=False,
default=None),
Then I put those lines into db.py that contain my auth r
If you want to force user login on the page, use the
@auth.requires_login decorator on the corresponding functions.
If you use SQLFORM.grid, you may need to do that only one time per
controller.
You can find out all about it in Chapter 8 of the book.
http://www.web2py.com/book/default/chapter/08
Hello,
I'd like to make a login form and have it be accessible in multiple
pages, without having to rewrite the same code in every single
controller action:
login_form = auth.login()
if login_form.accepts(...
Is this possible?
Thanks,
Chris
SQLite? Just delete your database file.
Web2py will recreate it next time you execute your app.
If it doesn't help, try something like that in web2py shell:
http://pastebin.com/w0q4yKkK
--
Vinicius Assef.
On Mon, Nov 14, 2011 at 10:56 AM, Archibald Linx
wrote:
> Thank you Bruno.
>
> I am usi
The SQLFORM options widget ignores the value in the database when
editing the field. The following code shows the failure:
Model:
db.define_table('product_types', Field('name', length=32,
label='Type'))
product_type_list = [r.name for r in
db().select(db.product_types.name)]
db.define_table(
Hello,
In the book section :
http://web2py.com/book/default/chapter/06?search=update#update_record
We talk about single record...
But command 1 is not selecting a single record so if there is other id
then 3 (4, 5, 6, etc.) there will be a error in what we expect to
update...
Book extract :
up
As for 1.99.2, grid is stable.
Using fields = [db.table.field, db.table.otherfield] does not work on
the index table. I am using columns and planning to update my
controllers when the next release becomes available.
On Nov 14, 12:13 pm, Jim Steil wrote:
> Ok, columns are gone again...
>
> Might
Hello Sathvik,
Do you use the RBAC web2py feature?
How you "last_in" get update as user logon?
Ok, just re-read your email you don't use the auth...
I think personnalise the auth_user table (or any other name you give it)
and append a boolean "loged_on" (TRUE/FALSE) field could do it in
conjun
Hi,
Thanks DenesL, Anthony and Massimo for your help.
I appreciate.
That works fine !
Thanks a lot
Dominique
using sqlite. just go to /databases folder and delete everything there.
web2py will create it all again.
http://zerp.ly/rochacbruno
Em 14/11/2011 10:56, "Archibald Linx" escreveu:
> Thank you Bruno.
>
> I am using SQLite.
>
> I want to reset all the tables of my project.
>
> Thanks,
> Archibald
You are welcome.
Richard
On Mon, Nov 14, 2011 at 12:48 PM, Jim Steil wrote:
> Perfect, thanks for the tip Richard.
>
> -Jim
>
>
> On 11/14/2011 11:28 AM, Richard Vézina wrote:
>
> Why you can't specify in IS_IN_DB and pass a subset of you table and use
> where clause to subset your DB like
Any thoughts on the suggestion about dates sorting in reverse order in
SQLFORM.grid. The link in the previous message does not work, but the
web address is correct.
Peter
On Oct 27, 4:15 pm, peter wrote:
> If one clicks on 'data modified' in a windows folder, the files are
> ordered with the m
Perfect, thanks for the tip Richard.
-Jim
On 11/14/2011 11:28 AM, Richard Vézina wrote:
Why you can't specify in IS_IN_DB and pass a subset of you table and
use where clause to subset your DB like this :
db(db.plant.plantNumber!=2)
??
Look in the book how to pass a set instead of db to
Why you can't specify in IS_IN_DB and pass a subset of you table and use
where clause to subset your DB like this :
db(db.plant.plantNumber!=2)
??
Look in the book how to pass a set instead of db to IS_IN_DB class...
Richard
On Mon, Nov 14, 2011 at 12:16 PM, Jim Steil wrote:
> Hi
>
> Using
Hi
Using SQLFORM.factory and trying to build a dropdown box based off a
table but limiting the options in the dropdown. Here is what I have:
plantsNotForUser = db(db.plant.plantNumber==2)
form = SQLFORM.factory(
Field('plantId', db.plant, label='Plant',
requires
Ok, columns are gone again...
Might just be best to stick with using fields.
-Jim
On 11/14/2011 8:47 AM, Jim Steil wrote:
I stand corrected on the 'columns' comment. Massimo added it back in
this morning.
-Jim
On 11/14/2011 8:45 AM, Jim Steil wrote:
here are a few thoughts...
1.
Hello everybody,
I am preparing the new book and need to update the contributors page:
http://web2py.com/examples/default/who.html
If your name is not there and it should be please do not be shy and email me
privately with your full name and google account alias. This is more likely an
over
Hi All,
I've been working with the code here:
http://code.google.com/p/django-and-sqlalchemy-on-web2py/
to "port" a legacy django model to web2py.
It works fine for simple single inheritance cases, and cases where the
ancestor depth is one. However, when I try to use a user-defined
django model
What a coincidence, Massimo. I was just going to start working on
Stripe integration today.
Matt
On Nov 13, 9:28 pm, Massimo Di Pierro
wrote:
> I added
>
> gluon/contrib/stripe.py
>
> it provide a minimalist support for stripe.com payment processing
>
> 1) get an account with stripe.com
> 2) ac
Hi,
I'm using Web2Py(stable) with GAE(py2.5, SDK1.5.5). The '%20' parts of the
url in request.args automatically change into underscores '_' .
How do I get them to stay that way, so that I may use them as spaces (with
urllib.decode)?
With Regards,
Sathvik
--
Sathvik Ponangi
What if you don't want all readable fields searchable -- can that be
accomodated?
On Monday, November 14, 2011 10:53:28 AM UTC-5, Massimo Di Pierro wrote:
>
> On a second thought... all readable fields should be searchable even
> if not displayed. I fixed this and columns is gone again.
>
> On
On a second thought... all readable fields should be searchable even
if not displayed. I fixed this and columns is gone again.
On Nov 14, 8:16 am, Massimo Di Pierro
wrote:
> I put it back, give it a try.
>
> On Nov 14, 1:52 am, Johann Spies wrote:
>
>
>
>
>
>
>
> > I have used the columns-argume
On Monday, November 14, 2011 9:34:30 AM UTC-5, Massimo Di Pierro wrote:
>
> You can add other buttons like
>
> buttons = [INPUT(_type="submit"),
> INPUT(_type="button",_onclick="history.go(-1);return False")]
>
Can you show a complete example? I just tried the above with SQLFORM and
SQLFORM.fa
Web2py tries to redefine tables in line with changes in the model file
but sometimes this is not possible with sqlite. Therefore you may want
to delete the table definitions as well. If you do want a clean sheet
of paper then do this:
exclude=[]
import os
import glob
import sys
sys.path.append("c:
On Mon, 2011-11-14 at 06:02 -0800, DenesL wrote:
> Hi Archibald,
>
> if you want to clear all records from a table do:
>
> db.table.truncate()
>
> To clear all just loop thru db.tables .
>
> db.commit() to finish.
>
> It should work for all DBs.
>
>
> On Nov 14, 7:56 am, Archibald Linx w
I stand corrected on the 'columns' comment. Massimo added it back in
this morning.
-Jim
On 11/14/2011 8:45 AM, Jim Steil wrote:
here are a few thoughts...
1. Make sure you create this test in a new app. If you're updating
or adding functionality to an already existing app, then your l
here are a few thoughts...
1. Make sure you create this test in a new app. If you're updating or
adding functionality to an already existing app, then your layout and
base.css need to be updated.
2. If using jquery-ui, then you need to download jquery-ui and include
it in your layout.html w
You can add other buttons like
buttons = [INPUT(_type="submit"),
INPUT(_type="button",_onclick="history.go(-1);return False")]
etc.
On Nov 14, 8:05 am, Anthony wrote:
> On Monday, November 14, 2011 8:53:30 AM UTC-5, DenesL wrote:
>
> > - buttons=[] blocks the auto-created submit button at the b
Please open a ticket about this. Right now dal does not know you are
not plannit to do dbio.
You can try replace in dal.py
else:
raise RuntimeError, "you must specify a
Field(...,uploadfolder=...)"
elif not self._db._uri is None:
raise RuntimeError, "you must spec
Thanks Roberto.
How about you send me a setup-script to include in the scrips folder?
On Nov 14, 3:03 am, "Roberto De Ioris" wrote:
> > Again at Webfaction my memory usage is way over my limit:
>
> > Below is the list of processes that you're running with the memory
> > that they use (the command
I put it back, give it a try.
On Nov 14, 1:52 am, Johann Spies wrote:
> I have used the columns-argument to set the display columns and the
> 'fields' argument to define the search fields for the search function.
>
> I only wanted to display 2 columns of a table but about 15 fields to be
> search
You just made an excellent case for putting the "columns" back.
Massimo
On Nov 14, 1:52 am, Johann Spies wrote:
> I have used the columns-argument to set the display columns and the
> 'fields' argument to define the search fields for the search function.
>
> I only wanted to display 2 columns of
On Monday, November 14, 2011 8:53:30 AM UTC-5, DenesL wrote:
>
> - buttons=[] blocks the auto-created submit button at the bottom
>
Another undocumented feature. What is the purpose of 'buttons'? The only
code I see that deals with it simply checks whether it includes 'submit'.
What happens if y
Hi Archibald,
if you want to clear all records from a table do:
db.table.truncate()
To clear all just loop thru db.tables .
db.commit() to finish.
It should work for all DBs.
On Nov 14, 7:56 am, Archibald Linx wrote:
> Thank you Bruno.
>
> I am using SQLite.
>
> I want to reset all the ta
Hi Dominique,
I believe the easiest would be to manually insert the submit button at
the appropriate location, as in the following example:
form = SQLFORM.factory(
Field('name'),
Field('age','integer'),
formstyle='divs',
buttons=[],
)
form[0].insert(1,DIV(INPUT(_type='submit', _value='sub
I wanted to make a comment on the book but a single line input box is used
instead of a textarea.
Should this be changed?
Anyway, need to post here for now.
I tried following the upload example in ch7.
The docs specify:
form.validate(...)
is a shortcut for:
form.process(...,dbio=False).accepted
Thank you Bruno.
I am using SQLite.
I want to reset all the tables of my project.
Thanks,
Archibald
On 14 nov, 01:44, Bruno Rocha wrote:
> which database engine?
>
> http://zerp.ly/rochacbruno
> Em 13/11/2011 22:38, "Archibald Linx" escreveu:
>
>
>
>
>
>
>
> > Dear Web2py users,
>
> > How can
Hi All,
Can anyone let me know how to use SQLForm.grid properly or tell
me what I am missing. I have not installed any jquery plugin for the
same (assuming that it is part of 1.99.2 by default). I cannot see the
complete grid, just some buttons and data as per my query below. Also
the links d
Hello All,
I have a form built with SQLFORM.factory.
I would like to change the position of the submit button.
I know how to insert an element somewhere with for instance
form[0][3][1].insert(-1, my_element) but not how to move the submit button
from its pre-defined place (last row) to another
I HAVE MADE ONE APPLICATION WHERE I USED WEB GRID AND POWER GRID ITS
WORK IN LOCAL HOST BUT WHEN I DEPLOY ON GOOGLE APPS ENGINE IYS SHOW
FOR WEB GRID invalid view (default/
Registration_Certificate_Repository.html)
AND FOR
POWER GRID Internal error Ticket issued: unknown
AND MY SECOUND PROBLEM
You can see it working at: 123-check.appspot.com/init/default/contact
web2py is a great framework
webfaction is a great hosting
God bless you, Roberto, by making it possible to use them together :)
and uwsgi is a great webserver :)
will try soon 1.0 version
Below works for me:
steps I followed. Your context may differ and customize accordingly.
1) define a db model with the fields you want; I wanted all emails to be
stored too, so I defined this model
2) define two functions - a contact fn that gets called from template; the
contact fn itself calls
> Again at Webfaction my memory usage is way over my limit:
>
> Below is the list of processes that you're running with the memory
> that they use (the command used to list these processes is "ps -u
> fitwise -o rss,etime,pid,command"):
>
> User - Memory - Elapsed Time - Pid - Command:
> -
Cool , i am so bored to study for certs but i think this one is cool!
On 11/14/11, António Ramos wrote:
> http://www.oreillyschool.com/certificates/python-programming.php
>
83 matches
Mail list logo