Re: [web2py] Re: Resizing a user uploaded image

2013-01-09 Thread Daniele Pestilli
No, just regular web2py webserver on my machine. Jan 9, 2013 2:36 AM、Bruno Rocha rochacbr...@gmail.com のメッセージ: are you running on Google App Engine? -- --

[web2py] Resizing a user uploaded image

2013-01-08 Thread Daniele
How can i make it so that when a user uploads an image, it automatically gets resized to a specified dimension? Thanks! --

Re: [web2py] Re: Resizing a user uploaded image

2013-01-08 Thread Daniele Pestilli
I put imageutils in my app's modules directory, then I added: Field(thumbnail, upload, uploadfolder=os.path.join(request.folder, 'uploads', 'profiles', 'thumbs')), to the appropriate database table, and below that, in the same file (db.py) I wrote: from imageutils import THUMB

Re: [web2py] Re: Resizing a user uploaded image

2013-01-08 Thread Daniele Pestilli
...@gmail.com wrote: Yeah it is a problem in THUMB function, thumb function looks for files under /uploads and you are defining another folder. change the imageutils module replacing /uploads with /uploads/profile On Tue, Jan 8, 2013 at 9:30 PM, Daniele Pestilli byakugan...@gmail.comwrote: I put

Re: [web2py] Re: Resizing a user uploaded image

2013-01-08 Thread Daniele Pestilli
It seems to be uploading the full-sized image properly but for the thumb it says 'thumbnail': None where thumbnail is the field name in the db.py file. On Wed, Jan 9, 2013 at 1:06 AM, Daniele Pestilli byakugan...@gmail.comwrote: Hmm still not working. I'm wondering if this is the problem

[web2py] Delete a user

2013-01-07 Thread Daniele
What's the correct way of deleting a user? Say someone creates an account on my page and wants to remove him/herself. How can I do this? Thank you! --

Re: [web2py] Delete a user

2013-01-07 Thread Daniele Pestilli
Well, I know I can do this from the admin interface but I was wondering how a user can remove himself from the website if he so wishes. Should I put the code `db(db.auth_user.email==some...@domain.com).delete()` in a {{=A(_href=action)}} or is that bad practice? I want the user to be able to

Re: [web2py] Re: web2py 2.3.2 added + - to some form elements

2012-12-20 Thread Daniele
On Tuesday, December 18, 2012 8:17:11 AM UTC-8, Daniele wrote: The newest version of web2py has added some + and - clickable links to form elements so that it is possible to remove the element. However, if there is only one element and one clicks the -, the form disappears and there's

[web2py] web2py 2.3.2 added + - to some form elements

2012-12-18 Thread Daniele
The newest version of web2py has added some + and - clickable links to form elements so that it is possible to remove the element. However, if there is only one element and one clicks the -, the form disappears and there's no way to get the form element back without refreshing the page. I'll

[web2py] Re: Add button to form access from view

2012-12-18 Thread Daniele
. ;-) On Saturday, 15 December 2012 11:35:28 UTC-6, Daniele wrote: I want to do something very simple but it's taking me eons to do this~ When the button is clicked, I want a javascript alert to pop up that asks, are you sure? Yes/No. If Yes, then run this code: auth.del_membership('role

Re: [web2py] Re: Add button to form access from view

2012-12-18 Thread Daniele Pestilli
Sure thing Massimo, here's my view: http://bpaste.net/show/nSrzmYsurH2CnXLrpdwJ/ here's my controller: http://bpaste.net/show/KEx38v6ARYgsUwG8oXMd/ Daniele On Tue, Dec 18, 2012 at 5:07 PM, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Please post your code so we can try it. Are you

[web2py] Re: Add button to form access from view

2012-12-18 Thread Daniele
() ... and the response flash will be injected in the proper place. On Tuesday, 18 December 2012 10:49:28 UTC-6, Daniele wrote: Still isn't working for me :'( In my view, I have: div id=deltutor{{=A('Delete Role',_class=btn btn-danger,_id='deltutorlink', callback=URL('edit_profile

[web2py] Re: Add button to form access from view

2012-12-15 Thread Daniele
It's quite pathetic that web2py doesn't provide a BUTTON helper by the way... On Monday, December 10, 2012 9:15:30 PM UTC, Daniele wrote: When I use form.add_button() I am able to add a button to a form, which I can display with {{=form}} in my view. However, if I'm making a custom form

[web2py] Re: Add button to form access from view

2012-12-15 Thread Daniele
understand why the form is being submitted via other buttons as well. Does anyone know why this is??? On Monday, December 10, 2012 9:15:30 PM UTC, Daniele wrote: When I use form.add_button() I am able to add a button to a form, which I can display with {{=form}} in my view. However, if I'm

[web2py] Re: Add button to form access from view

2012-12-15 Thread Daniele
Please pardon my ignorance, I didn't know there was a button helper. And thanks Massimo, I'll give the A with the class btn a try now! On Monday, December 10, 2012 9:15:30 PM UTC, Daniele wrote: When I use form.add_button() I am able to add a button to a form, which I can display

[web2py] Re: Add button to form access from view

2012-12-15 Thread Daniele
I am trying with: {{=A('Delete Role', _class=btn btn-danger, _id=del_role_tutor, callback=URL('test'), target=:eval)}} and in my controller: def test(): return Hello or def test(): return dict() but nothing happens. Why is this?? On Monday, December 10, 2012 9:15:30 PM UTC, Daniele

[web2py] Re: Add button to form access from view

2012-12-15 Thread Daniele
exactly how your code looks like. On Saturday, 15 December 2012 09:08:37 UTC-6, Daniele wrote: I am trying with: {{=A('Delete Role', _class=btn btn-danger, _id=del_role_tutor, callback=URL('test'), target=:eval)}} and in my controller: def test(): return Hello or def test

[web2py] Re: Add button to form access from view

2012-12-14 Thread Daniele
-6, Daniele wrote: Ok. What's the correct way of associating an action to the HTML button with web2py? On Tuesday, December 11, 2012 12:30:34 AM UTC, Massimo Di Pierro wrote: This is not worth it. If you make a custom form than you are using html, you may as well make the button in html

[web2py] Re: Add button to form access from view

2012-12-14 Thread Daniele
I'm also trying this but it doesn't work: button onclick={{auth.del_membership('role'))}} class=btn btn-dangerDelete Role/button On Monday, December 10, 2012 9:15:30 PM UTC, Daniele wrote: When I use form.add_button() I am able to add a button to a form, which I can display with {{=form

[web2py] Re: Add button to form access from view

2012-12-14 Thread Daniele
So it's not possible to do this with a button? On Monday, December 10, 2012 9:15:30 PM UTC, Daniele wrote: When I use form.add_button() I am able to add a button to a form, which I can display with {{=form}} in my view. However, if I'm making a custom form using form.custom, how can I

[web2py] Re: Add button to form access from view

2012-12-11 Thread Daniele
December 2012 15:15:30 UTC-6, Daniele wrote: When I use form.add_button() I am able to add a button to a form, which I can display with {{=form}} in my view. However, if I'm making a custom form using form.custom, how can I display that button?? Thanks --

[web2py] Add button to form access from view

2012-12-10 Thread Daniele
When I use form.add_button() I am able to add a button to a form, which I can display with {{=form}} in my view. However, if I'm making a custom form using form.custom, how can I display that button?? Thanks --

[web2py] Adding a button to a form and adding an action

2012-12-09 Thread Daniele
Hello guys, I'm trying to add a button to a form and when clicked, I'd like for an action to be called that erases a record from the db. I saw the butting addition can be done with form.add_button('Delete Record', URL('other_page')) However, I am wondering how I can tie in an action instead of

[web2py] Re: Displaying an image

2012-12-09 Thread Daniele
images to display. I really am having a hard time figuring out how this works... -_- sorry guys On Wednesday, December 5, 2012 2:06:57 PM UTC, Daniele wrote: Guys I know this sounds simple but I'm having a hard time displaying uploaded images. I have an upload field in my model where logged

[web2py] Re: Displaying an image

2012-12-09 Thread Daniele
WOHO!!! I GOT IT!!! I needed to put URL('download', args=images[0]) I was spending time trying to figure out what the heck that request.args[-1]thing was. Is that even necessary? On Wednesday, December 5, 2012 2:06:57 PM UTC, Daniele wrote: Guys I know this sounds simple but I'm

[web2py] Re: Displaying an image

2012-12-08 Thread Daniele
the image. I don't know why I can't do something so simple -_- Any help is greatly appreciated. Daniele On Wednesday, December 5, 2012 2:06:57 PM UTC, Daniele wrote: Guys I know this sounds simple but I'm having a hard time displaying uploaded images. I have an upload field in my model

[web2py] Tick checkbox if user has_membership

2012-12-08 Thread Daniele
I want to tick a checkbox if a user has membership to something, else leave unticked. I tried putting it in the Field's default variable as such, Field('is_tutor', 'boolean', default=auth.has_membership(auth.user_id, 'Tutors')) but this is causing an error. What's the correct way to do this?

[web2py] Unable to update database

2012-12-07 Thread Daniele
I am unable to update entries in my database. I think I have an idea of why this may be, but I'm not sure how to go about fixing this. In my controller, I have: tform = SQLFORM.factory( Field('is_tutor', 'boolean'), *[f for f in db.tutor if f.name.startswith('t_')],

[web2py] Re: Unable to update database

2012-12-07 Thread Daniele
, 2012 5:54:58 PM UTC-5, Daniele wrote: I am unable to update entries in my database. I think I have an idea of why this may be, but I'm not sure how to go about fixing this. In my controller, I have: tform = SQLFORM.factory( Field('is_tutor', 'boolean'), *[f for f

[web2py] Re: Unable to update database

2012-12-07 Thread Daniele
the table now so, thanks for the help ;) On Friday, December 7, 2012 11:38:52 PM UTC, Daniele wrote: Ok that seems to have done the trick. However, it's creating a new record every time which means that the logged in user does not refer to the tutor table. Does the id field have

[web2py] Re: Unable to update database

2012-12-07 Thread Daniele
Worked!!! Thanks s much this has been bugging me for a while. On Saturday, December 8, 2012 12:15:49 AM UTC, Anthony wrote: db.define_table('tutor', Field('user', 'reference auth.user.id'), ...) This is not correct. It should be 'reference [table name]', so in this case,

Re: [web2py] Re: Displaying an image

2012-12-06 Thread Daniele Pestilli
I noticed that I am missing upload=URL('download') in my SQLFORM.factory, so I added that in there but it's still not working. I double checked the image name and you were right, I don't know how I must have mistakenly deleted that part but it was indeed [table_name].[field_name].[rand_string] I

Re: [web2py] Re: Displaying an image

2012-12-06 Thread Daniele Pestilli
of errors now. I never thought uploading and viewing an image could be this complicated. On Thu, Dec 6, 2012 at 1:33 PM, Daniele Pestilli byakugan...@gmail.comwrote: I noticed that I am missing upload=URL('download') in my SQLFORM.factory, so I added that in there but it's still not working. I double

Re: [web2py] Re: Displaying an image

2012-12-06 Thread Daniele Pestilli
of the relevant model and controller code. Anthony On Thursday, December 6, 2012 8:33:10 AM UTC-5, Daniele wrote: I noticed that I am missing upload=URL('download') in my SQLFORM.factory, so I added that in there but it's still not working. I double checked the image name and you were

Re: [web2py] Re: Displaying an image

2012-12-06 Thread Daniele Pestilli
. Anthony On Thursday, December 6, 2012 8:51:02 AM UTC-5, Daniele wrote: Ok here's my code: in db.py from gluon.tools import Auth, Crud, Service, PluginManager, prettydate auth = Auth(db) auth.settings.extra_fields['**auth_user']= [ # t denote tutor fields, s denote student fields

Re: [web2py] Re: Displaying an image

2012-12-06 Thread Daniele Pestilli
maybe instead of adding on to auth, I should just create two separate tables and have them reference auth On Thu, Dec 6, 2012 at 3:05 PM, Daniele Pestilli byakugan...@gmail.comwrote: this just completely broke my website -_- Now I can't even sign a user up anymore because it's requesting

Re: [web2py] Re: Displaying an image

2012-12-06 Thread Daniele Pestilli
On Thursday, December 6, 2012 10:05:43 AM UTC-5, Daniele wrote: this just completely broke my website -_- Now I can't even sign a user up anymore because it's requesting all those additional fields. On Thu, Dec 6, 2012 at 2:33 PM, Anthony abas...@gmail.com wrote: You are using

[web2py] Displaying an image

2012-12-05 Thread Daniele
Guys I know this sounds simple but I'm having a hard time displaying uploaded images. I have an upload field in my model where logged in users can upload an image. But in my views when I try to do {{=IMG(_src=URL('uploads/', row.image))}} where row is a variable that refers to

[web2py] Re: Displaying an image

2012-12-05 Thread Daniele
UTC-5, Daniele wrote: Guys I know this sounds simple but I'm having a hard time displaying uploaded images. I have an upload field in my model where logged in users can upload an image. But in my views when I try to do {{=IMG(_src=URL('uploads/', row.image))}} where row is a variable

Re: [web2py] Re: Displaying an image

2012-12-05 Thread Daniele Pestilli
/. {{=URL('default', 'download', args=row.image)}} is just the portion to put into the img tag as the src's attribute value {{=IMG( _src=URL('default', 'download', args=row.image) ) }} is the right one! On Wednesday, December 5, 2012 6:36:10 PM UTC+1, Daniele wrote: I have def

Re: [web2py] Re: Displaying an image

2012-12-05 Thread Daniele Pestilli
Yeah I checked my controller and it's uploading images to Field('image', 'upload', uploadfolder=os.path.join(request.folder,'uploads/profiles/') Is there a default directory where the download() function wants images to be? On Wed, Dec 5, 2012 at 5:55 PM, Daniele Pestilli byakugan

[web2py] Re: Displaying an image

2012-12-05 Thread Daniele
', 'upload', uploadfolder=os.path.join(request.folder,'uploads/profiles/') Should I just change the view to read URL('uploads/profiles/', 'download', args=row.image) or would that be an inelegant solution? On Wednesday, December 5, 2012 2:06:57 PM UTC, Daniele wrote: Guys I know this sounds simple

[web2py] Re: Check if a from's boolean is true or false from the controller

2012-12-04 Thread Daniele
with e.g. SQLFORM.factory because generally your form.vars would be ready to be inserted into the table if the form has the same structure of the table itself, e.g. db.table.insert(**form.vars)) On Monday, December 3, 2012 3:27:29 PM UTC+1, Daniele wrote: Hey guys, I'm wondering if there's a way

[web2py] Re: Check if a from's boolean is true or false from the controller

2012-12-04 Thread Daniele
need this stored next to the auth_user table the recommended way is extending auth_user with auth.settings.extra_fields On Tuesday, December 4, 2012 5:21:59 PM UTC+1, Daniele wrote: OK. So I removed what I had before (tables in a database) and moved to SQLFORM.factory. I now have this in my

[web2py] Re: Check if a from's boolean is true or false from the controller

2012-12-04 Thread Daniele
have to specify that it only needs to delete these for the logged in user. How can I do this? Also, is deleting the correct thing to do or should I just reset the values to a default, like or None ? Thanks On Monday, December 3, 2012 2:27:29 PM UTC, Daniele wrote: Hey guys, I'm wondering

[web2py] Re: Check if a from's boolean is true or false from the controller

2012-12-04 Thread Daniele
And the same goes for db.auth_user.insert() ... does it imply the logged user or not? On Monday, December 3, 2012 2:27:29 PM UTC, Daniele wrote: Hey guys, I'm wondering if there's a way from the controller to know whether a form's boolean field (checkbox) is selected or not. I only want

Re: [web2py] Re: Check if a from's boolean is true or false from the controller

2012-12-04 Thread Daniele Pestilli
are updated/created with the correct values. On Tuesday, December 4, 2012 8:34:31 PM UTC+1, Daniele wrote: And the same goes for db.auth_user.insert() ... does it imply the logged user or not? On Monday, December 3, 2012 2:27:29 PM UTC, Daniele wrote: Hey guys, I'm wondering if there's a way from

Re: [web2py] Re: Check if a from's boolean is true or false from the controller

2012-12-04 Thread Daniele Pestilli
input boxes. Am I supposed to somehow put the SQLFORM.factory info in my db.py file? I can't understand why it's doing this... On Wed, Dec 5, 2012 at 12:49 AM, Daniele Pestilli byakugan...@gmail.comwrote: How can I blank out all the **form.vars in the event that the form.vars.is_tutor returns

[web2py] Check if a from's boolean is true or false from the controller

2012-12-03 Thread Daniele
Hey guys, I'm wondering if there's a way from the controller to know whether a form's boolean field (checkbox) is selected or not. I only want to add the info in the form to the database if the checkbox is selected, otherwise the controller should not process that form. Thanks! --

[web2py] Re: Hide form and erase input

2012-12-02 Thread Daniele
using a completely custom form or were you able to manipulate the SQLFORM inside the controller? On Saturday, December 1, 2012 7:03:33 AM UTC-6, Daniele wrote: I ended up putting them in separate divs and hiding the entire div. Works like a charm! Thanks guys On Thursday, November 29, 2012

[web2py] Re: Proper way to reference logged user

2012-12-02 Thread Daniele
, but only as a last resort. Best wishes for your app, D On Saturday, 1 December 2012 13:13:13 UTC, Daniele wrote: Hmmm that's one option, but here's the problem. Basically, I want users to sign up very easily. So I'm just using web2py's default auth for that. Then, I'd like them to pick

[web2py] Re: Proper way to reference logged user

2012-12-02 Thread Daniele
(group_id, user_id) Am I on the money or is this incorrect? Thanks guys :D On Sunday, December 2, 2012 1:27:26 PM UTC, Daniele wrote: OK I think that's probably the easiest solution for now. How can I do this? Do I need to add auth.add_group('role', 'description') in my db.py file

Re: [web2py] Re: Proper way to reference logged user

2012-12-02 Thread Daniele Pestilli
response.flash = 'record inserted' On Sunday, December 2, 2012 9:35:38 PM UTC+8, Daniele wrote: Alright I've created the two groups with the web2py appadmin interface. Now I suppose the rest of the logic goes in the controller. I have a SQLFORM right now but it probably makes more

[web2py] Re: Hide form and erase input

2012-12-01 Thread Daniele
, November 29, 2012 11:07:46 AM UTC-5, Daniele wrote: I could do that. Would I need to add the div directly in the controller or the view? My controller looks something like this now: def mypage(): form = SQLFORM(db.mytable) return dict(form=form) I guess there should be a way to edit

[web2py] Re: Proper way to reference logged user

2012-12-01 Thread Daniele
participate in more than one group. It's easy to test for group membership -- just use the decorator: @auth.requires_membership('tutor') -- Joe B. On Tuesday, November 20, 2012 5:57:57 PM UTC-8, Daniele wrote: I am trying to build a model where each logged user can decide if he/she is a tutor

[web2py] Re: Hide form and erase input

2012-11-29 Thread Daniele
Hmm, that gets rid of the input boxes but not of the fieldnames as well. I guess I'll have to do it manually for each field. On Thursday, November 29, 2012 9:40:29 AM UTC, Niphlod wrote: $(:input) ? On Thursday, November 29, 2012 2:29:46 AM UTC+1, Daniele wrote: Hello all :) I have

[web2py] Re: Hide form and erase input

2012-11-29 Thread Daniele
On Thursday, November 29, 2012 3:50:25 PM UTC, Anthony wrote: Maybe you could put all the fields inside a div and then hide/show the whole div. Anthony On Thursday, November 29, 2012 7:45:22 AM UTC-5, Daniele wrote: Hmm, that gets rid of the input boxes but not of the fieldnames as well. I guess

[web2py] Re: Changing auth validator error messages

2012-11-28 Thread Daniele
I'd also like to change that error message value already in database or empty as I find it a pointless message. But I tried with db.auth_user.email.requires[0].error_message = T(The email you have entered has already been registered.) and it doesn't seem to change anything. Am I misplacing this?

[web2py] Re: Changing auth validator error messages

2012-11-28 Thread Daniele
Thanks, that did the trick! On Thursday, November 29, 2012 12:30:31 AM UTC, Mark Li wrote: db.auth_user.email.requires[1].error_message = T(The email you have entered has already been registered.) Try using the index of 1, not 0. On Wednesday, November 28, 2012 4:55:54 PM UTC, Daniele

[web2py] Re: web3py?

2012-11-28 Thread Daniele
I really believe web2py will indeed become the rails for python as someone mentioned. Actually, I believe it's much better, easier to use and comprehend, and more pleasant to develop in. That said, I agree web2py needs to reach a critical mass of users because as of now, it's too hard to get

[web2py] Hide form and erase input

2012-11-28 Thread Daniele
Hello all :) I have a db.define_table that defines a particular role and all its fields. One of the fields is a boolean, which will display as a checkbox in the SQLFORM. What I'd like to do is hide ALL the elements in the SQLFORM if the radiobutton is unchecked, and show all the elements if

[web2py] Re: How to get register_next to move on to the desired URL

2012-11-24 Thread Daniele
: Does the dashboard page require login? If so, that's why it is redirecting to the login page. If you want the user to be logged in automatically after registration, you can do: auth.settings.login_after_registration = True Anthony On Friday, November 23, 2012 8:34:01 AM UTC-5, Daniele wrote

[web2py] Re: How to get register_next to move on to the desired URL

2012-11-23 Thread Daniele
I still cannot get this to work. Any tips? On Sunday, November 18, 2012 10:51:14 PM UTC, Daniele wrote: Hey guys, I would like to set register_next to move on to a URL upon successful registration. However, it seems to be redirecting me to the login page right now. I believe this is because

[web2py] Email upon registration not working

2012-11-23 Thread Daniele
Hello all, I'm wondering why I cannot get the email upon registration to work. I've finally gotten basic emailing to work, but it doesn't seem to send anything automatically upon user registration. Here's my db.py file: from gluon.tools import Auth, Crud, Service, PluginManager, prettydate auth

[web2py] Re: Email upon registration not working

2012-11-23 Thread Daniele
' Do you have similar code? On Friday, 23 November 2012 09:26:57 UTC-6, Daniele wrote: Hello all, I'm wondering why I cannot get the email upon registration to work. I've finally gotten basic emailing to work, but it doesn't seem to send anything automatically upon user registration. Here's

[web2py] Re: Unable to send email in web2py

2012-11-22 Thread Daniele
Yeah I log into the account every day so there's no problem there. I am trying to set the setting mail.settings.server = 'logging' but I do not know where it logs the messages...does anyone know where I'd find them? On Wednesday, November 21, 2012 7:32:26 PM UTC, Daniele wrote: I'm trying

[web2py] Re: Unable to send email in web2py

2012-11-22 Thread Daniele
Still doesn't work. I'm starting to wonder if this isn't a problem with the fact that I have a custom signup page? On Wednesday, November 21, 2012 7:32:26 PM UTC, Daniele wrote: I'm trying to send emails upon user registration. This is what I have in my models file: mail

[web2py] Re: Unable to send email in web2py

2012-11-22 Thread Daniele
PM UTC, Daniele wrote: I'm trying to send emails upon user registration. This is what I have in my models file: mail = auth.settings.mailer mail.settings.server = 'smtp.gmail.com:587' mail.settings.sender = 'em...@gmail.com' #There's a proper email here mail.settings.login

[web2py] Re: Unable to send email in web2py

2012-11-22 Thread Daniele
decision to have mail.settings in the db.py file, then at the bottom have them reference another variable in a file called 0.pyseriously?? On Wednesday, November 21, 2012 7:32:26 PM UTC, Daniele wrote: I'm trying to send emails upon user registration. This is what I have in my models

[web2py] Re: Login error messages

2012-11-21 Thread Daniele
... On Wednesday, November 21, 2012 12:22:46 AM UTC, Daniele wrote: For some reason, I am not getting the right error messages to display on my login form. Right now, I'm getting the same errors that one should get upon registration, such as: Minimum length is 8 Must include at least 1 upper case

[web2py] Unable to send email in web2py

2012-11-21 Thread Daniele
I'm trying to send emails upon user registration. This is what I have in my models file: mail = auth.settings.mailer mail.settings.server = 'smtp.gmail.com:587' mail.settings.sender = 'em...@gmail.com' #There's a proper email here mail.settings.login = 'username:password' #There's a proper

[web2py] Re: Unable to send email in web2py

2012-11-21 Thread Daniele
I just tried port 25 as recommended on google's FAQ (http://support.google.com/mail/bin/answer.py?hl=enanswer=78775) Still nothing. I'm wondering how can I debug this? Is there a log file of what's happening behind the scenes here? On Wednesday, November 21, 2012 7:32:26 PM UTC, Daniele wrote

[web2py] Re: custom built login form

2012-11-20 Thread Daniele
Thanks that seems to have worked. This was totally undocumented (or if it was, it was in an obscure place because I looked quite hard for how to do this.) What does that XML(%s %s % (form.tag, form._xml()[0])) line do exactly? Also, say I want to style the button now...how can I do that? On

[web2py] Login error messages

2012-11-20 Thread Daniele
For some reason, I am not getting the right error messages to display on my login form. Right now, I'm getting the same errors that one should get upon registration, such as: Minimum length is 8 Must include at least 1 upper case Must include at least 1 number However, this is giving away too

[web2py] Proper way to reference logged user

2012-11-20 Thread Daniele
I am trying to build a model where each logged user can decide if he/she is a tutor or student or both. So the tutor table has to 'reference auth.settings.table_user_name' and student also has to have the same reference. The tutor/student/logged user have to be related by their id key I

[web2py] Re: Time of registration

2012-11-19 Thread Daniele
, readable=False) to make it automatic. On Friday, 16 November 2012 15:44:17 UTC-6, Daniele wrote: Guys I'm wondering when I get someone to register, I'd like to have a field in my database for the datetime. In my db.py file, I have a Field('registration_time', 'datetime') However, how do I pass

[web2py] Re: How to get register_next to move on to the desired URL

2012-11-19 Thread Daniele
## configure auth policy lines auth.settings.register_next = URL('user/profile') Peter On Sunday, 18 November 2012 22:51:14 UTC, Daniele wrote: Hey guys, I would like to set register_next to move on to a URL upon successful registration. However, it seems to be redirecting me

[web2py] Re: How to get register_next to move on to the desired URL

2012-11-19 Thread Daniele
, November 18, 2012 10:51:14 PM UTC, Daniele wrote: Hey guys, I would like to set register_next to move on to a URL upon successful registration. However, it seems to be redirecting me to the login page right now. I believe this is because I have @auth.requires_login() def mypage

[web2py] Re: changing the look of a form

2012-11-19 Thread Daniele
You're going to have to change the style via CSS. If it's an inbuilt form in web2py like the login one, good luck :P you will have to use the custom form widgets and do a bunch of somersaults. Try following this guide, it may help: http://web2py.com/book/default/chapter/07#FORM On Wednesday,

[web2py] Re: custom built login form

2012-11-19 Thread Daniele
Ah ok I just took a look at the HTML and saw that my code conflicts with what web2py is generating. Basically there's a form within a form being constructed, so it looks like this: form class=form-horizontalform action= enctype=multipart/form-data method=post To avoid this, how can I

[web2py] How to get register_next to move on to the desired URL

2012-11-18 Thread Daniele
Hey guys, I would like to set register_next to move on to a URL upon successful registration. However, it seems to be redirecting me to the login page right now. I believe this is because I have @auth.requires_login() def mypage: in the controller. How can I make it so that when a user

[web2py] Encrypting password verify

2012-11-18 Thread Daniele
I have a field in my register form for verifying the password, as such: Field http://127.0.0.1:8000/examples/global/vars/Field('password', 'password', length=512, readable=False), Field http://127.0.0.1:8000/examples/global/vars/Field('password_verify', 'password', length=512,

[web2py] Re: custom built login form

2012-11-18 Thread Daniele
I'm having a similar problem. I am making a custom form with this code in the view: {{=form.custom.begin}} div class=control-group {{if form.errors['email']:}}error{{pass}} label class=control-label for=inputEmailEmail address/label div class=controls

[web2py] Time of registration

2012-11-17 Thread Daniele
Guys I'm wondering when I get someone to register, I'd like to have a field in my database for the datetime. In my db.py file, I have a Field('registration_time', 'datetime') However, how do I pass in that the time (now) is supposed to be taken when the user submits the form?? I'm a bit

[web2py] response.flash not displaying

2012-11-17 Thread Daniele
I cannot get response.flash to display for the life of me...I'm using a vanilla version of the latest twitter bootstrap and have the following in my style.css (which I took verbatim from web2py's css file) div.flash { font-weight:bold; display:none; position:fixed; padding:10px;

[web2py] Re: step-by step instructions installing web2py on a CentOS server with cPanel installed

2012-11-14 Thread Daniele
Bump! I'd also like to see a guide on how to do this. On Friday, January 21, 2011 9:18:12 PM UTC, stargate wrote: I as wondering if there is step-by step instructions installing web2py on a CentOS version 4.x server with cPanel installed. --

[web2py] Re: Retype password: None

2012-11-14 Thread Daniele
, November 12, 2012 4:52:53 PM UTC, Daniele wrote: Once I have the class, how can I get the jQuery entropy check for password strength to change the background color? Again, this is on a custom form so I'm having quite some trouble with this... On Monday, November 12, 2012 3:51:48 PM UTC, Massimo Di

[web2py] Retype password: None

2012-11-12 Thread Daniele
I am writing a custom registration form. I noticed that in the controller, if I put def signup(): return dict(form=auth.register()) I get a Retype password field. However, if I put def signup(): form = SQLFORM(auth.settings.table_user, labels = {'email':'Email address'},

[web2py] Re: Retype password: None

2012-11-12 Thread Daniele
').add_class('test') On Sunday, 11 November 2012 21:03:04 UTC-6, Daniele wrote: I am writing a custom registration form. I noticed that in the controller, if I put def signup(): return dict(form=auth.register()) I get a Retype password field. However, if I put def signup(): form

[web2py] web2py woes

2012-11-10 Thread Daniele
I just started using web2py and am having lots of trouble with things that I think should be quite simple. I will enumerate them here in the hopes they can be answered: 1) I had made a design in Twitter bootstrap 2.2.1 which was working fine as a plain .html file. I saw that web2py used an