[web2py] AttributeError: 'Set' object has no attribute 'uploadseparate'

2010-07-14 Thread Rob
Hi guys! I just got this traceback: Traceback (most recent call last): File "/home/rhd/Desktop/web2py/gluon/restricted.py", line 178, in restricted exec ccode in environment File "/home/rhd/Desktop/web2py/applications/list/controllers/ default.py", line 124, in File "/home/rhd/Desktop/w

[web2py] Re: Can I specify an existing named field as the autonumber ID in a legacy database?

2010-07-14 Thread NiallSweeny
Does this work with Oracle databases? I have defined a table as such: db.define_table('MITED_ROLE', Field('MITED_ROLE_ID', 'id'), migrate=False) ... and get the error: ORA-00904: "MITED_ROLE"."ID": invalid identifier which seems to me to say that it's not using my MITED_ROLE_ID field as the id f

[web2py] Re: web2py Reference Manual -- a call to arms

2010-07-14 Thread weheh
Massimo, again, I'm all in favor of simplicity, especially if it means less of your time involved. The convention for a man page and the markup language need to be documented as the first step in making the reference, and preferably, should be a part of the reference itself.Obviously, this forum is

[web2py] Re: SOAP Access

2010-07-14 Thread Scott
I use suds to authenticate users through a Web service call. I don't have a need at this time to expose a server interface, but I could see where it would be useful to add that functionality to the existing XMLRPC, RSS, plugins, etc. That having been said, client interfaces are a lot easier to im

Re: [web2py] Re: storing hierarchical data in web2py database

2010-07-14 Thread Thadeus Burgess
I have this code implemented in plugin_category.py let me just find it =/ Ah yes, here it is http://code.google.com/p/blogitizor/source/browse/src/modules/plugin_category.py You can see example usage in blogitizor. -- Thadeus On Tue, Jul 13, 2010 at 4:19 PM, sociotech wrote: > You mig

[web2py] Security - UUID Generation

2010-07-14 Thread Craig Younkins
The following is the code in 1.80 for UUID generation from gluon/utils.py. Can someone explain to me what is going on here? What's with all the bitshifting? web2py_uuid_locker = thread.allocate_lock() node_id = uuid.getnode() milliseconds = int(time.time() * 1e3) def rotate(i): a = random.ran

Re: [web2py] Re: Security - Escaping In Template Engine

2010-07-14 Thread Craig Younkins
I'm looking at xmlescape in html.py: http://code.google.com/p/web2py/source/browse/gluon/html.py?r=#96 cgi. escape(data, quote).replace("'","'") This looks good. I need to do some performance analysis of replace() to see if I can

Re: [web2py] Re: Rename a Table

2010-07-14 Thread Alexandre Andrade
well, rename them too 2010/7/14 mdipierro > but references from other tables may be broken. > > On 14 Lug, 16:41, Alexandre Andrade wrote: > > it's not a ideal way, but you can backup your data to a csv file, rename > the > > table, and import the csv. > > > > 2010/7/14 yamandu > > > > >

[web2py] Re: Rename a Table

2010-07-14 Thread mdipierro
but references from other tables may be broken. On 14 Lug, 16:41, Alexandre Andrade wrote: > it's not a ideal way, but you can backup your data to a csv file, rename the > table, and import the csv. > > 2010/7/14 yamandu > > > > > Well, I´ve got in situation that could not ocurr but situations s

Re: [web2py] Rename a Table

2010-07-14 Thread Alexandre Andrade
it's not a ideal way, but you can backup your data to a csv file, rename the table, and import the csv. 2010/7/14 yamandu > Well, I´ve got in situation that could not ocurr but situations seem > not to respect some rules. > > I need simply to rename a table. > I can imagine some ways to do tha

[web2py] Re: Rename a Table

2010-07-14 Thread mdipierro
I do not have an easy solution. On 14 Lug, 12:23, yamandu wrote: > Well, I´ve got in situation that could not ocurr but situations seem > not to respect some rules. > > I need simply to rename a table. > I can imagine some ways to do that. > > I tried rename in MySql and rename  respective .table

[web2py] Re: Security - Escaping In Template Engine

2010-07-14 Thread mdipierro
I did not know this would work in attributes. I tried and yes, it works! The patch is now in trunk. Please check it. Massimo On 14 Lug, 12:01, Craig Younkins wrote: > Yes, you can escape both a and b such that it works in either context. > > Reference rule #1 and #2 > onhttp://www.owasp.org/ind

[web2py] Re: pyamf installation issues

2010-07-14 Thread Yarin
Just to follow up on this issue- instead of dealing with the eggs cache permissions issue that caused this, I've found it's easy enough to avoid it altogether by using pip instead of easy_install when installing pyamf. $ pip install pyamf INSTEAD OF $ easy_install pyamf pip by default does not us

Re: [web2py] Import csv

2010-07-14 Thread Jean-Guy
Export your actual table you will get the exact format you need csv to have for the import! Cheers Jonhy On 2010-07-14 14:31, Deepan wrote: d is auto increment.

[web2py] Import csv

2010-07-14 Thread Deepan
What should be the format of the csv file to import into the db table using web2py interface. I have table format as Tablename (id, col1, col2, col3) id is auto increment.

[web2py] Re: SOAP Access

2010-07-14 Thread Jeff S
I actually only use the client side to retrieve information from a service provider, but I thought it could be great for some other person/companies to also have the service side to provide on-demand data other than through a web-browser. I mean, some services like Google have the browser access a

[web2py] Rename a Table

2010-07-14 Thread yamandu
Well, I´ve got in situation that could not ocurr but situations seem not to respect some rules. I need simply to rename a table. I can imagine some ways to do that. I tried rename in MySql and rename respective .table file but didn´t worked. I gives me error with keys. Another way I think is cr

Re: [web2py] Re: Security - Escaping In Template Engine

2010-07-14 Thread Craig Younkins
Yes, you can escape both a and b such that it works in either context. Reference rule #1 and #2 on http://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet#RULE_.231_-_HTML_Escape_Before_Inserting_Untrusted_Data_into_HTML_Element_Content

[web2py] Re: Bug in post-1.79.2 versions

2010-07-14 Thread Jose
Ok, now work well. Jose

[web2py] Re: SOAP Access

2010-07-14 Thread mdipierro
SUDS is client only. We could add it to contrib but it seems not many people use it. What do other poeple think? On 14 Lug, 10:02, Jeff S wrote: > Any chance that an easy tool will be added to web2py for SOAP access, > both in service and client? > > Although it is not that hard to add a third pa

[web2py] Re: web2py Reference Manual -- a call to arms

2010-07-14 Thread mdipierro
We had an attempt to use rest and sphinx but now that despitce help form many people we never managed to make it work decently because of third party dependencies. I'd rather use something that only requires web2py to be parsed. MARKMIN was designed in such a way to allow this def example():

[web2py] Re: Bug in post-1.79.2 versions

2010-07-14 Thread mdipierro
ouch! I think I just fixed it in trunk. Can you please check it. On 14 Lug, 10:21, Jose wrote: > Since post-1.79.2 versions introduced a bug regarding the fields > 'upload'. > > Given the following application: > > Model: > > db.define_table('mitabla', >     Field('nombre'), >     Field('archivo'

[web2py] Re: Security - Escaping In Template Engine

2010-07-14 Thread mdipierro
here is the problem as I see it #controller def index(): return dict(a=' x"y ', b=' x"y ') #view {{=b}} Notice that a and b have the same value. a should be escaped as x\"y while this escaping would be wrong for b. Are you telling me there is a way to escape both a and b that works in both way w

[web2py] Re: web2py Reference Manual -- a call to arms

2010-07-14 Thread weheh
Then, let it be epydocs (thanks ra3don). Let's get concensus on a good template for a man-page docstring and get on with it! I'm going to suggest that major headings include: Name of command Synopsys Description Parameters and their meanings Return values Examples Links (to external documentation

[web2py] Re: How to get a new record ID using SQLFORM

2010-07-14 Thread Jose
On 14 jul, 10:29, David Marko wrote: > Hello, > how can I access ID of newly created record when using SQLFORM? > > e.g. > form=SQLFORM(db.task) > if form.accepts(request.vars, session): >     # HOW CAN I ACCESS NEW RECORD ID HERE? > > David if form.accepts(request.vars, session): id = form

[web2py] Bug in post-1.79.2 versions

2010-07-14 Thread Jose
Since post-1.79.2 versions introduced a bug regarding the fields 'upload'. Given the following application: Model: db.define_table('mitabla', Field('nombre'), Field('archivo', 'upload', autodelete=True,), ) Controller: def subirarchivo(): form = crud.create(db.mitabla) registro

[web2py] Re: Can I specify an existing named field as the autonumber ID in a legacy database?

2010-07-14 Thread mwolfe02
Got it working. Thanks for the help. On Jul 12, 6:28 pm, mdipierro wrote: > No need. You should be able to just do > > db.define_table('property',Field('PropertyID','id'),) > > i.e. add an extra field of type 'id' with the proper name. Let us know > if this works. > > Massimo > > On 12 Lug,

[web2py] SOAP Access

2010-07-14 Thread Jeff S
Any chance that an easy tool will be added to web2py for SOAP access, both in service and client? Although it is not that hard to add a third party like I did with SUDS, but a tightly coupled tool could be usefull. Just a wish. SOAP is a W3C Recommendation Reference: http://www.w3schools.com/soa

[web2py] Security - Escaping In Template Engine

2010-07-14 Thread Craig Younkins
I want to re-raise this issue because I feel it is important. > > * Do not use cgi.escape for HTML escaping because it does not escape > > single quotes and may lead to XSS - See http://www.pythonsecurity.org/wiki/web2py/#cross-site-scripting-xss

[web2py] How to get a new record ID using SQLFORM

2010-07-14 Thread David Marko
Hello, how can I access ID of newly created record when using SQLFORM? e.g. form=SQLFORM(db.task) if form.accepts(request.vars, session): # HOW CAN I ACCESS NEW RECORD ID HERE? David

[web2py] Re: openwysiwyg?

2010-07-14 Thread mdipierro
We'll is gone from trunk. I am sure nobody will miss it. Massimo

[web2py] Re: Commenting system - Disqus/IntenseDebate

2010-07-14 Thread Narendran
Hi Massimo, I tried it, but didn't work. I had to remove script block separately, and load it only once and now I am facing other problems. I shall send the dummy project I tried on. On Jul 14, 1:00 pm, mdipierro wrote: > It should work out of the box. Just make sure you do not call it twice > wi

[web2py] Re: loop generated forms

2010-07-14 Thread Rick
Thanks a lot JmiXIII and Jonathan! The solution you suggested works! Since I'm just a n00b it took a while to get everything right. Here is the view file code: {{for i in range(0, 2):}} {{=listf[i]}} {{pass}} On Jul 13, 11:13 pm, Jonathan Lundell wrote: > On Jul 13, 2010, at 1:56 PM, Rick

[web2py] Re: need help on managinge passwords by administrator

2010-07-14 Thread Frank
many thanks,you are right,I will try the methods you provided. Thanks, Frank

[web2py] Re: oauth

2010-07-14 Thread ChrisM
sorry for posting my dumb comment, just read oauth documents, didn't realise it was api specific. I like the look of geo social apps gowalla and foursquare, they also use oauth to connect to their api's. chrism On Jul 13, 6:12 pm, ChrisM wrote: > +1 > I am still using web2py1.73 as when I try an

Re: [web2py] Re: DAL error

2010-07-14 Thread Vasile Ermicioi
ah, thank you! but that works fine (for sqlite and mysql) *create table test1 (`from` text)* that doesn't work *create table test1 (`from` text)*

[web2py] rpxauth problems

2010-07-14 Thread ChrisM
Hi is anyone else using niels rpxauth.py module, it appears to throw an error with recent releases of web2py. It seems there is a problem with the storage.py which does not like the way rpxauth.py defines the settings.rpx_key and it no longer works? works fine in web2py 1.76.2 not test later versio

[web2py] Re: openwysiwyg?

2010-07-14 Thread JmiXIII
I've tried it but I left it , not usefull

[web2py] Re: DAL error

2010-07-14 Thread mdipierro
OperationalError always originate from the database. "from" is not a valid field name for you database. On 14 Lug, 03:42, elffikk wrote: > I am getting such an error in last release of web2py, with previews > versions didn't try > > Traceback (most recent call last): >   File "...\web2py\gluon\re

[web2py] Re: need help on managinge passwords by administrator

2010-07-14 Thread mdipierro
There are some logic problem. For example: > administrator auth management can be done throgh appadmin interface. > how to disable registration for group 'employee' and enable registration for > group 'department manager'? registration happens before the user is logged in therefore you do not kno

[web2py] DAL error

2010-07-14 Thread elffikk
I am getting such an error in last release of web2py, with previews versions didn't try Traceback (most recent call last): File "...\web2py\gluon\restricted.py", line 178, in restricted exec ccode in environment File ".../web2py/applications/mailtest/models/models.py", line 7, in Fiel

[web2py] Re: need help on managinge passwords by administrator

2010-07-14 Thread Frank
thanks for quick reply. may be I'm not express myself clearly,key point of the question is how to change authrization for different groups.I have groups(administrator,department manager and employee).'adminstrator' have all rights of auth for every employees in whole organization;'department mana

[web2py] Re: user registration approval - how to get email about new wating registration?

2010-07-14 Thread David Marko
Thank you, just or someone else, the correct setting is auth.settings.register_onaccept=lambda form: mail.send(...) David On 13 čnc, 17:26, mdipierro wrote: > auth.settings.registration_onaccept=lambda form: mail.send(.) > > On 13 Lug, 07:53, David Marko wrote: > > > > > Hello, > > in my ap

[web2py] Re: Commenting system - Disqus/IntenseDebate

2010-07-14 Thread mdipierro
It should work out of the box. Just make sure you do not call it twice with the same parameters. On 14 Lug, 02:10, Narendran wrote: > Hi, > The functionality provided by threaded comments plugin will do for me. > But I want to add multiple comment widgets on the same page, and > facing some troub

[web2py] Re: Commenting system - Disqus/IntenseDebate

2010-07-14 Thread Narendran
Hi, The functionality provided by threaded comments plugin will do for me. But I want to add multiple comment widgets on the same page, and facing some trouble on trying that. If someone has already done it successfully before, it would be grateful if you could share the work. On Jul 14, 1:57 am,