Re: [web2py] Re: list:reference database selection

2012-09-20 Thread Andrew Evans
) > > Anyhow, contains has a special usage for list fields. > > > On Thursday, September 20, 2012 5:07:46 PM UTC+1, Andrew Evans wrote: > >> I have since added format='%(title)s %(id)s' to the region table but the >> listing is not being selected >> >>

[web2py] Produce Invalid Input message rather than escape and add entry

2012-06-28 Thread Andrew Evans
Hello I am using Santize=True with some HTML permitted. For any invalid characters or HTML added such as or , how can I produce a response error message rather than escaping the code and adding it to the database? So it just doesn't let you post it if there is any invalid markup Any ideas *chee

[web2py] updating linked fields

2012-07-03 Thread Andrew Evans
Hi I am trying to update the records in my database for a field that is linked. I have two entries in the table channel. When I edited channel_name field I expected everything would have changed (because it is linked). but it did not. How do I go about changing the data? *cheers db.define_table(

Re: [web2py] Re: updating linked fields

2012-07-03 Thread Andrew Evans
Your right ty :-) How can I select channel_name then from my view (so I don't have to change a million entries) {{for broadcast in schedule:}} {{=broadcast.channel}}

Re: [web2py] Re: updating linked fields

2012-07-03 Thread Andrew Evans
Gah nvm :-P Its 7 30 am I was a bit under the weather :-P sorry :-( On Tue, Jul 3, 2012 at 7:35 AM, Andrew Evans wrote: > Your right ty :-) > > How can I select channel_name then from my view (so I don't have to change > a million entries) > > {{fo

[web2py] Remove Special Characters and Whitespace in db field

2012-07-03 Thread Andrew Evans
Hello I have a field for a table Field('profile_name',length=64), I would like to make sure special characters and whitespace can't be added to it How would I go about doing this? and produce an error message if it occurs on form submission (div.error)) *cheers

[web2py] Re: Remove Special Characters and Whitespace in db field

2012-07-03 Thread Andrew Evans
Ok nvm I just read that web2py will not allow this by default *cheers :-) On Tue, Jul 3, 2012 at 10:47 AM, Andrew Evans wrote: > Hello I have a field for a table > > Field('profile_name',length=64), > > I would like to make sure special characters and whitespace can&#

[web2py] Organizing checkboxes to appear in a 3 column layout

2012-07-03 Thread Andrew Evans
Hello I have the following field Field('genre',requires=IS_IN_DB(db,db.genre.id, '%(title)s', multiple=True), widget=SQLFORM.widgets.checkboxes.widget), I am trying to figure out how to layout the checkboxes so there in a 3 column grid Any ideas *cheers

Re: [web2py] Re: Remove Special Characters and Whitespace in db field

2012-07-03 Thread Andrew Evans
I was mistaken thank you for your help I guess what web2py does is escape those special characters, is that correct? Anyway I used the IS_APHANUMERIC function *cheers

[web2py] Uploadify what am I doing wrong

2012-07-04 Thread Andrew Evans
Hello I am trying to use uploadify in my web2py app but I am having a bit of difficulty no errors occur it just doesn't work These are my controllers def index(): return dict() def myUpload(): form = SQLFORM(db.music) if form.accepts(request.vars, session): response.flash =

Re: [web2py] Re: Uploadify what am I doing wrong

2012-07-04 Thread Andrew Evans
thank you for helping me I looked at some of the documentation and figured out some things but I get an IORERROafter uploading any ideas here is my modified controller and my uploadify script I am using uploadify version 3 def myUpload(): form = SQLFORM(db.music) if form.accepts(request.

Re: [web2py] Re: Uploadify what am I doing wrong

2012-07-04 Thread Andrew Evans
GREAT ty very much for your help :-) *cheers On Wed, Jul 4, 2012 at 1:29 PM, Relsi Hur wrote: > here a very fast example. > > Em quarta-feira, 4 de julho de 2012 16h40min45s UTC-3, cheer10s escreveu: >> >> thank you for helping me >> >> I looked at some of the documentation and figured out so

[web2py] How to use instead of input in SQLForm

2012-07-06 Thread Andrew Evans
Hello I am trying to figure out how to replace the submit button in SQLFORM I would like to replace with Upload and add Clear My controller is def index(): form = SQLFORM(db.music2) if form.accepts(request.vars, session): #db.music2.insert(song = db.music2.song.store(request.v

[web2py] Ajax div refresh on form submission

2012-07-08 Thread Andrew Evans
Hello I have two functions one for querying the data base and one for submitting data. I also have one view for the form and one load file for the database query I then LOAD the load file into index view {{extend "template.html"}} {{=LOAD('default', 'ajax_example.load', ajax=True)}} My Fo

[web2py] Re: Ajax div refresh on form submission

2012-07-08 Thread Andrew Evans
Ok my approach was a bit off. I got the div to update on form submission. But how to separate the form view from the same page as the view to display updates? which I think has to do with this return XML('ajax("%s",[],"#song_list");' % URL('default', 'ajax_example.load')) Any ideas

[web2py] Re: Ajax div refresh on form submission

2012-07-08 Thread Andrew Evans
Spoke to soon the div does not update. What I am after is the div song_list refreshing in real time. I appreciate any help offered *cheers *controllers* def index(): return dict() def page_with_form(): return dict() def ajax_example(): rows = db(db.music2.id>0).select() return

[web2py] Advice on working with CSV data

2013-01-10 Thread Andrew Evans
Hello everyone and Happy New Year! I was hoping to ask a few questions on working with existing databases in CSV format that do not come from web2py. So here goes. How can I work with the existing information, How would I make changes/additions to the data using web2py. The imported CSV data wo

[web2py] Re: Get the Local time

2013-01-17 Thread Andrew Evans
I was able to solve my problem with this if anyone is interested import pytz {{current_time = datetime.datetime.now(pytz.timezone('America/Vancouver')).replace(tzinfo=None)}} *cheers On Thu, Jan 17, 2013 at 8:25 AM, Andrew Evans wrote: > Hello web2py group! I am trying to find

[web2py] Get the Local time

2013-01-17 Thread Andrew Evans
Hello web2py group! I am trying to find a way to get the local time say PST or EST so I can display a video based on that time. Any suggestions? I was able to convert it to UTC but this doesn't really help the situation {{project_date = db(db.schedule).select(orderby=~db.schedule.date_in, li

[web2py] Search Form (Advice/Help) with custom Form

2013-01-27 Thread Andrew Evans
I am developing a search form in web2py, I create the form like this Enter Keywords Select Region Choose a Region... {{for region in region_query:}}

Re: [web2py] Search Form (Advice/Help) with custom Form

2013-01-27 Thread Andrew Evans
I was able to get it working thanks anyway everyone --

Re: [web2py] Re: datetime - compare dates while ignoring time Part 2: Time Zones!

2013-03-04 Thread Andrew Evans
Hi I did something I think which is similar you can get the current time based on time zone like this import datetime import pytz import time current_time = datetime.datetime.now(pytz.timezone('US/Eastern')).replace(tzinfo=None) This allowed me to schedule videos to play at a given time Not su

Re: [web2py] Pass Query to SQLFORM

2013-03-10 Thread Andrew Evans
Ok so after doing a bit more research I have come across this: http://www.web2py.com/examples/static/epydoc/web2py.gluon.sqlhtml.SQLFORM-class.html and I have done this listing_id = request.args(0) query = (db.listing.id[listing_id]) & (db.listing.userinfo[auth.user.id]) form = SQL

Re: [web2py] Pass Query to SQLFORM

2013-03-10 Thread Andrew Evans
I am now getting this error AttributeError: 'Table' object has no attribute 'SUBSTRING(listing.userinfo,5,(6 - 5))' Using this code listing_id = request.args(0) query = db.listing[listing_id] and db.listing.userinfo[auth.user.id] query = db.listing[query] form = SQLFORM(db.listi

Re: [web2py] Pass Query to SQLFORM

2013-03-10 Thread Andrew Evans
Hi Massimo thank you for you help! What I was trying to do using crud.update initially was have a user update one of their records. When they do this I would like to set a boolean value that is in db.listing named 'confirmed' to False (confirmed=False) which is readable=False and writable=False I

[web2py] start date to end date and verifying form

2012-10-03 Thread Andrew Evans
Hello I am having a seemingly difficult time with this :-) and I am hoping some one can aid in solving this :-) I am trying to make an item reserved from start-date to end-date any ideas *cheers here is my code This my latest attempt googled and found this function import datetime def dateran

[web2py] request.vars returning as Nonetype

2012-10-04 Thread Andrew Evans
Hello I am trying to validate a form entry against existing entries in my database on form submission. But user_start and user_end are returning as None Type. How do I get the values of a form using SQLFORM *cheers if form.accepts(request.vars): for project in project_date:

[web2py] Help Fixing Controller Function to Validate on Form Submission

2012-10-05 Thread Andrew Evans
Hello I am trying to make a controller function upon submission of the form validate against existing entries in the database *this is the function:* @auth.requires(auth.has_membership('second_year') or auth.has_membership('admin')) def second_year_checkout(): check_id = request.args(0)

[web2py] A few session/cart issues hoping to get help with :-)

2012-10-08 Thread Andrew Evans
I am trying to solve an issue in my code and hoping some of you can help I have a cart functionality for *reserving* items based on a month / day / year reservation. The problem is an extra entry is being added to the database when I submit the form. Any ideas how to fix this also will my *chec

[web2py] make an item in a field deletable

2012-10-10 Thread Andrew Evans
How can I make an entry in a MySQL Field deletable and not the whole entry I have a table structure with Field('name') Field('image') I want to make an option for the image Field to be deletable using crud to update the form *cheers and ty --

Re: [web2py] make an item in a field deletable

2012-10-10 Thread Andrew Evans
grr nvm figured it out :-) On Wed, Oct 10, 2012 at 12:15 PM, Andrew Evans wrote: > How can I make an entry in a MySQL Field deletable and not the whole entry > > I have a table structure with > > Field('name') > Field('image') > > I want to make a

[web2py] jquery datetime calendar and Mobile

2012-10-12 Thread Andrew Evans
Hello! How can I get the date and datetime calendar jquery from SQLForm to appear (when a time is being entered) on mobile platforms *cheers and ty --

[web2py] Help integrating s-cubism uploadify widget

2013-01-07 Thread Andrew Evans
Hi I am having problems integrating this plugin http://dev.s-cubism.com/plugin_uploadify_widget in to my form. In my Models.py I have from plugin_uploadify_widget import ( uploadify_widget, IS_UPLOADIFY_IMAGE, IS_UPLOADIFY_FILENAME, IS_UPLOADIFY_LENGTH ) db.define_table('video', Fiel

Re: [web2py] Re: Selecting Latest Thread for a specific category

2012-01-04 Thread Andrew Evans
Hi no its not on GAE I do get the last post but its for the last category posted in here is a link you can see :-) http://www.fireflywra.com/forum *cheers On Wed, Jan 4, 2012 at 5:10 PM, Anthony wrote: > What do you get with that query? Is this on GAE (on GAE, I don't think the > id's are ne

Re: [web2py] Re: Selecting Latest Thread for a specific category

2012-01-05 Thread Andrew Evans
Hey ty that helped enough to solve my problem db((db.forum_post.category == db.category.id) & (db.category.id == forums.id)).select(db.forum_post.ALL, orderby=~db.forum_post.id, limitby=(0,1)) the "forums" value is a loop through the categories :-) *cheers ty very much for your help On Wed,

[web2py] New Site for web2py poweredby

2012-01-12 Thread Andrew Evans
Hey there I have a new site available to show the web2py community. My Friend/Business Partner/Team mate built most the code in other projects, I just kind of tweaked it fixed a few bugs and added/subtracted some features Anyway everything is coded in web2py including the forums... We had to snag

Re: [web2py] Re: New Site for web2py poweredby

2012-01-12 Thread Andrew Evans
Really? works for me.. On Thu, Jan 12, 2012 at 3:53 PM, chawk wrote: > Your link is not working :(

Re: [web2py] Re: New Site for web2py poweredby

2012-01-12 Thread Andrew Evans
No worries no harm done :-) On Thu, Jan 12, 2012 at 3:59 PM, chawk wrote: > > Okay, turns out I am not able to click on the anchor for this post or > another post I just put up myself. Google is giving me a 404 error > page. The problem appears to be on my end. > > Sorry,

Re: [web2py] Re: New Site for web2py poweredby

2012-01-12 Thread Andrew Evans
Great advice! Fixed everything you suggested On Thu, Jan 12, 2012 at 4:05 PM, chawk wrote: > Your footer should follow the same layout as the nav bar, meaning 100% > width across the screen. > > I cant really see the forum without signing up first. > > Your copyright symbol is not showing up. >

Re: [web2py] Re: New Site for web2py poweredby

2012-01-12 Thread Andrew Evans
I also removed the sign up unless you want to post an article or blog post *cheers On Thu, Jan 12, 2012 at 4:20 PM, Andrew Evans wrote: > Great advice! Fixed everything you suggested > > > On Thu, Jan 12, 2012 at 4:05 PM, chawk wrote: > >> Your footer should follow the s

Re: [web2py] Re: New Site for web2py poweredby

2012-01-12 Thread Andrew Evans
ty very much :-) On Thu, Jan 12, 2012 at 4:33 PM, chawk wrote: > I just checked it out again, the forum looks great!

Re: [web2py] Re: New Site for web2py poweredby

2012-01-13 Thread Andrew Evans
ty everyone! Annet I did the changes you suggested but will have to work on the forum styling later today. Great ideas though *cheers On Fri, Jan 13, 2012 at 5:04 AM, Cliff wrote: > Very nice. > > A agree with Annet about the forum styling, though. > > On Jan 13, 3:16 am, Rahul wrote: > > Lo

Re: [web2py] Re: New Site for web2py poweredby

2012-01-14 Thread Andrew Evans
Hello I think I finished the styling :-) its not perfect I am sure :-P I think the green at the top of the thread could be replaced (if only I could find where in the style sheet it is) anyway here is the link again www.fireflywra.com and www.fireflywra.com/forum Thank you for all the insight

Re: [web2py] Re: New Site for web2py poweredby

2012-01-14 Thread Andrew Evans
ty very much thanks for all the feedback :-) *cheers Andrew On Sat, Jan 14, 2012 at 10:34 AM, Chris Hawkes wrote: > It looks a ton better, good job! > > > On Sat, Jan 14, 2012 at 12:21 PM, Andrew Evans > wrote: > >> Hello I think I finished the styling :-) >> &g

Re: [web2py] Re: New Site for web2py poweredby

2012-01-15 Thread Andrew Evans
Oh ya ty will fix that and will make the template easier to maintain today using {{include "nav.html"}} etc *cheers On Sun, Jan 15, 2012 at 7:20 AM, Annet wrote: > Hi Andrew, > > > its not perfect I am sure :-P > > but in line with the rest of the site ;-) > > I just noticed that now matter w

[web2py] ValueError: invalid literal for int() with base 10

2012-01-15 Thread Andrew Evans
Hello I just updated web2py and after restarting uwsgi I get an error on my site ValueError: invalid literal for int() with base 10: '05 04:36:30' Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. Traceback (most recent call last): File "/opt/web2py/gluo

[web2py] Re: ValueError: invalid literal for int() with base 10

2012-01-15 Thread Andrew Evans
t() trailers = db(db.trailer.id>0).select(orderby=~db.trailer.air_date) return dict(schedule=schedule,episodes=episodes,categories=categories,trailers=trailers) *cheers ty :D On Sun, Jan 15, 2012 at 6:02 PM, Andrew Evans wrote: > Hello I just updated web2py and after restartin

[web2py] Default/index fails to load

2012-01-16 Thread Andrew Evans
Just upgraded web2py to the latest version (1.99.4) and it fails to load my default/index pages on a few of my sites. Other pages work fine Any ideas what I am doing wrong? maybe something to do with routes? was working fine before *cheers

[web2py] Re: Default/index fails to load

2012-01-16 Thread Andrew Evans
Ok seems to be an issue using datetime or date Sorry about double posting if I did I may have posted on the wrong email. I appreciate any help though not sure what I need to post to get further help ValueError: invalid literal for int() with base 10 On Sun, Jan 15, 2012 at 6:43 PM, Andrew

[web2py] Re: Default/index fails to load

2012-01-16 Thread Andrew Evans
After a bit of research this is what I found the table which caused an error (it has been removed temporarily) but db.define_table('trailer', Field('userinfo', db.auth_user, default=auth.user_id, readable=False, writable=False), Field('title',requires=IS_NOT_EMPTY()), Field('descripti

[web2py] Ckeditor Crud Controller Problem

2012-01-17 Thread Andrew Evans
Hello I am having a problem with CKEditor in Crud I get the following error when I try to use it Traceback (most recent call last): File "/opt/web2py/gluon/restricted.py", line 192, in restricted exec ccode in environment File "/opt/web2py/applications/pstv/controllers/control_panel.py"

Re: [web2py] Re: Ckeditor Crud Controller Problem

2012-01-17 Thread Andrew Evans
*cheers I must of been blind not to see that last night ty very much On Tue, Jan 17, 2012 at 5:51 AM, Anthony wrote: > db.define_table('contrib', >> Field('userinfo', db.auth_user, default=auth.user_id, readable=False, >> writable=False), >> Field('title'), >> Field('contributions'

[web2py] PSTV [Paradigm Shift Television] Powered by Inclusion

2012-01-20 Thread Andrew Evans
Wondering if this site can be included in the powered by web2py www.paradigmshift.tv *cheers Andrew

Re: [web2py] PSTV [Paradigm Shift Television] Powered by Inclusion

2012-01-20 Thread Andrew Evans
Yes was made by me and a partner/friend of mine and ty On Fri, Jan 20, 2012 at 8:52 PM, Bruno Rocha wrote: > looks very nice on mobile! congrats! > > > On Sat, Jan 21, 2012 at 12:42 AM, Andrew Evans > wrote: > >> Wondering if this site can be included

[web2py] Redirect Auth based on Membership

2012-01-23 Thread Andrew Evans
I want to redirect the admin user if they login as admin vs logging in as a regular user if auth.requires_membership('admin'): auth.settings.login_next = URL('control_panel', 'index') auth.settings.logout_next = URL('control_panel', 'index') that is in my model atm but does not seem to

[web2py] Re: Redirect Auth based on Membership

2012-01-23 Thread Andrew Evans
Nevermind got everything sorted my logic was a bit off *cheers :D On Mon, Jan 23, 2012 at 9:20 AM, Andrew Evans wrote: > I want to redirect the admin user if they login as admin vs logging in as > a regular user > > if auth.requires_membership('admin'): > auth.

[web2py] Random Selection Issue

2011-11-10 Thread Andrew Evans
Hello I am trying to randomly select from entries in my database then store that random result. The problem is its storing the wrong result (I think its storing the previous random selection) Any ideas how I can achieve my goal? @auth.requires_login() def xreflection(): game_id = request.arg

[web2py] Re: Random Selection Issue

2011-11-11 Thread Andrew Evans
Anyone able to help with this? No pressure, just hoping I can get some insight from one of the Gurus :-) *cheers On Thu, Nov 10, 2011 at 11:22 AM, Andrew Evans wrote: > Hello I am trying to randomly select from entries in my database then > store that random result. The problem is its s

Re: [web2py] Re: Random Selection Issue

2011-11-11 Thread Andrew Evans
hmm that did not work any other ideas *cheers this is what we did def xreflection(): game_id = request.args(0) reflection_id = request.args(1) if reflection_id == None: return dict(redirect(URL('error','invalid'))) if game_id == None: return dict(redirect(URL('erro

Re: [web2py] Re: Random Selection Issue

2011-11-11 Thread Andrew Evans
Still trying to solve this any ideas are welcome *cheers

Re: [web2py] Re: Random Selection Issue

2011-11-13 Thread Andrew Evans
Hello just wondering if some one can help with this, still having no luck. Would appreciate any help *cheers On Fri, Nov 11, 2011 at 7:02 PM, Andrew Evans wrote: > Still trying to solve this any ideas are welcome *cheers >

Re: [web2py] Re: Random Selection Issue

2011-11-13 Thread Andrew Evans
Just to note my code looks like this: @auth.requires_login() def xreflection(): game_id = request.args(0) reflection_id = request.args(1) if reflection_id == None: return dict(redirect(URL('error','invalid'))) if game_id == None: return dict(redirect(URL('error','in

[web2py] Implement Share this Button of Facebook

2011-02-01 Thread Andrew Evans
How would you go about implemeting the "Share This" button of Facebook by pulling out a query from a database table. for example: Thanks in Advance

[web2py] How to use routes

2011-02-15 Thread Andrew Evans
Hello I am running the latest version of web2py and apach2 on debian lenny but it doesn't seem like my routes.py file is being used I still get invalid controller instead of my message. is there anything in particular I have to do with apache to get routes.py to run *cheers

Re: [web2py] How to use routes

2011-02-15 Thread Andrew Evans
Hi ty for the reply and sorry about my message it was quickly done up I only added this line to the routes.example.py and renamed it routes.py routes_onerror = [('dojo0/*','/dojo/error/index')] the controller error/index is this def index(): if request.vars.code == '400': return dic

Re: [web2py] How to use routes

2011-02-15 Thread Andrew Evans
Ok ty I got it haha now I feel like a novice :-P I had an extra period in the routes.py filename so it was routes..py any ty for the advice *cheers Andrew

Re: [web2py] How to use routes

2011-02-16 Thread Andrew Evans
direct(URL('default', 'index')) elif request.vars.code == '404': redirect(URL('default', 'index')) else: redirect(URL('default', 'index')) but when I use routes_onerror = [('*/*','/dojo/error/ind

Re: [web2py] How to use routes

2011-02-16 Thread Andrew Evans
Sorry I mean this routes_onerror = [('dojo/*', '/dojo/error/index'), ('musico/*', '/musico/error/index'),] returns a invalid request when going www.namiyama.com/index.php *cheers On Wed, Feb 16, 2011 at 4:07 PM, Andrew Evans wrote:

Re: [web2py] How to use routes

2011-02-16 Thread Andrew Evans
Hi ty for your help my routes in is just standard with example routes file routes_in = ((r'.*:/favicon.ico', r'/examples/static/favicon.ico'), (r'.*:/robots.txt', r'/examples/static/robots.txt'), ((r'.*http://otherdomain.com.* (?P.*)', r'/app/ctr\g'))) any suggestions

Re: [web2py] How to use routes

2011-02-17 Thread Andrew Evans
hey is there anyway to say get the current site the user is on for example: routes_onerror = [(r'*/*', r'/dojo/error/index')] this returns all domains to dojo/error/index. Is it possible to do somehing like this /request.application/error/index/ any ideas *cheers

Re: [web2py] How to use routes

2011-02-17 Thread Andrew Evans
Just figured it out :-) routes_onerror = [(r'*/*', r'/error/index')] works if error/index is in the application *cheers tested it with two domains

[web2py] Tornado Web2py how to set up in Production Envrironment?

2011-02-21 Thread Andrew Evans
Does any one have any resources on setting up web2py and Tornado in a production environment. I would like to set it up with Debian Lenny to host web sites I develop, I am wanting to get in to development using Tornado and web2py cause I saw how cool it was in a few demos. Any tips and advice are

[web2py] Paypal slice question

2011-03-13 Thread Andrew Evans
So I have finally gotten around to trying to implement paypal into my site. But I am facing some issues and was hoping some one could help me figure out my questions. I am trying to figure out how to use this example http://www.web2pyslices.com/main/slices/take_slice/106 but I need to know: What

Re: [web2py] Re: Paypal slice question

2011-03-13 Thread Andrew Evans
I assume at import urlib and below is the module does it matter what I name the controller or module? *cheers

Re: [web2py] Re: Paypal slice question

2011-03-13 Thread Andrew Evans
ome questions I have :-) *cheers Andrew On Sun, Mar 13, 2011 at 9:23 PM, Andrew Evans wrote: > I assume at import urlib and below is the module does it matter what I name > the controller or module? > > *cheers >

Re: [web2py] Re: Paypal slice question

2011-03-14 Thread Andrew Evans
Cool can you post a link to this post :-) would be greatly appreciated *cheers Andrew On Mon, Mar 14, 2011 at 6:30 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > :-) > > On Mar 14, 2:36 am, pbreit wrote: > > Sorry for the brevity. I think can put together a whole app and post it

Re: [web2py] Re: Paypal slice question

2011-03-14 Thread Andrew Evans
Cool ok so when I pass the sitesettings attributes to my view what am I passing? {{ attributes = {"cert_id":sitesettings.paypal_cert_id, "cmd":"_cart", "business":sitesettings.cart_business, "add":"1", "custom":a

Re: [web2py] Re: Paypal slice question

2011-03-15 Thread Andrew Evans
Makes sense I wanted them in a table also. But the site settings table is already in existance, with that code you provided how does that work? Or am I totally missing something? *cheers On Tue, Mar 15, 2011 at 1:50 PM, howesc wrote: > yes, you should be putting your paypal values in there. i

[web2py] pass request.args(0) to sqlform

2011-05-13 Thread Andrew Evans
I am trying to pass request.args(0) to sqlform so it adds an entry when submitted based on the project_id value any ideas? my database code db.define_table('tasks', Field('userinfo', db.auth_user, default=auth.user_id, readable=False, writable=False), Field('project_id', db.project, requi

Re: [web2py] Re: pass request.args(0) to sqlform

2011-05-14 Thread Andrew Evans
Thank you I was able to figure it out *cheers On Fri, May 13, 2011 at 8:05 PM, pbreit wrote: > I think this will do it: > > def add_task(): > form = SQLFORM(db.tasks) > form.vars.project_id = request.args(0) > > if form.accepts(request.vars, session): > > ... >

[web2py] Make ID identical

2011-05-14 Thread Andrew Evans
Hello I have a table db.define_table('comments', Field('userinfo', db.auth_user, default=auth.user_id, readable=False, writable=False), Field('project_id', db.project, requires = IS_IN_DB(db, db.project.id, '%(project_title)s'), readable=False, writable=False), Field('isReply', 'intege

[web2py] Re: Make ID identical

2011-05-14 Thread Andrew Evans
Never mind I just figured out what I needed to do *cheers Thank You

[web2py] make project_id identical with isReply

2011-05-15 Thread Andrew Evans
Hello I have a commenting system I am working on and I am having a problem with passing the arguments so they match up. I am trying to make comments.project_id match up with the isReply field when I add a Reply I am passing args=row.project_id as an argument to the reply_comment form My comment s

Re: [web2py] Navigation in Web2py having an active link

2011-07-01 Thread Andrew Evans
hey thanks worked like a dream *cheers On Wed, Jun 29, 2011 at 10:35 PM, Bruno Rocha wrote: > I did this for web2py.com using request.function, I created a function > tooggle_class which receives request.function and do this job. > > here is an example that I use in http://CursoDePython.com.br

[web2py] Message to the creator of Tenthrow regarding Paypal

2011-07-14 Thread Andrew Evans
Hello I am having troubles integrating your code into even a simple example. I was hoping you could help me by creating a working example of your code called something like paypal_test and packing it into a web2py file so I can then work on it in my own code. As well as telling me how you generat

[web2py] is_upload_filename and requires=False

2011-07-24 Thread Andrew Evans
Hello I am trying to figure out how to require a File extension for an upload but make the upload not required. Field('file','upload', required=False, requires=IS_UPLOAD_FILENAME(extension ='(pdf|doc|txt)' , error_message='Inappropiate extension, Please Upload PDF or DOC file only')), Any ideas

[web2py] Mapping URLS in routes.py

2011-08-31 Thread Andrew Evans
Hello I have the following in my routes.py file but its not mapping the second domain to the web2py project any ideas whats up? routers = dict( # base router BASE = dict( default_application = 'cheer10s', domains = { 'cheer10s.com' : 'cheer10s',

Re: [web2py] Mapping URLS in routes.py

2011-08-31 Thread Andrew Evans
Hey well for some reason its working now *confused Anyway I won't complain ty for the advice This is a great forum :-) On Wed, Aug 31, 2011 at 1:36 PM, Jonathan Lundell wrote: > On Aug 31, 2011, at 12:06 PM, Andrew Evans wrote: > > Hello I have the following in my routes.py fi

Re: [web2py] Mapping URLS in routes.py

2011-08-31 Thread Andrew Evans
, Jonathan Lundell wrote: > On Aug 31, 2011, at 1:50 PM, Andrew Evans wrote: > > Hey well for some reason its working now *confused > > > Keep in mind that you need to restart web2py (or at least reload the router > configuration) for changes to take effect. That can be confusing

[web2py] Set Scheduler Run Timeout on Try Except

2016-05-25 Thread Andrew Evans
Hello, I am running a scheduler that I would like to timeout the scheduler_run on a failed execution of my function so that it will attempt to retry running it. try: attempt to run my code except: failed to run, timeout scheduler_run to reattempt Also I have parameters that when a val

Re: [web2py] Re: How to add users to a table row by request

2014-01-12 Thread Andrew Evans
Excellent! Thank you Anthony this solved my problem. Also thank you for the clear explanations :-) *cheers On Sun, Jan 12, 2014 at 6:05 AM, Anthony wrote: > If these groups are for the purpose of controlling access to resources, > you might consider using the built-in role-based access control

[web2py] Detecting OS issue

2014-01-13 Thread Andrew Evans
Hello I am trying to figure out how to detect if a computer is running Windows or Macintosh then load the appropriate files and if any other system Linux/Mobile etc then load the other files The reason for this is I am using Google Earth in a project and I want to load Google Maps if it is not ava

[web2py] Display returned objects from load(ed) component when calling URL from Ajax

2014-06-24 Thread Andrew Evans
Hello I am facing a problem with returned output from a controller not displaying when being called from a link using the ajax() function inside a LOAD(ed) component. *index* {{=LOAD('default', 'file_list.load', ajax=False)}} -- *file_list.load* Que For Encryption

Re: [web2py] Re: Authorized File Download Error

2014-06-24 Thread Andrew Evans
Amazing! Thank you very much. On Tue, Jun 24, 2014 at 10:49 AM, Massimo Di Pierro < massimo.dipie...@gmail.com> wrote: > This line > > db.personal_uploads.file_upload.authorize = lambda record: > auth.is_logged_in() and (record.members.contains(auth.user_id)) > > > should be > > > db.personal_u

[web2py] Files failing to upload because of encryption taking place?

2014-06-30 Thread Andrew Evans
Hello I am building a simple file encryption software and I am facing issues with files larger than 200KB not being fully uploaded but resulting in success. I am running nginx server / web2py. However I am pretty sure it's configuration is set up correctly Perhaps some one could take a look at my

<    1   2