[web2py] Re: Any jquery gurus out there?

2012-07-24 Thread RKS
, RKS wrote: I know this is probably not the right place to ask, but I am using w2p and post here pretty frequently so I figured what the heck. I'm also in a rush and not finding out what I need on stackoverflow. I have some jquery and it works in every browser except any version of IE. If you

Re: [web2py] Any jquery gurus out there?

2012-07-24 Thread RKS
I will test both of the above comments. Sorry it took so long for me to get back, but I didn't realize anyone had responded. Thanks for the answers. On Wednesday, July 11, 2012 5:58:19 PM UTC-5, demetrio wrote: I don't understand a lot the pourpose of this selector

Re: [web2py] Any jquery gurus out there?

2012-07-11 Thread RKS
What is it that isn't working in IE? I'm fairly certain the hash part just bunks it up but I have no way of confirming it. I've tried all the debugging tools I could find and either I'm too stupid to figure out how to get them to work or I'm too stupid to figure out what step I'm missing

[web2py] Any jquery gurus out there?

2012-07-10 Thread RKS
I know this is probably not the right place to ask, but I am using w2p and post here pretty frequently so I figured what the heck. I'm also in a rush and not finding out what I need on stackoverflow. I have some jquery and it works in every browser except any version of IE. If you happen to

[web2py] Updated deplopyment docs?

2012-07-05 Thread RKS
Are there any updated deployment docs available? At work we run web2py no problems but we have our own servers. At home, for all my testing sites, I use shared hosting. Below is some correspondence I've had today with my shared host: [After emailing them the link to the deployment recipes in

[web2py] Re: Parsing python from db fields?

2012-06-28 Thread RKS
That's fine. I'm sorry for such a dumb mistake. Don't know why I did that. Here it is.

[web2py] Re: Parsing python from db fields?

2012-06-27 Thread RKS
Unless you're very curious about this problem I wouldn't try too hard. I'm under a deadline so I just used an if statement to wrap the include file I need and referenced the specific pages inside the if. Might not be the most elegant way to do things and certainly it falls into the workaround

[web2py] Is there a place to vote to add an id or class to user forms?

2012-06-27 Thread RKS
I think it might be pretty simple just to add a class or id to the auth.user forms by default. It's unsemantic to have to wrap it in a div just to target those specific inputs or tedious to target them in the stylesheet by #auth_user_first_name__row input {} etc or by the

[web2py] Re: Is there a place to vote to add an id or class to user forms?

2012-06-27 Thread RKS
Don't want to be a prude but do you happen to have that URL handy? On Wednesday, June 27, 2012 6:00:11 PM UTC-5, Massimo Di Pierro wrote: Make a proposal on googlecode issues On Wednesday, 27 June 2012 16:41:23 UTC-5, RKS wrote: I think it might be pretty simple just to add a class or id

[web2py] Sending message.html to single new user?

2012-06-27 Thread RKS
): mail.send(to=['r...@rks.com'],subject='New Registration at RKS',message=', '.join('%s: %s' % (k, v) for (k, v) in request.vars.iteritems())) mail.send(to=['form.vars.email'],subject='Your Registration Details',message=response.render('new_user.html')) return DIV(Test

[web2py] Re: Sending message.html to single new user?

2012-06-27 Thread RKS
Ah, I see. Can't test now but I will in the morning. Thanks. On Wednesday, June 27, 2012 7:30:14 PM UTC-5, Anthony wrote: mail.send(to=['form.vars.email'],subject='Your Registration Details',message=response.render('new_user.html')) You have put form.vars.email in quotes, as if

[web2py] How does the auto-increment on field id work? I'd like to use the method in a table.

2012-06-26 Thread RKS
I have some html: {{for i, (product_id, qty, total_price, product, options) in enumerate(order):}} tdinput class=input_quantity value name=product_quantity_one id=value_pro_1 type=text value={{=qty}} //td tddiv class=minus id=min_pro_1-/div/td tddiv class=plus id=plus_pro_1+/div/td I have a js

[web2py] Re: Parsing python from db fields?

2012-06-26 Thread RKS
: What is the purpose of this line of code? {{pass}} What happens if you delete it? On Monday, June 25, 2012 2:17:32 PM UTC-4, RKS wrote: BTW, it's EVERYTHING in html after that snippet. It won't display the footer or anything. --

[web2py] Re: Parsing python from db fields?

2012-06-26 Thread RKS
View source does not show anything below the content inside that XML. For example, I have a layout.html with the standard {{include}} {{ include footer.html}} etc. The place where I have this XML element fall within the view that's extending this layout. So no matter what, there should be a

[web2py] Re: How does the auto-increment on field id work? I'd like to use the method in a table.

2012-06-26 Thread RKS
Perfect. I got the web2py Application cookboo eBook but you really need to write a book. I'd buy it. You help me more than anyone. Thanks a bundle. --

Re: [web2py] Re: Creating users on checkout?

2012-06-26 Thread RKS
, 2012 2:53:07 PM UTC-5, RKS wrote: Also, if you were to use the {{=*.custom.widget.email}} method you get errors when a logged in user is using the form. The form tries to act like a registration form instead of a checkout form. If I use things in the inputs like {{=auth.user.first_name

[web2py] Re: Creating users on checkout?

2012-06-25 Thread RKS
Not so easy? --

[web2py] Re: Parsing python from db fields?

2012-06-25 Thread RKS
This all works, but I can't wrap my head around why everything after this snippet is no longer displayed. It does not even exist in the source. For example, my code is like this: div class=wrapper {{import os}} {{from gluon.template import render}}

[web2py] Re: Parsing python from db fields?

2012-06-25 Thread RKS
BTW, it's EVERYTHING in html after that snippet. It won't display the footer or anything. --

Re: [web2py] Parsing python from db fields?

2012-06-25 Thread RKS
Both of these solutions ended up working. Passing URL and using globals(). Just wanted to let you know and say thanks for helping. --

Re: [web2py] Re: Creating users on checkout?

2012-06-25 Thread RKS
I see that there are auth.register() and auth.login(), I'm already using login_form=auth.login(), in the controller, but otherwise I'm not certain the checkoutform would be form=auth.register(). Maybe it can be, but is that the best practice? Or just creating a function that writes into the

Re: [web2py] Re: Creating users on checkout?

2012-06-25 Thread RKS
Also, if you were to use the {{=*.custom.widget.email}} method you get errors when a logged in user is using the form. The form tries to act like a registration form instead of a checkout form. If I use things in the inputs like {{=auth.user.first_name}} it works to prefill values if users

[web2py] Redirecting to user/profile?

2012-06-25 Thread RKS
I'm having some issues I don't fully understand. I've customized an auth.login using login_form.custom.widget.email etc in a controller. It works fine and logs in users like you would expect. However, I have a view, checkout_test.html where I have included another form=auth.register() in the

[web2py] Re: Redirecting to user/profile?

2012-06-25 Thread RKS
I actually just decided that I probably just need to manually add new values to db.auth.users. That way this is actually a non-issue and I won't even need to worry about it. I think it may be harder since I don't know how to do that, especially with the checks on if auth.user or IS_IN_DB

[web2py] Re: Parsing python from db fields?

2012-06-22 Thread RKS
Okay, so that works on everything except href={{=URL('something')}} it returns the error URL is not defined. I'm going to try the other anchor method available and see if that works. The {{=blog.title}} and {{include 'postviews3.html'}} works fine with this solution. --

[web2py] Parsing python from db fields?

2012-06-21 Thread RKS
I have a table defined with some old fashioned fields. When printing the fields in a view I use {{=XML(field.name)}} and so far this works great for all the HTML I've been putting in there all this time. Now I've come to a situation where I'm trying to print some python from a field. Might be

Re: [web2py] consider adding a div around error message

2012-06-21 Thread RKS
An inline-block has auto-width and will stretch to fit the error message. I don't see why you need the extra div wrapper. You could also change your error message to be inline. On Friday, March 2, 2012 11:00:11 AM UTC-6, Richard wrote: Hello, Could we consider this change : Wrapping error

[web2py] Re: Parsing python from db fields?

2012-06-21 Thread RKS
Yes. Inside the actual field I use HTML and python. If I use {{=XML(blog.body)}} then I can insert all the HTML I want inside that field from the db administration. Very helpful. But now I want to be able to insert {{=blog.title}} inside the blog.body field and when it renders int he view I

[web2py] Re: Parsing python from db fields?

2012-06-21 Thread RKS
Hmm. I'm going to try and play with this a little tonight and report back tomorrow but on first try both these solutions return an error type 'exceptions.AttributeError' 'NoneType' object has no attribute 'endswith' Don't know what that is but I'm digging in right now to find out. --

[web2py] Re: Parsing python from db fields?

2012-06-21 Thread RKS
Traceback: Traceback (most recent call last): File gluon/restricted.py, line 205, in restricted File /Applications/web2py.app/Contents/Resources/applications/dev/views/default/blogs.html, line 132, in module File gluon/template.py, line 919, in render File gluon/template.py,

[web2py] Creating users on checkout?

2012-06-21 Thread RKS
I'm using the standard users/login and users/register for normal operations; however, I want to include these functions in a checkout function. For the login, I've read up on auth.login but for the registration portion I have no idea where to look. I have defined checkout.html with a

[web2py] Changing images and CSS with language preferences

2012-06-13 Thread RKS
The old way I was doing things (because I hadn't had time to explore how w2p was handling T) was creating multiple views based on languages with anchors pointed at these different views. Easy enough since I only had like 6 views to translate into one other language. But now that I want to do

[web2py] Re: Changing images and CSS with language preferences

2012-06-13 Thread RKS
Thanks. Works great. I never thought about translating my CSS attributes. For anyone coming in the future a quick example of what I've done with Massimo's suggestion is add for image swapping: {{if T.accepted_language in('en','en-us'):}} img src / {{else:}} img src / {{pass}} and for the css

[web2py] Trouble running from source

2012-05-25 Thread RKS
Docs say run python2.7 web2py.py in the terminal and all I can get is the error: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'web2py.py' Maybe I put it in the wrong place where it can't find it?

[web2py] Redirecting to a mobile website?

2012-05-23 Thread RKS
What is the best way to redirect uses to the mobile version of your site? I.e. redirecting to http://m.yoursite.com when it detects a mobile viewport? I tried to do this the normal way that I redirect in other places but I keep getting invalid errors. We're just using js to detect the browser

[web2py] Easy question, inserting user input fields into an email message

2012-05-22 Thread RKS
So I got the mail function working correctly but now I can't get it to send me the fields from the form. The form is standard HTML with ids on all the inputs. In the controller I have: def new_post_two(): form = SQLFORM(db.post) if form.accepts(request, formname=None):

[web2py] Re: Easy question, inserting user input fields into an email message

2012-05-22 Thread RKS
That was my latest and yes, it does result in an error. The original was: def new_post(): form = SQLFORM(db.post) if form.accepts(request, formname=None): mail.send(to=['s...@distrobeef.com'],subject='DistroBeef Retailer Contact',message='Test') return DIV(Thank you for

[web2py] Re: Easy question, inserting user input fields into an email message

2012-05-22 Thread RKS
Thanks a lot. This solved my problem.

[web2py] Mimicking HTML5 pattern attribute for inputs

2012-04-11 Thread RKS
I'm looking to validate all of my forms with HTML5 and the pattern attribute, but as always, nothing is perfect on the internet and I still need a backup to catch those users who do not use HTML5 friendly browsers. I'm having trouble finding exact representations of the regular expressions in

[web2py] New member and new to web2py and need some clarification about file paths.

2012-02-20 Thread RKS
Hello. Coming over from the php world and I started a new job where we use web2py and python. I'm trying to wrap my head around how it's handling the paths to pages I create and I can't find my answers in the docs. Probably I'm just missing it but I can't seem to figure it out. I've already

[web2py] Re: New member and new to web2py and need some clarification about file paths.

2012-02-20 Thread RKS
Thanks guys. @Massimo The a href={{=URL('page')... option was the one I was using, but like you mentioned, I think I was leaving out the = before URL. Now that you mention it, I did see the second option elsewhere in the default code but I have no idea why it didn't click to try. Thanks for the