[web2py] Re: web3py lifetime of web2py

2011-10-24 Thread Gour
On Sun, 23 Oct 2011 19:59:14 -0300 Mariano Reingart reing...@gmail.com wrote: I didn't have time to work on it but I expect for December to have a full version of web2py seamless working on py3k. Do you work with the web2py's trunk? Sincerely, Gour -- While contemplating the objects of

[web2py] Re: Exceeding memory limits in webfaction

2011-10-24 Thread annet
Hi Jose, I had the same problem a week ago, Sean solved it doing the following: In the Control Panel, under Domains/websites Applications, add a new Application: Name: init_static App category: Symbolic link App type: Symbolic link to static-only app App doc: This creates a symlink from

[web2py] Re: Complex CRUD Forms Examples with Web2py?

2011-10-24 Thread stefaan
Brilliant plugin!

[web2py] From html view to pdf.

2011-10-24 Thread annet
I am working on a timetable function: Controller: def classtimesweek(): rows=db((db.lesrooster.bedrijf_id==1)(db.lesrooster.dag_id==db.dag.id)(db.lesrooster.level_id==db.level.id)) \ .select(db.lesrooster.ALL,db.dag.dag,db.level.level,orderby=db.lesrooster.dag_id| db.lesrooster.tijd)

Re: [web2py] Re: Hide menu until after authentication.

2011-10-24 Thread Mike Veltman
I actually totally overlooked that it was placed in layout.html Thanks everybody for the information. I learned a lot again. With regards, Mike Veltman

[web2py] Dealing with arbitary user defined DAL fields

2011-10-24 Thread seongjoo
Hello, I have an application that has adding user-defined field functionality. There is a basic set of information fields user might need to fill in to submit the data. User can also define his/her own information field. For example, user can type in user-defined field name and its value: 'I

Re: [web2py] elfinder integrated into web2py as a plugin?

2011-10-24 Thread Phyo Arkar
I haven't continue working on ELFinder as a plugin for web2py. You can continue my work. The backend code also need to make it use web2py's upload function.Current upload hangs web2py when filesize is large, till its upload is done. You can use it directly , (not as a plugin) . I am now working on

[web2py] Re: Memory leak with scheduler.py and MySQL

2011-10-24 Thread szimszon
I have the same issue but it's not related to mysql :( I installed postgresql but I have memory leak too. I use Python 2.6.6 (r266:84292, Dec 27 2010, 00:02:40) in Debian Linux squeeze. But it seems that with Python 2.7.2+ (default, Oct 4 2011, 20:03:08) (Ubuntu 11.10) everything is good.

[web2py] Import/Export issuse in web2py

2011-10-24 Thread Saurabh S
Hi , I have deployed single app to two different instances , i want to have some of the data to be common in both the system so i exported the data in csv from one app and added some data manually into the same csv then tried to add this csv to another app via import...but this is not

[web2py] Import/Export issue in web2py.

2011-10-24 Thread Saurabh S
Hi , I have deployed single app to two different instances , i want to have some of the data to be common in both the system so i exported the data in csv from one app and added some data manually into the same csv then tried to add this csv to another app via import...but this is not

[web2py] Re: Exceeding memory limits in webfaction

2011-10-24 Thread Jose
On 24 oct, 04:19, annet annet.verm...@gmail.com wrote: Hi Jose, I had the same problem a week ago, Sean solved it doing the following: In the Control Panel, under Domains/websites Applications, add a new Application: Name:   init_static App category: Symbolic link App type: Symbolic

[web2py] Re: Help making nav menu work please!

2011-10-24 Thread noremac
Anthony you champion! thank you so much!! I can not believe that I have been scratching my head for so long over something so simple hehe. thanks again mate :) On Oct 24, 10:54 am, Anthony abasta...@gmail.com wrote: On Sunday, October 23, 2011 6:47:45 PM UTC-4, noremac wrote: On Oct 24, 7:42

Re: [web2py] Re: Exceeding memory limits in webfaction

2011-10-24 Thread Johann Spies
Should I change something in httpd.conf? When I did it some weeks ago the support people of Webfactional was very helpful. I did not have to do something to the apache-setup. The creation of this static-only app did not solve my problem and in the end I have switched to a uwsgi-setup. A

Re: [web2py] Import/Export issuse in web2py

2011-10-24 Thread Johann Spies
On 24 October 2011 12:18, Saurabh S ggtestlo...@gmail.com wrote: 1. if the DB structure is different than the coloumns in csv , will the import work ? for example my x table in DB has 10 columns and i am importing a csv into it with 8 columns...will i be able to do this successfully

[web2py] setting up using auth confusion

2011-10-24 Thread lucas
hello one and all, new to web2py. love it so far, very graceful and full featured. i am having difficulty learning the auth system. very difficult to find good basic examples on this topic. first i want to shutoff the default of creating a new group for each registered person. what is the

[web2py] Re: Exceeding memory limits in webfaction

2011-10-24 Thread Jose
On 24 oct, 07:46, Johann Spies johann.sp...@gmail.com wrote: Should I change something in httpd.conf? When I did it some weeks ago the support people of Webfactional was very helpful.  I did not have to do something to the apache-setup.   The creation of this static-only app did not solve

[web2py] Re: identity column with web2py

2011-10-24 Thread DenesL
Hi Tom, since web2py allows you to define your id field you could try something like db.define_table('big', Field('id','double'), # or decimal Field('num','double') ) but I am not sure if it will work in the long run (pun intended). Massimo?. Denes On Oct 23, 10:37 pm, tom h

Re: [web2py] Re: web3py lifetime of web2py

2011-10-24 Thread Ovidio Marinho
Mariano, what are necessary adjustments for this to happen, or run 2 to 3?. where you made adjustments? and what were they? i'm curious to know this. thanks. Ovidio Marinho Falcao Neto Web Developer ovidio...@gmail.com ITJP - itjp.net.br

Re: [web2py] Re: Getting Too many tables error on GAE , HELP!

2011-10-24 Thread Phyo Arkar
Thanks. So when i was student, i used to do joins programatically, that was 7 years ago , and my teacher blame me how bad that design was. Now thats gonna be a useful in NoSQL dbs :). On Mon, Oct 24, 2011 at 7:40 AM, howesc how...@umich.edu wrote: it is very much a mindset. joins are

[web2py] Re: setting up using auth confusion

2011-10-24 Thread Anthony
On Monday, October 24, 2011 8:04:25 AM UTC-4, lucas wrote: first i want to shutoff the default of creating a new group for each registered person. what is the setting to override that default behavior? auth.settings.create_user_groups = False See

Re: [web2py] Dealing with arbitary user defined DAL fields

2011-10-24 Thread Bruno Rocha
you can use a list:string field which will store values in a Python list. then if user type I am alergic to : peanut and I like to eat : banana you have a list with [I am alergic to : peanut, I like to eat : banana] Internally dal stores a pipe | separated string in db. records =

[web2py] Re: Import/Export issue in web2py.

2011-10-24 Thread Anthony
On Monday, October 24, 2011 6:20:32 AM UTC-4, Saurabh S wrote: Hi , I have deployed single app to two different instances , i want to have some of the data to be common in both the system so i exported the data in csv from one app and added some data manually into the same csv then

[web2py] Web2py book

2011-10-24 Thread Archibald Linx
Dear web2py users, I have some questions about the book : 1) There is a typo here : http://www.web2py.com/book/default/chapter/10#Auto-completion It should be if not request.vars.month: and not it not request.vars.month: 2) On page 69, what do you mean by private ? Class atributes, methods,

[web2py] Re: Web2py book

2011-10-24 Thread Anthony
On Monday, October 24, 2011 9:33:33 AM UTC-4, Archibald Linx wrote: Dear web2py users, I have some questions about the book : 1) There is a typo here : http://www.web2py.com/book/default/chapter/10#Auto-completion It should be if not request.vars.month: and not it not

[web2py] Re: Exceeding memory limits in webfaction

2011-10-24 Thread annet
I did not have to do something to the apache-setup. The creation of this static-only app did not solve my problem and in the end I have switched to a uwsgi-setup. A search in this mailing list's archives will provide a lot of information on that setup. When I was having memory problems, I

Re: [web2py] Re: web3py lifetime of web2py

2011-10-24 Thread Mariano Reingart
Ovidio/Gour: For web2py-py3k, the changes were made against the latest stable release, changeset 2455:80b2c74561c0 tagged as R-1.99.2 The repo is at googlecode, reingart-web2py clone, py3k branch: http://code.google.com/r/reingart-web2py/source/list?name=py3k This is the diff:

[web2py] Re: xml view of dict() with attributes

2011-10-24 Thread Massimo Di Pierro
Yes. You need to implement your own XML serializer. You can use helpers too for this purpose. It really depends on how your output should look like. On Oct 23, 11:07 pm, KMax mkostri...@gmail.com wrote: So, with return dict() and generic.xml view is impossible to produce attribute in a xml tag?

[web2py] Re: Web2py book

2011-10-24 Thread Archibald Linx
Dear Anthony, Thank you very much for this very clear answer. Archibald On 24 oct, 16:02, Anthony abasta...@gmail.com wrote: On Monday, October 24, 2011 9:33:33 AM UTC-4, Archibald Linx wrote: Dear web2py users, I have some questions about the book : 1) There is a typo here :

[web2py] Re: password_two

2011-10-24 Thread Massimo Di Pierro
Good catch! This is now fixed in trunk. Please give it a try. On Oct 23, 11:15 pm, lucas sjluk...@gmail.com wrote: hello one and all, i think i found a inconsistency in the default auth register form. the td tags for the password_two fields don't have the class references.  so like password

[web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-24 Thread Massimo Di Pierro
Good solutions. Not everything can be done with built-in validators. On Oct 24, 12:13 am, TheSweetlink yanosh...@gmail.com wrote: Thank you all for your help. I was able to resolve the problem quirky as it may be but here we go. For science!!! To get a type='list:string' to fail validation

[web2py] Re: Complex CRUD Forms Examples with Web2py?

2011-10-24 Thread Massimo Di Pierro
+1 On Oct 24, 2:19 am, stefaan stefaan.hi...@gmail.com wrote: Brilliant plugin!

[web2py] Re: identity column with web2py

2011-10-24 Thread Massimo Di Pierro
from gluon import BaseAdapter. BaseAdapter.types.update({         'id': 'INTEGER PRIMARY KEY AUTOINCREMENT',        'reference': 'INTEGER REFERENCES %(foreign_key)s ON DELETE %(on_delete_action)s'}) db = DAL() You can replace the types for other adapters that you are using. For example

[web2py] Re: identity column with web2py

2011-10-24 Thread Massimo Di Pierro
I forgot. Important. The change below will affect all the apps installed so it may break something. On Oct 24, 9:38 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: from gluon import BaseAdapter. BaseAdapter.types.update({         'id': 'INTEGER PRIMARY KEY AUTOINCREMENT',       

[web2py] Re: web3py lifetime of web2py

2011-10-24 Thread Massimo Di Pierro
Most of web2py was written with python 3 in mind. The one thing that needs extensive testing is how forms and database drivers cope with unicode. I am skeptical 2to3 will get that right because the wsgi specs have changed and because python 3 will force us to use different drivers. On Oct 24,

[web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-24 Thread TheSweetlink
Thank you Massimo. Because having it work isn't enough I have a question out of morbid curiosity/desire to learn the framework better. Why must the fieldnames match between the Field('fieldname'...) definition and form.errors.fieldname in my validating function in order to get

[web2py] File Downloading over HTTPS

2011-10-24 Thread horridohobbyist
I've discovered that when you download files over HTTPS, older versions of Internet Explorer ( 9.0) choke. Since my website uses SSL, this means that I can only support IE9. Is there a way to force web2py to download over HTTP? Thanks, Richard

Re: [web2py] Re: Running web2py in an apache directory

2011-10-24 Thread José Luis Redrejo Rodríguez
Bumping the message as a reminder... El día 21 de octubre de 2011 19:54, José Luis Redrejo Rodríguez jredr...@debian.org escribió: El día 21 de octubre de 2011 19:51, José Luis Redrejo Rodríguez jredr...@debian.org escribió: 2011/10/21 Massimo Di Pierro massimo.dipie...@gmail.com: Can you

[web2py] Web2Py on GAE very slow

2011-10-24 Thread Damjan Malis
Hi guys, I'm having difficulties running simple app on GAE. I've created simple controller that selects all records (15) from table and passes them to my view. View just lists them. The issue is that 70% of requests made to this controller took 10-50 second to finish. Sometimes GAE even throws

Re: [web2py] Web2Py on GAE very slow

2011-10-24 Thread Jonathan Lundell
On Oct 24, 2011, at 8:01 AM, Damjan Malis wrote: Hi guys, I'm having difficulties running simple app on GAE. I've created simple controller that selects all records (15) from table and passes them to my view. View just lists them. The issue is that 70% of requests made to this controller

[web2py] Nested functions problem?

2011-10-24 Thread annet
I have a function which generates sort of a business card: def businesscard(): if not len(request.args): redirect(URL('default','error')) else: id=request.args(0) company=address=nfas=mouse=logo=tagline=cssfile=css=image=text=[]

[web2py] Re: Nested functions problem?

2011-10-24 Thread Anthony
You could include the timetable in the original page but hide it, and use jQuery to reveal it (and hide the other stuff) when the user clicks the link. Or, when the user clicks the link, you could fetch the timetable via HTML and replace the text/image with the returned timetable (it should be

Re: [web2py] Nested functions problem?

2011-10-24 Thread Jonathan Lundell
On Oct 24, 2011, at 8:32 AM, annet wrote: The view of this function businesscard.html extends a layout.html view. The problem I am facing is that I would like to extend the business card's behaviour with a timetable. I have no idea how to approach this, basically when the user first visits

[web2py] Re: xml view of dict() with attributes

2011-10-24 Thread KMax
my solution: def myxml(): .. return '?xml version=1.0 encoding=UTF-8?' + str(TAG.response(TAG.result('0'), *[TAG[parameter](request.get_vars[parameter]) for parameter in request.get_vars])) So, anyone could customize it on their needs. Thanks Massimo. On

Re: [web2py] Re: xml view of dict() with attributes

2011-10-24 Thread Richard Vézina
lxml is pretty nice lib for the task... Richard On Mon, Oct 24, 2011 at 11:57 AM, KMax mkostri...@gmail.com wrote: my solution: def myxml(): .. return '?xml version=1.0 encoding=UTF-8?' + str(TAG.response(TAG.result('0'),

[web2py] Re: File Downloading over HTTPS

2011-10-24 Thread horridohobbyist
Actually, the more specific issue is that web2py probably sends a Cache-control:no-store or Cache-control:no-cache header... http://support.microsoft.com/kb/323308 Richard On Oct 24, 10:52 am, horridohobbyist horrido.hobb...@gmail.com wrote: I've discovered that when you download files over

[web2py] Re: File Downloading over HTTPS

2011-10-24 Thread Anthony
The support article says it's a problem with IE=6, and a hotfix has been issued. Are you finding the problem with IE7 and IE8 as well? On Monday, October 24, 2011 12:17:07 PM UTC-4, horridohobbyist wrote: Actually, the more specific issue is that web2py probably sends a

[web2py] Re: File Downloading over HTTPS

2011-10-24 Thread horridohobbyist
??? Are we reading the same article? IE7 and IE8 are also affected. Richard On Oct 24, 12:26 pm, Anthony abasta...@gmail.com wrote: The support article says it's a problem with IE=6, and a hotfix has been issued. Are you finding the problem with IE7 and IE8 as well? On Monday, October

[web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-24 Thread Massimo Di Pierro
If I understand the question... Because otherwise SQLFORM would not know where to display the error. On Oct 24, 9:52 am, TheSweetlink yanosh...@gmail.com wrote: Thank you Massimo. Because having it work isn't enough I have a question out of morbid curiosity/desire to learn the framework

[web2py] Re: Web2Py on GAE very slow

2011-10-24 Thread Massimo Di Pierro
It should. On Oct 24, 10:28 am, Jonathan Lundell jlund...@pobox.com wrote: On Oct 24, 2011, at 8:01 AM, Damjan Malis wrote: Hi guys, I'm having difficulties running simple app on GAE. I've created simple controller that selects all records (15) from table and passes them to my view. View

[web2py] Re: File Downloading over HTTPS

2011-10-24 Thread horridohobbyist
A hotfix is not available for IE7 and IE8. Moreover, a hotfix is not necessarily a solution because some users do not bother to upgrade their browser or otherwise apply fixes. This is how I discovered the problem -- one of my users reported it. I can't ask my users to delve into the System

[web2py] Re: File Downloading over HTTPS

2011-10-24 Thread Anthony
Oh, I see -- the symptoms section at the top mentions IE6. On Monday, October 24, 2011 12:31:39 PM UTC-4, horridohobbyist wrote: ??? Are we reading the same article? IE7 and IE8 are also affected. Richard On Oct 24, 12:26 pm, Anthony abas...@gmail.com wrote: The support article says

Re: [web2py] Dealing with arbitary user defined DAL fields

2011-10-24 Thread seongjoo
It's such a workable solution. Thank you! I came to a similar conclusion using list:string for user-defined fields. A slight twist of my version is to use {key: value} instead of key: value. The thought was to convert the string into dictionary-like datatype more easily.

Re: [web2py] Re: web3py lifetime of web2py

2011-10-24 Thread Mariano Reingart
IMHO, although I've tested only sqlite, I think in python3 we can use the same drivers (psycopg2 for python3) and they behave mostly the same as in python2 About the new wsgi spec, I don't see major changes, they are cosmetic regarding str/byte/unicode (in fact, pep-333 wsgi is version 1.0,

[web2py] Re: Dealing with arbitary user defined DAL fields

2011-10-24 Thread pepper_bg
Or you can use full blown EAV - http://en.wikipedia.org/wiki/Entity-attribute-value_model. It may be overkill in many cases but is great for large sparse matrices, depends on the details of your project...

[web2py] Re: Nested functions problem?

2011-10-24 Thread annet
Anthony and Jonathan, Thanks for your replies. I am considering this option: ... Or, when the user clicks the link, you could fetch the timetable via HTML and replace the text/image with the returned timetable (it should be easy with the ajax() function -- just put the text/image in a div,

[web2py] Re: Exceeding memory limits in webfaction

2011-10-24 Thread annet
I submitted a ticket at webfaction, this is their reply: That is correct, this does not completely prevent the problem from recurring. Using a static-only symlink app is just a step in helping with the memory usage. In order to solve the memory issue, you would need to find the root cause of the

[web2py] redirected to @auth.requires_login() page

2011-10-24 Thread Omi Chiba
For example, I have two menus (Home and Menu1) and Menu1 requires login. Now, I login when I'm at Home, it redirect me to Menu1. If I remove @auth.requires_login(), the problem doesn't happen. Should I issue the problem ticket ? or am I doing something wrong ? models/menu.py

[web2py] Re: web3py lifetime of web2py

2011-10-24 Thread Gour
On Mon, 24 Oct 2011 13:56:19 -0300 Mariano Reingart reing...@gmail.com wrote: IMHO, although I've tested only sqlite, I think in python3 we can use the same drivers (psycopg2 for python3) and they behave mostly the same as in python2 btw, is using of PostgreSQL in web2py equally well as

[web2py] Re: redirected to @auth.requires_login() page

2011-10-24 Thread Anthony
On Monday, October 24, 2011 2:01:52 PM UTC-4, Omi Chiba wrote: For example, I have two menus (Home and Menu1) and Menu1 requires login. Now, I login when I'm at Home, it redirect me to Menu1. What do you mean log in when I'm at Home? Is there a login form on the home page, or do you click a

[web2py] upload field in a generic form?

2011-10-24 Thread pepper_bg
Have to go to the experts for this. I have a table for storing arbitrary user data: db.define_table('extra_attributes', Field('user', db.auth_user), Field('name'), Field('type', requires = IS_IN_SET(('text','file'))),

[web2py] Re: Nested functions problem?

2011-10-24 Thread Anthony
On Monday, October 24, 2011 1:30:23 PM UTC-4, annet wrote: Would it be possible to have the business card function with its corresponding view, and a separate function that initially gets the image and text and when the visitor clicks the timetable link, a function that gets the timetable

[web2py] Re: redirected to @auth.requires_login() page

2011-10-24 Thread Omi Chiba
Anthony, do you click a login link and then go to a login page (e.g., /app/default/user/login)? Yes. It's just simply clicking the link. Is auth.settings.login_next set to URL('default', 'menu1')? No. nothing is specified. When I check the value it shows /menu/ default/index. Actually, my

[web2py] Re: Web2Py on GAE very slow

2011-10-24 Thread Jonathan Lundell
On Oct 24, 2011, at 11:20 AM, Damjan Malis wrote: Thanks Jonathan for clarification. I am attaching full GAE log of one of the requests, please find it below. It is quite verbose, did I miss an important setting to lower log level? GAE has its own logging rules. I think it ignores the

[web2py] Re: File Downloading over HTTPS

2011-10-24 Thread Anthony
On Monday, October 24, 2011 12:17:07 PM UTC-4, horridohobbyist wrote: Actually, the more specific issue is that web2py probably sends a Cache-control:no-store or Cache-control:no-cache header... Can you confirm the specific headers that web2py is sending?

[web2py] Re: redirected to @auth.requires_login() page

2011-10-24 Thread Anthony
Actually, my example was wrong. It should be the following. When you click the login link at index, it will redirect you menu1. Not sure I follow. When you click the 'login' link from the home page, instead of going to /menu/default/user/login (I assume your app name is 'menu'), it goes

[web2py] Re: Web2Py on GAE very slow

2011-10-24 Thread Damjan Malis
Yes, I am certain that all slow requests include log msg no file locking, this will cause problems. Also, it is very rare, but some of requests fail after no file locking, this will cause problems as GAE kills such request because of time limit is reached (60sec). I will most definitely gather

Re: [web2py] Re: web3py lifetime of web2py

2011-10-24 Thread Mariano Reingart
On Mon, Oct 24, 2011 at 3:08 PM, Gour g...@atmarama.net wrote: On Mon, 24 Oct 2011 13:56:19 -0300 Mariano Reingart reing...@gmail.com wrote: IMHO, although I've tested only sqlite, I think in python3 we can use the same drivers (psycopg2 for python3) and they behave mostly the same as in

[web2py] Re: upload field in a generic form?

2011-10-24 Thread Anthony
response.download checks the db to get the uploadfolder from the upload field (which you don't have). Instead, you might be able to use response.stream directly: import os filename = [code to get filename from db] response.stream(os.path.join(request.folder, 'uploads', filename),

[web2py] Re: web3py lifetime of web2py

2011-10-24 Thread Massimo Di Pierro
postgresql is supported even better than mysql. mysql has lots of caveats (limits to one alter table per transaction, limit to size of strings, etc.) that we have to deal with as exceptions. On Oct 24, 1:08 pm, Gour g...@atmarama.net wrote: On Mon, 24 Oct 2011 13:56:19 -0300 Mariano Reingart

[web2py] Re: password_two

2011-10-24 Thread lucas
i am new, what is the trunk, thanx massimo. and by the way, you and your crew did a wonderful job on web2py. i have been a programmer for 32 years, and between python and web2py, i am getting excited about programming again, especially with the choice of SQL backends. absolutely great. thanx

[web2py] Re: Memory leak with scheduler.py and MySQL

2011-10-24 Thread szimszon
Could be. After I was able to install python 2.7.2 on squeeze I realized after some scheduler restart that there is still a memory use increasing...

[web2py] Re: File Downloading over HTTPS

2011-10-24 Thread horridohobbyist
Interestingly, the cache control header doesn't appear in the view source of the webpage. I don't know what this means. Nevertheless, the fix described in the article does work. So cache control does play a role somehow. At any rate, I've decided that the correct resolution is to require the

[web2py] Re: password_two

2011-10-24 Thread Massimo Di Pierro
Trunk is the development version on google code. You can get the nightly build from here http://web2py.com/examples/default/download it includes the fix you suggested. Massimo On Oct 24, 3:23 pm, lucas sjluk...@gmail.com wrote: i am new, what is the trunk, thanx massimo.  and by the way, you

[web2py] Re: Memory leak with scheduler.py and MySQL

2011-10-24 Thread Massimo Di Pierro
db._timings will cause a memory leak with the scheduler. because it logs to ram all queries. I will fix it tonight. On Oct 24, 3:25 pm, szimszon szims...@gmail.com wrote: Could be. After I was able to install python 2.7.2 on squeeze I realized after some scheduler restart that there is still

[web2py] list of usernames

2011-10-24 Thread Archibald Linx
Dear Web2py users, Do you sometimes use fields which are lists of usernames ? How would you write that : Field('usernames','list:reference db.auth_user.username')) ? Thanks a lot, Archibald

Re: [web2py] list of usernames

2011-10-24 Thread Richard Vézina
I think you have mistake : Field http://web2py.com/book/default/docstring/Field('tags','list:reference tag')) In that case tag is you table... So when use list:reference you don't use the db.auth_user just auth_user Also you don't specified the db.auth_user.username since username is not a

[web2py] Re: setting up using auth confusion

2011-10-24 Thread lucas
ok, that was totally helpful, thanx for all of the help. i have gotten far, using has_membership and requires_membership often and working perfectly, both in controllers and views. having a bit of a problem with auth.has_permission(). i have a group/ role, auth_group id=2, called Guest and

[web2py] How can I put a login form in my homepage?

2011-10-24 Thread Vinicius Assef
Hey guys, how can I put a login form in my homepage using auth features? Let's say it will be like the gmail homepage. Thanks in advance. -- Vinicius Assef.

[web2py] Re: File Downloading over HTTPS

2011-10-24 Thread Anthony
On Monday, October 24, 2011 4:42:10 PM UTC-4, horridohobbyist wrote: Interestingly, the cache control header doesn't appear in the view source of the webpage. I don't know what this means. The headers wouldn't appear in the html source. In IE, you can hit F12 to open the developer tools,

[web2py] Re: Web2Py on GAE very slow

2011-10-24 Thread howesc
Damjan, i use GAE heavily, here's what i can say based on what i see: - each call to URL() puts at least one message in the debug log. so whatever you are doing has lots of calls to URL() in it. - logging can be affected by logging.conf, but i've never successfully suppressed logs i didn't

[web2py] Re: Import/Export issue in web2py.

2011-10-24 Thread howesc
if you are using GAE i would suggest using the GAE tools, it really simplifies things... http://code.google.com/appengine/docs/python/tools/uploadingdata.html re your #2, i suspect it fails, but a quick experiment will confirm that for you. :)

[web2py] Re: setting up using auth confusion

2011-10-24 Thread Anthony
On Monday, October 24, 2011 5:29:41 PM UTC-4, lucas wrote: ok, that was totally helpful, thanx for all of the help. i have gotten far, using has_membership and requires_membership often and working perfectly, both in controllers and views. having a bit of a problem with

[web2py] Re: How can I put a login form in my homepage?

2011-10-24 Thread Anthony
auth.login() returns a login form -- you can put it wherever you want. On Monday, October 24, 2011 5:33:05 PM UTC-4, viniciusban wrote: Hey guys, how can I put a login form in my homepage using auth features? Let's say it will be like the gmail homepage. Thanks in advance. -- Vinicius

Re: [web2py] list of usernames

2011-10-24 Thread Anthony
Even better, use auth.settings.table_user_name instead of 'auth_user', in case the user table has a name other than 'auth_user'. On Monday, October 24, 2011 5:25:39 PM UTC-4, Richard wrote: I think you have mistake : Field http://web2py.com/book/default/docstring/Field('tags','list:reference

Re: [web2py] Re: Found a bug: XMLRPC with basic authorization fails

2011-10-24 Thread Hong-Khoan Quach
Hi, I think that is a good starting point for us. Massimo, if you and you other guys don't mind, we'd like to try to fix this bug. I already looked into the sourcecode and have an idea but I need to check this :) . Regards Hong-Khoan Am 24.10.2011 02:48, schrieb Robert Clark: Hi Massimo

[web2py] Re: setting up using auth confusion

2011-10-24 Thread lucas
ok, i tried the auth.add_permission(group_id=2, name=read, table_name=news) line and just stuck it under db.py. i still can't get a True out of the has_permission('read') or has_permission(2, 'read') or has_permission(group_id=2, name='read'), nothing. your second suggestion gets me thinking.

[web2py] Re: setting up using auth confusion

2011-10-24 Thread lucas
btw, i am using 1.98.2 and will probably upgrade to 1.99.2 soon.

Re: [web2py] list of usernames

2011-10-24 Thread Archibald Linx
Thank you very much Richard and Anthony ! What's the easiest way to use these fields in the controller and the view ? Archibald 2011/10/25 Anthony abasta...@gmail.com Even better, use auth.settings.table_user_name instead of 'auth_user', in case the user table has a name other than

[web2py] Re: Found a bug: XMLRPC with basic authorization fails

2011-10-24 Thread Massimo Di Pierro
Please send me a patch! :-) On Oct 24, 5:52 pm, Hong-Khoan Quach hongkhoanqu...@googlemail.com wrote: Hi, I think that is a good starting point for us. Massimo, if you and you other guys don't mind, we'd like to try to fix this bug. I already looked into the sourcecode and have an idea but I

[web2py] Re: setting up using auth confusion

2011-10-24 Thread Anthony
On Monday, October 24, 2011 7:06:12 PM UTC-4, lucas wrote: ok, i tried the auth.add_permission(group_id=2, name=read, table_name=news) line and just stuck it under db.py. i still can't get a True out of the has_permission('read') or has_permission(2, 'read') or has_permission(group_id=2,

[web2py] Re: list of usernames

2011-10-24 Thread Archibald Linx
The documentation recommands the multiple select plug-in. http://www.web2pyslices.com/slices/take_slice/70 Sorry, Archibald On 25 oct, 01:18, Archibald Linx archibaldl...@gmail.com wrote: Thank you very much Richard and Anthony ! What's the easiest way to use these fields in the controller

[web2py] Re: Contribution

2011-10-24 Thread Triquetra
No, I don't think this helps, unless I'm misunderstanding something (which is possible). When using auth.add_permission(group_id, 'name', 'object', record_id) the CRUD permissions are only enforced if the object is a table (according to the book). So, even assuming one could pass a column as the

[web2py] Re: SQLFORM.factory not respecting IS_NOT_EMPTY() for list:string?

2011-10-24 Thread TheSweetlink
Cool, yes that is what I was asking about and thank you for the answer. It makes sense, just like the rest of the framework. David On Oct 24, 12:35 pm, Massimo Di Pierro massimo.dipie...@gmail.com wrote: If I understand the question... Because otherwise SQLFORM would not know where to display

Re: [web2py] Hide menu until after authentication.

2011-10-24 Thread Mike Veltman
On Friday, October 21, 2011 2:05:29 AM UTC-4, Gwayne aka Mike Veltman wrote: Gentle people, First a remark I started playing with SQLFORM.grid and it was very ugly, until I did throw away my application and recreated it with the wizard, and then it was fine. ;-) Along with

[web2py] What I do with web2py.

2011-10-24 Thread Mike Veltman
I actually would like to know what people basically build with web2py. Not the details but globally. For me I am a IT Trainer, training people in the use of IBM hard and software like AIX and GPFS. So for me my itch was that I needed to create a new setup for each training. What involved the

Re: [web2py] What I do with web2py.

2011-10-24 Thread Bruno Rocha
On Mon, Oct 24, 2011 at 11:03 PM, Mike Veltman mike.velt...@gmail.comwrote: I actually would like to know what people basically build with web2py. Not the details but globally. I am working exclusivelly with web2py for two years. - Online training at http://www.cursodepython.com.br

[web2py] Re: CouchDB NoSQLAdapter.represent for datetime

2011-10-24 Thread H.C. v. Stockhausen
Hi Massimo, thanks for your reply. I don't think CouchDB has a datetime type but the CouchDB-0.8 driver itself maps to and from iso string representations '2007-04-01T15:30:00Z'. See Chapter 4 Mapping CouchDB documents to Python objects: couchdb.mapping at

[web2py] Re: CouchDB NoSQLAdapter.represent for datetime

2011-10-24 Thread Massimo Di Pierro
I made some changes in trunk that should have fixed the date/datetime issue but I am not sure. Can you try it? On Oct 24, 7:25 pm, H.C. v. Stockhausen h...@vst.io wrote: Hi Massimo, thanks for your reply. I don't think CouchDB has a datetime type but the CouchDB-0.8 driver itself maps to and

[web2py] Re: From html view to pdf.

2011-10-24 Thread chris_g
Annet, When I explored this a few years ago, I ended up going with an XML solution called RML (report markup language). This was developed by the makers of reportlab, but there are also free implemntations of RML available (such as the z3c implementation.) Once I had installed rml2pdf developed

[web2py] Re: upload field in a generic form?

2011-10-24 Thread pepper_bg
Great, response.stream did it! The exact code I end up using (in case someone else needs to get around the 'no_table.XXX' file name scenario). Another reason I like this approach (vs http://mysite.com/my_app/my_cont/download/uploads/no_table.document.9b6546236b10.623456345667.png) is the

  1   2   >