Re: [web2py] Re: Add placeholder to password field in web2py login form

2011-12-16 Thread Abhishek Gupta
Thanks, it worked. But surprisingly form.element('input.username')['_placeholder'] = 'Username' doesn't work and instead gives the error Traceback (most recent call last): File "/home/www-data/web2py/gluon/restricted.py", line 194, in restricted exec ccode in environment File "/home/www-

[web2py] Record Versioning

2011-12-16 Thread JF
Hi, I'm trying the error versioning but I'm stuck with a curious error message and I don't see the link between what I did and this error. A part of my Model goes like this: db.define_table('item', Field('ipn', 'string'), Fie

[web2py] Re: Add placeholder to password field in web2py login form

2011-12-16 Thread Anthony
Assuming the standard user() function: form = auth() if request.args(0) == 'login': form.element('input.password')['_placeholder'] = 'Password' Not sure placeholders will show in plain text in all browsers -- may need a JS workaround for that (change the field type dynamically to

[web2py] Re: Logout if browser is closed

2011-12-16 Thread Abhishek Gupta
I think you can detect his closing the browser using javascript and accordingly log him out of the browser. Regards Abhishek

[web2py] Add placeholder to password field in web2py login form

2011-12-16 Thread Abhishek Gupta
Hello I am customizing web2py login form, but appear to stuck with this one. In a normal HTML5 form, for password I can do following: But how can i add a similar placeholder field to the web2py login form for the password field. I was able to do the same for the username fie

[web2py] Re: the Set class should be deprecated

2011-12-16 Thread Anthony
> > Last argument, I promise. I won't hold you to that. :-) > The existence of Query and Set objects are not a hidden implementation > details. For example, if the user is unaware of the presence of Query > objects, db(db.mytable.id == 3) shouldn't make any sense, as > db.mytable.id == 3 shou

[web2py] Having multiple layouts (themes) and choosing from one

2011-12-16 Thread Joseph Jude
What are the ways in which such multiple layouts and choosing one at the run time work? Something like wordpress themes? Modifying views/layout fix the layout to the one that was deployed. But as in wordpress, if more themes are installed how can a different one be chosen? Thank you, Joseph

Re: [web2py] Web Resources

2011-12-16 Thread Ismael Serratos
also this one http://try-python.appspot.com/ On Fri, Dec 16, 2011 at 10:55 PM, Ismael Serratos wrote: > trypython.org? > > It uses silverlight because it's written with Iron Python but it's pretty > good, I think... > > > On Fri, Dec 16, 2011 at 10:20 PM, monotasker wrote: > >> Do you mean somet

Re: [web2py] Web Resources

2011-12-16 Thread Ismael Serratos
trypython.org? It uses silverlight because it's written with Iron Python but it's pretty good, I think... On Fri, Dec 16, 2011 at 10:20 PM, monotasker wrote: > Do you mean something like this? http://pythonfiddle.com

[web2py] Re: the Set class should be deprecated

2011-12-16 Thread Brian Will
Last argument, I promise. Here's my version of your summary: 1. We have a connection object that represents a database. 2. From the Fields associated with this connection, Queries are produced with Field's overloaded operators. Queries can also be produced from combination of other Queries with

[web2py] Web Resources

2011-12-16 Thread monotasker
Do you mean something like this? http://pythonfiddle.com

[web2py] Re: site-packages how?

2011-12-16 Thread Vineet
Keeping all 3rd party modules in site-packages (or whatever name you prefer for the folder) would bring orderliness. Consider when a developer is using a large no. of 3rd party modules, and all are placed in web2py root, it might look ugly. That's what I feel. --- Vineet On Dec 16, 9:45 pm, Antho

[web2py] Web Resources

2011-12-16 Thread JavierQQ
Hi, As a practice... I just was wondering if there's a way to do something like tryruby.org... but with python. I've seen some "python web compilers" (I'm not sure if thats the best name for them :/), and I don't know if someone knows one that has some code on github or somewhere else. It's just

Re: [web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-16 Thread thstart
the issue is I see with the debugger in the case of register - the validator executes after register telling 'Invalid Email' when I copy/paste an email with space after the email itself. I want to prevent this to happen.

[web2py] Re: smartgrid - still not resolving a problem

2011-12-16 Thread Anthony
On Friday, December 16, 2011 5:54:54 PM UTC-5, Cliff wrote: > > Adi, > > $("#po_sku_sku_id").change(function(event){ > > could also be > > $("#po_sku_sku_id").live('change', function(event){ > > In case the user changes it a second or third time. > I'm not a jQuery expert, but I think the .

Re: [web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-16 Thread Anthony
You might use the CLEANUP validator -- it strips whitespace before removing special characters. If you don't want to remove any characters and just want to strip the whitespace, you can specify your own empty regex: CLEANUP(regex='') Anthony On Friday, December 16, 2011 9:18:47 PM UTC-5, thsta

[web2py] Re: the Set class should be deprecated

2011-12-16 Thread Anthony
> >> Something like: > >> (db.mytable.id == 3).ignore_common_filters().select() > > > A bit ugly, and gets worse if we add more arguments in the future. > > Say in our API that we have a Cat type with some uncommon options for > users to set. Which is the better approach for setting these o

Re: [web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-16 Thread thstart
How to perform a function to strip out white spaces before registration?

[web2py] Re: book 4th edition in PDF

2011-12-16 Thread Massimo Di Pierro
Ok. I am glad it is working. It also works on my side. So I guess we can open this up. Over the week-end hopefully I will replace the html. Thanks for you help. BTW. This uses stripes for payment I do not store any client info. I do store your email, name and order so that, in the future you will

[web2py] Re: book 4th edition in PDF

2011-12-16 Thread Ron McOuat
Worked for me Ron

Re: [web2py] book 4th edition in PDF

2011-12-16 Thread Alfonso de la Guarda
Hi, It worked too! Saludos, Alfonso de la Guarda Centro Open Source(COS) http://www.cos-la.net http://alfonsodg.net Twitter: @alfonsodg Redes sociales: alfonsodg    Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B  58A5 54A1 851D B23B 24A4 On Fri, Dec

Re: [web2py] book 4th edition in PDF

2011-12-16 Thread Douglas Horst
It worked for me. -- Best, Douglas Horst dcho...@gmail.com Evanston, IL USA

Re: [web2py] book 4th edition in PDF

2011-12-16 Thread Alfonso de la Guarda
I am trying Saludos, Alfonso de la Guarda Centro Open Source(COS) http://www.cos-la.net http://alfonsodg.net Twitter: @alfonsodg Redes sociales: alfonsodg    Telef. 991935157 1024D/B23B24A4 5469 ED92 75A3 BBDB FD6B  58A5 54A1 851D B23B 24A4 On Fri, Dec 16, 201

[web2py] book 4th edition in PDF

2011-12-16 Thread Massimo Di Pierro
I apologize posting the electronic version of the book 4th ed in html and pdf is taking longer than expected but truly I am almost done. The delay was due to these facts: 1) complete rewrite of the online book app 2) do not use lulu for the pdf download but use the web app itself in order to a)

[web2py] Re: do import module work in gae?

2011-12-16 Thread Joseph Jude
I upgraded to 1.99.4 and it works :-) But there is another issue. from gluon.contrib.markdown import markdown2 as markdown in gae it throws error no module named markdown :-(

[web2py] Book#Legacy Databases and Keyed Tables question?

2011-12-16 Thread vvk
> > Finally if the legacy table uses a primary key that is not an > auto-increment id field it is possible to use a "keyed table", for example > ... > Note that currently this is only available for DB2, MS-SQL, Ingres and > Informix, but others can be easily added. How to added it for Oracle?

[web2py] Re: the Set class should be deprecated

2011-12-16 Thread Brian Will
Apologies for dragging this out. I don't mean to be combative, but... @pbreit It's weird if you're told OR if you think about it (especially if you aren't already very fluent in Python). If no one tells you, and if you don't think about it, it's probably fine. Also, the query already encapsulates

[web2py] SQLCustomType and GAE noSQL

2011-12-16 Thread howesc
I just noticed the following about SQLCustomType in the book: "This feature is marked as experimental. In practice is has been in web2py for long time and it works but it can make the code not portable, for example when the native type is database specific. It does not work on Google App Engine

[web2py] Re: smartgrid - still not resolving a problem

2011-12-16 Thread Cliff
Adi, $("#po_sku_sku_id").change(function(event){ could also be $("#po_sku_sku_id").live('change', function(event){ In case the user changes it a second or third time. On Dec 16, 2:39 pm, Adi wrote: > We got it working :) The code bellow may help someone else with a similar > problem.

[web2py] Re: SQLFORM.grid custom labels in edit form for each row

2011-12-16 Thread brushek
Thank You, Anthony. It was... so easy!!! I was looking for some very strange and wierd solutions, big + for You :). regards brushek On 16 Gru, 23:32, Anthony wrote: > In your table definition, you can specify a 'label' argument for each > field, and I think that can be whatever you want (e.g., a

[web2py] Re: Table naming fiasco - need advice

2011-12-16 Thread Cliff
Anthony, I'm still on 1.99.2 so I think I'll migrate my apps to 1.99.4. The time saving I'll get from the updated smartgrid will more than compensate the move. Andrew, it doesn't make sense to refactor a dozen working and in- production controllers just to rename tables. I have much better ways

[web2py] Re: SQLFORM.grid custom labels in edit form for each row

2011-12-16 Thread Anthony
In your table definition, you can specify a 'label' argument for each field, and I think that can be whatever you want (e.g., an IMG tag, etc.). db.define_table('mytable', Field('myfield', label=IMG(_src=URL('static','img/myimage.png' Haven't tried it, but hopefully should work. Anthony O

[web2py] SQLFORM.grid custom labels in edit form for each row

2011-12-16 Thread brushek
Hello, I would like to have images instead of text (or text AND image) in each label for row, when I click edit in form generated by SQLFORM.grid. How to do this in easiest way ? Regards brushek

[web2py] Re: MARKMIN indentation

2011-12-16 Thread Massimo Di Pierro
You problem is parsing invalid HTML or an HTML with non-utf8 encoding. web2py is not the tool for that. Use beautiful soup to parse it and then serialize it back to valid HTML in utf8. Then you can use TAG().flatten(...) On Dec 16, 2:45 pm, Vasile Ermicioi wrote: > so what to do? > please giv

Re: [web2py] question about view, rows query and table generate with sqltable

2011-12-16 Thread Richard Vézina
In that example, I have a real (not virtual field) hmd5 field that store md5_hash in DB... On Fri, Dec 16, 2011 at 4:14 PM, Richard Vézina wrote: > Ok, so it's possible (but extremely rare) that I get differents hash by > doing this : > > def ... > rows = db(db[request.args(0)].id>0).select(

Re: [web2py] question about view, rows query and table generate with sqltable

2011-12-16 Thread Richard Vézina
Ok, so it's possible (but extremely rare) that I get differents hash by doing this : def ... rows = db(db[request.args(0)].id>0).select(db[request.args(0)].ALL) list_of_row_md5h = [] for r in rows: list_of_row_md5h.append((r.id,r.hmd5)) table = SQLTABLE(rows, columns=+[ re

[web2py] Re: pack application from other script

2011-12-16 Thread Alex
no ideas? maybe there is a way to pack the application from the command line? I could also call this from my python script. On 11 Dez., 15:12, Alex wrote: > I have a python deployment script where I update the build info (build > nr., build date), compile the application, pack it and finally upl

Re: [web2py] question about view, rows query and table generate with sqltable

2011-12-16 Thread Anthony
> > def func(): > rows = db().select(db.test1.ALL) <-- query executed here - results > stored in rows object > table = SQLTABLE(rows) <-- rows object converted to SQLTABLE object > Note, the SQLTABLE object isn't serialized to an actual HTML table until the view where it is inserted is

[web2py] Re: do import module work in gae?

2011-12-16 Thread howesc
i haven't upgraded yet, but i believe the patch was applied, and i patched my versions. i'm using imports like mad, so we know it can work. so joseph, let us know if the latest versions don't work. cfh

[web2py] question about view, rows query and table generate with sqltable

2011-12-16 Thread Richard
Hello, I would like to better understand what web2py exactly do... Say I have this controller function : def func(): rows = db().select(db.test1.ALL) table = SQLTABLE(rows) return dict(table=table) I would like to know when exactly the query contained into rows will be effectively e

Re: [web2py] Re: MARKMIN indentation

2011-12-16 Thread Vasile Ermicioi
so what to do? please give me an advice

[web2py] Re: Table naming fiasco - need advice

2011-12-16 Thread pbreit
I like singular table names but it's a bit of a religious war. Plural seems better when doing SQL queries but singular feels better with DAL queries. I'm not sure Web2py's migrations can change a table name while preserving the data. You might need to make the change manually and then update you

Re: [web2py] Re: 1.99.4 is OUT

2011-12-16 Thread Christopher Steel
At the moment the Pypi version gets created by hand and the process is rather fragile. While this is something that I believe we should be able to automate I also suspect that doing so is going to lead to some other issues for developers who are less familiar with the Pypi version of Web2py. Un

[web2py] Re: Table naming fiasco - need advice

2011-12-16 Thread Andrew
The name of a table should be what a single row represents. That is standard relational modeling practice. I would change them. On Dec 17, 3:50 am, Anthony wrote: > You can do: > > db.define_table('locations', ..., singular='Location', plural='Locations') > > or as Jim suggests: > > db.locati

Re: [web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-16 Thread Anthony
I tend to agree. On Friday, December 16, 2011 2:39:06 PM UTC-5, thstart wrote: > > I believe this is a bug - it should be consistent - > when I state: db.auth_user.email.requires.in**sert(0, IS_LOWER()) > > On Fri, Dec 16, 2011 at 11:33 AM, Anthony wrote: > >> When using email as the login us

[web2py] Re: smartgrid - still not resolving a problem

2011-12-16 Thread Adi
We got it working :) The code bellow may help someone else with a similar problem... Not sure if it's the most elegant way, but it works... In a controller, we created a function: def fn_sku(): row=db(db.sku.id == request.vars['po_sku_id']).select().first() sku_cpu = row.cpu return

Re: [web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-16 Thread Constantine Vasil
I believe this is a bug - it should be consistent - when I state: db.auth_user.email.requires.in**sert(0, IS_LOWER()) On Fri, Dec 16, 2011 at 11:33 AM, Anthony wrote: > When using email as the login username, looks like auth.login() > temporarily replaces the email field validator(s) with just a

[web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-16 Thread Anthony
When using email as the login username, looks like auth.login() temporarily replaces the email field validator(s) with just an IS_EMAIL validator (maybe that should be changed). So, for login, you probably need to use an onvalidation function to convert to lowercase. Anthony On Friday, Decembe

[web2py] Re: Customizing SQLFORM.grid create, edit and update forms

2011-12-16 Thread Cliff
Nice. It seems I recall that form.process() does not handle inserted fields. Just something to look out for when you get to the next stage. On Dec 16, 11:03 am, whowhywhat wrote: > wow .. it works! :) ... > > i just added the following in the controller (after calling SQLFORM.grid): > > #check

[web2py] Re: do import module work in gae?

2011-12-16 Thread Massimo Di Pierro
Wan't this fixed in 1.99.3? If not, please open a ticket. On Dec 16, 11:57 am, Joseph Jude wrote: > Module import work in standalong web2py but not in gae. Version: 1.99.2 > (2011-09-26 06:55:33). Help appreciated. > > Thanks, > Joseph

[web2py] Re: 1.99.4 is OUT

2011-12-16 Thread Massimo Di Pierro
Can you send me a patch? On Dec 16, 10:36 am, Alvaro Lizama Molina wrote: > The setup.py don't work > > I apply the files fromhttp://code.google.com/p/web2pypi/and problem > solved. > > 2011/12/15 Massimo Di Pierro > > > > > > > > > > > Sorry I had missed this. Will fix shortly. > > > On Dec 14,

[web2py] do import module work in gae?

2011-12-16 Thread Joseph Jude
Module import work in standalong web2py but not in gae. Version: 1.99.2 (2011-09-26 06:55:33). Help appreciated. Thanks, Joseph

[web2py] Re: ldap failed Version 1.99.4

2011-12-16 Thread Massimo Di Pierro
Fixed! thanks everybody. On Dec 15, 7:46 pm, Nik Go wrote: > Everytime a *new* stable version is out, I come to expect minor releases > happening in the next several days and try to hold off my own upgrade for > as long as possible. :P > > > > > > > > On Friday, December 16, 2011, Massimo Di Pier

[web2py] Re: email/password login only: How to change email to lower case at the register page and store as a lower case to the database.

2011-12-16 Thread thstart
OK I added this code after database definition: db.auth_user.email.requires.insert(0, IS_LOWER()) So it is always present with register and login. Now register is working as expected - e.g. if I create first an account with lower case email and then try to create an account with same email bu

Re: [web2py] Re: Imports out of the function in a controll

2011-12-16 Thread Anthony
Is the 'request' error in mymodule.py? Note, you can't access the 'request' object in modules. You have to use current.request -- see http://web2py.com/book/default/chapter/04#Accessing-the-API-from-Python-modules. Perhaps you're not getting an error when the import is in a function simply bec

[web2py] Cron on FluxFlex

2011-12-16 Thread John Oliva
Is it possible to use either hard or external cron on fluxflex.com or is soft cron the only option? Thanks, John

Re: [web2py] Re: Imports out of the function in a controll

2011-12-16 Thread Alvaro Lizama Molina
If i do default.py def index(): import mymodule Its ok But if i do default.py import mymodule def index(): some code here Its show an error where the error say NameError: name 'request' is not defined I dont import the module in each function, i want import only one time. 2011/

[web2py] Re: Imports out of the function in a controll

2011-12-16 Thread Anthony
Can you give an example? On Friday, December 16, 2011 11:43:00 AM UTC-5, nekrox wrote: > > > Each time when i try import a module out of a function python show a > error saying they would not find request. > > I have to necessarily import all modules inside of a function? > > -- > Alvaro Lizama

[web2py] Re: site-packages how?

2011-12-16 Thread Anthony
On Friday, December 16, 2011 10:42:50 AM UTC-5, Phyo Arkar wrote: > > What is site packages inside web2py for? > can just place modules and call from any apps? > You should be able to.

Re: [web2py] referenced auth.user_id type string

2011-12-16 Thread Anthony
On Friday, December 16, 2011 11:01:37 AM UTC-5, thodoris wrote: > > What do you mean handle it in application logic? How/when do i detect from > my app that a user has been deleted? > Presumably you have code that deletes users (perhaps via an update form with the delete option available, or som

[web2py] Imports out of the function in a controll

2011-12-16 Thread Alvaro Lizama Molina
Each time when i try import a module out of a function python show a error saying they would not find request. I have to necessarily import all modules inside of a function? -- Alvaro Lizama Molina - http://alvarolizama.net

Re: [web2py] Re: 1.99.4 is OUT

2011-12-16 Thread Alvaro Lizama Molina
The setup.py don't work I apply the files from http://code.google.com/p/web2pypi/ and problem solved. 2011/12/15 Massimo Di Pierro > Sorry I had missed this. Will fix shortly. > > On Dec 14, 5:33 pm, Paolo Caruccio wrote: > > I already wrote how i fixed the issue (tested only IE9, chrome 15, >

[web2py] Re: Table naming fiasco - need advice

2011-12-16 Thread Cliff
Thanks. I didn't know about the _singular and _plural attributes. On Dec 16, 9:50 am, Anthony wrote: > You can do: > > db.define_table('locations', ..., singular='Location', plural='Locations') > > or as Jim suggests: > > db.locations._singular = 'Location' > db.locations._plural = 'Locations' >

[web2py] grid edit custom label for fields

2011-12-16 Thread brushek
Hello web2py users ;), I'm using SQLFORM.grid to create form. I wuold like to change labels in edit form from fields name to (for example) images. How to this ? regards brushek

Re: [web2py] Re: the Set class should be deprecated

2011-12-16 Thread Jonathan Lundell
On Dec 16, 2011, at 1:44 AM, Brian Will wrote: > I concede that for web2py's current user base, this is a minor point > of null concern, but I feel it's a notable blemish in an otherwise > exceptionally clean and well-thought-out API, and a few blemishes like > this here and there can represent se

[web2py] Re: Customizing SQLFORM.grid create, edit and update forms

2011-12-16 Thread whowhywhat
wow .. it works! :) ... i just added the following in the controller (after calling SQLFORM.grid): #check if form is a create form if len(request.args)>1 and request.args[-2]=='new' and form.create_form: my_extra_element = TR(LABEL('Married'),INPUT(_name='married',value=False,_type='checkbo

Re: [web2py] referenced auth.user_id type string

2011-12-16 Thread thodoris
What do you mean handle it in application logic? How/when do i detect from my app that a user has been deleted?

Re: [web2py] Re: SQLFORM.grid and query

2011-12-16 Thread JmiXIII
Thank you for your support. I'm working on my side to adapt my controller, but I'm not so good to provide a general solution. JmiXIII

[web2py] site-packages how?

2011-12-16 Thread Phyo Arkar
What is site packages inside web2py for? can just place modules and call from any apps?

Re: [web2py] Re: Pycharm 2 is out

2011-12-16 Thread Phyo Arkar
I will vote but now i am totally in match with Komodo7, Very easy to support web2py using build-in komodo tools and its super powrful scripting using Python or Javascript. On Fri, Dec 16, 2011 at 9:24 PM, Michele Comitini < michele.comit...@gmail.com> wrote: > voted! > > 2011/12/16 chandrakant k

Re: [web2py] Re: SQLFORM.grid and query

2011-12-16 Thread Jim Steil
I have submitted a ticket (along with a mod to SQLFORM.grid) on that and Massimo is waiting on me to bring my code to the latest trunk level. However, this issue is the reason that I haven't yet submitted it. I'd like to be able to find a way to handle the paging/sorting issue inside SQLFORM.

Re: [web2py] Re: SQLFORM.grid and query

2011-12-16 Thread JmiXIII
I agree with Jim S. The grid is completely blank because it has lost the data. Just discover it; I think a nice way would be to use smartgrid: form=SQLFORM.smartgrid(db.Rebuts, details=False, csv=False, search_widget=selection,

[web2py] Re: Customizing SQLFORM.grid create, edit and update forms

2011-12-16 Thread Anthony
> > is there a simpler way to just insert some extra elements like > http://web2py.com/book/default/chapter/07#Adding-extra-form-elements-to-SQLFORM > . > I tried this, but this throws up an error (I will check and get back) > That's the way to do it. You can also use the .element() and .elem

[web2py] Re: the Set class should be deprecated

2011-12-16 Thread Anthony
On Friday, December 16, 2011 12:45:12 AM UTC-5, Brian Will wrote: > > Something like: > > (db.mytable.id == 3).ignore_common_filters().select() > A bit ugly, and gets worse if we add more arguments in the future. > Or: > > (db.mytable.id == 3).select(ignore_common_filters=True) > Not i

[web2py] Re: Customizing SQLFORM.grid create, edit and update forms

2011-12-16 Thread whowhywhat
:) .. that sounds right.. i guess i can just add some jquery in the view with a condition to check if the view is for edit or create form. The jquery could just insert the checkbox (if married etc.).. if checked i could use jquery to un-hide the spouse name field row. I will also try out the cu

[web2py] Re: migrate passwords from phpBB

2011-12-16 Thread Anthony
> > Unfortunately this solution will not work for me as I get a different > hash every time I call the hash password function for the same > plaintext password. > What hash function are you using. If you use the same key, it should always return the same output for a given input.

Re: [web2py] referenced auth.user_id type string

2011-12-16 Thread Anthony
On Friday, December 16, 2011 6:31:11 AM UTC-5, thodoris wrote: > > Thanks for your answers guys. I have another question related to this > topic. > > Say i want to reference an authorized user instead of a person table: > > db.define_table('cat', > Field('name'), > Field('owner', db.auth_

[web2py] Re: Customizing SQLFORM.grid create, edit and update forms

2011-12-16 Thread Anthony
On Friday, December 16, 2011 9:39:46 AM UTC-5, whowhywhat wrote: > > i am trying to figure out the SQLFORM.grid from the source. The create and > update forms are generated using SQLFORM and not crud.. my mistake thinking > this was done by CRUD. I guess i will need to customize the form by passi

Re: [web2py] Re: Pycharm 2 is out

2011-12-16 Thread Michele Comitini
voted! 2011/12/16 chandrakant kumar : > +1

Re: [web2py] Re: Pycharm 2 is out

2011-12-16 Thread chandrakant kumar
+1

Re: [web2py] Table naming fiasco - need advice

2011-12-16 Thread Anthony
You can do: db.define_table('locations', ..., singular='Location', plural='Locations') or as Jim suggests: db.locations._singular = 'Location' db.locations._plural = 'Locations' I think the automatic pluralizer assumes the table name is singular. Maybe it should first try to assess whether the

[web2py] Re: Pycharm 2 is out

2011-12-16 Thread Omi Chiba
Voted ! though we have a good web IDE available out of box. On Dec 16, 8:28 am, whowhywhat wrote: > i voted  :) .. web2py deserves support from every decent IDE

Re: [web2py] Re: SQLFORM.grid and query

2011-12-16 Thread Jim Steil
The problem is that the 'selection' form isn't being resubmitted therefore its values aren't available in the request object on subsequent calls to your controller method. What I've done in the past is to save the 'selection' form values to cookies (or possibly the session object) whenever the

[web2py] Re: Customizing SQLFORM.grid create, edit and update forms

2011-12-16 Thread whowhywhat
i am trying to figure out the SQLFORM.grid from the source. The create and update forms are generated using SQLFORM and not crud.. my mistake thinking this was done by CRUD. I guess i will need to customize the form by passing form.create_form.append(whatever) .. is this the right way? .. i will

Re: [web2py] Table naming fiasco - need advice

2011-12-16 Thread Jim Steil
You could also just manually set the plural name so you don't have to rename your tables. db.locations._plural = 'Locations' -Jim On 12/16/2011 8:26 AM, Cliff wrote: I gave my tables plural names, for example locations as opposed to location. Smartgrid pluralizes them again to locationse

[web2py] Re: SQLFORM.grid and query

2011-12-16 Thread Cliff
Do you get a 'No records found' message, or is the data table completely gone? On Dec 16, 4:33 am, JmiXIII wrote: > I have a problem using SQLFORM.grid and a query from a FORM: > Here is my controller > > def synthese(): >     ListeFamille=db(db.ATPOSTE.id>0).select(orderby=db.ATPOSTE.PS_FAMI) >

[web2py] Re: Pycharm 2 is out

2011-12-16 Thread whowhywhat
i voted :) .. web2py deserves support from every decent IDE

[web2py] Re: MySQL constraints not updated but appended to old ones

2011-12-16 Thread Massimo Di Pierro
unfortunately web2py does not migrate constraints. You have to remove it yourself. On Dec 16, 5:51 am, thodoris wrote: > I have a field > >     Field('uUser2', db.auth_user, default=auth.user_id), > > at some moment i added ondelete="CASCADE" > > later i changed it to ondelete="NO ACTION" > > but

[web2py] Table naming fiasco - need advice

2011-12-16 Thread Cliff
I gave my tables plural names, for example locations as opposed to location. Smartgrid pluralizes them again to locationses. Not what I want. Do I have to rename the tables or is there another alternative? If I do have to rename tables, will this work? 1. Create a second set of tables with sin

[web2py] Re: grid search exceptions

2011-12-16 Thread Massimo Di Pierro
Can you please open a ticket about this? On Dec 16, 12:10 am, Nik Go wrote: > A grid search causes an exception when a user enters an unexpected field > type. > > I have this field: > > Field('gender', 'integer', default=0, > requires=IS_IN_SET([(0,'Unknown'), (1, 'Male'), (2, 'Female')]) > > Sin

[web2py] Re: Webfaction: app memory quota upgraded to 256MB for everyone

2011-12-16 Thread Plumo
excellent news - 80 MB wasn't enough for web2py + Apache on webfaction.

[web2py] Re: Customizing SQLFORM.grid create, edit and update forms

2011-12-16 Thread whowhywhat
Thanks a lot for the prompt reply Cliff. The tip you gave me is something i did not know about and will be handy.. However this is useful to modify the grid in itself. I need some way to modify the subsequent Create, Edit and Update pages (if grid is editable). That is if i click on the add butt

[web2py] Webfaction: app memory quota upgraded to 256MB for everyone

2011-12-16 Thread Jose
On 16 dic, 10:14, Jose wrote: > Six months ago we started using much beefier servers for our shared > hosting plans. We also started upgrading the hardware on our existing > servers. We did that because we wanted to give you as much memory for > your apps as possible without overselling the RAM

[web2py] app memory quota upgraded to 256MB for everyone

2011-12-16 Thread Jose
Six months ago we started using much beefier servers for our shared hosting plans. We also started upgrading the hardware on our existing servers. We did that because we wanted to give you as much memory for your apps as possible without overselling the RAM and overloading the servers. Today we'r

[web2py] Re: Customizing SQLFORM.grid create, edit and update forms

2011-12-16 Thread Cliff
The grid acts like a DIV(). So if form=SQLFORM.grid Then form[0] is the shaded area with the search bar. Likewise form[1] is the table with the data in it. You could do form[1].append(whatever) or form[1].insert(-1, stuff). form.process().accepted becomes form[1].process().accepted If I recall

[web2py] Re: Solidform: key-error

2011-12-16 Thread luismurciano
may be you should as Hosoda Kenji himself, he's a kind guy, and solve a bug i found in just few days. you can ask him in the comments section in the plugin page. On 15 dic, 11:17, Johann Spies wrote: > I get > >   table = self.createform(xfields) >   File "applications/init/modules/plugin_solidfo

[web2py] Re: Pycharm 2 is out

2011-12-16 Thread luismurciano
I voted. I my opinion every web2py user should vote (you can use a gmail acount to login) because even if you dont need a pycharm support yourself, proyects and IDE's including web2py support place this framework in the place it should be, on top. Currently the web2py support has more votes than F

[web2py] MySQL constraints not updated but appended to old ones

2011-12-16 Thread thodoris
I have a field Field('uUser2', db.auth_user, default=auth.user_id), at some moment i added ondelete="CASCADE" later i changed it to ondelete="NO ACTION" but when i checked my db i had KEY `rUser2__idx` (`ruser2`), CONSTRAINT `sounds_ibfk_1` FOREIGN KEY (`ruser`) REFERENCES `auth_user

Re: [web2py] referenced auth.user_id type string

2011-12-16 Thread thodoris
Thanks for your answers guys. I have another question related to this topic. Say i want to reference an authorized user instead of a person table: db.define_table('cat', Field('name'), Field('owner', db.auth_user, default=auth.user_id,readable=False,writable=False),) So that the "owne

[web2py] Re: migrate passwords from phpBB

2011-12-16 Thread greenguerilla
Hi, I tested using a custom login_onvalidation method: auth.settings.login_onvalidation = PHPBBDECRYPT() Using this method I get the form and I can manipulate it's variables prior to returning the form, however as far as I can see I would be expected to return the hashed value that will later be

  1   2   >