[web2py] Re: SQLFORM.grid links not working

2016-05-09 Thread Simon Carr
gt; https://groups.google.com/d/msg/web2py/covZOWYOQ1M/NyZkDW5IBAAJ > > You need something like SQLFORM.grid(..., args=request.args[:1]). > > Anthony > > On Sunday, May 8, 2016 at 4:17:57 PM UTC-4, Simon Carr wrote: >> >> I think I now know why it's not working, but I don't kn

[web2py] Re: SQLFORM.grid links not working

2016-05-08 Thread Simon Carr
/supplier_contacts/1 As you can see the supplier_id is not collected by request.args(0). Is it possible for SQLFORM.grid to use url vars i.e. http://127.0.0.1:8000/srm/supplier/view/view/supplier_contacts?supplier_id=1 On Sunday, 8 May 2016 19:45:22 UTC+1, Simon Carr wrote: > > I have an SQLFOR

[web2py] SQLFORM.grid links not working

2016-05-08 Thread Simon Carr
I have an SQLFORM.grid in a view to display a list of supplier contacts When I click "Add Record", I get the error below. Traceback 1. 2. 3. 4. 5. 6. Traceback (most recent call last): File "E:\web2py\gluon\restricted.py", line 227, in restricted exec ccode in environment File

[web2py] Re: Not Authorized - but I don't know why

2016-05-08 Thread Simon Carr
ors#login-required-by-default-for-data-updates > By default all the URLs generated by the grid are digitally signed and > verified. This means one cannot perform certain actions (create, update, > delete) without being logged-in. > > > On Sunday, May 8, 2016 at 11:58:08

[web2py] Not Authorized - but I don't know why

2016-05-08 Thread Simon Carr
Here is the code in my controller. # -*- coding: utf-8 -*- # try something like def index(): return dict(message="hello from supplier.py") def manage_suppliers(): links = [lambda row: A(SPAN(_class='glyphicon glyphicon-search'),' View',_class='button btn

[web2py] How to define tables in a new model file

2016-05-08 Thread Simon Carr
I created a new model and called it data.py I created a definition for a table db.define_table('suppliers', Field('company_name','string'), Field('address1','string'), Field('address2','string'), Field('town','string'),

[web2py] Format date after selecting field from database

2013-12-09 Thread Simon Carr
I have this line comment_RS = self.db(self.db.aol_comments.aol_id == item.text(0)).select( orderby=~self.db.aol_comments.comment_date) I want to format the date field like dd/mm/ How would I do this in Python? Thanks Simon --

[web2py] Re: auth.wiki() allow guests to view the wiki

2013-08-20 Thread Simon Carr
Very sorry, I know now what I was doing. I changed the name of the page from index to Hello World, so when I tried to visit the page it was asking me to create the index page, which of course required me to login. Thanks Simon On Monday, 19 August 2013 21:36:20 UTC+1, Alan Etkin wrote: Hi,

[web2py] auth.wiki how to align and resize images

2013-08-20 Thread Simon Carr
I have added a photo to my page using Edit Page Media I have added the following line to my page to display the image @1/road.jpg This gives me the image full size and centered. Is there something I can include on this line to add style such as size and alignment? -- --- You

[web2py] Re: auth.wiki how to align and resize images

2013-08-20 Thread Simon Carr
200px]]. On Tuesday, 20 August 2013 10:28:36 UTC+1, Simon Carr wrote: I have added a photo to my page using Edit Page Media I have added the following line to my page to display the image @1/road.jpg This gives me the image full size and centered. Is there something I can include

[web2py] auth.wiki() allow guests to view the wiki

2013-08-19 Thread Simon Carr
Hi, I am trying to make use of auth.wiki() but I am finding that to even a view a wiki page I have to be logged in. I want visitors to be able to view the wiki pages without having to first register an account. How do I do this? Thanks Simon -- --- You received this message because you

[web2py] is this is postgres issue with groupby?

2013-08-07 Thread Simon Carr
Hi, in the docs it uses this code as an example. for row in db().select( db.person.ALL, orderby=db.person.name, groupby=db.person.name): print row.name Alex Bob Carl When I run this code it fails. rsSuppliers = db().select( db.weekly_data.ALL,

Re: [web2py] is this is postgres issue with groupby?

2013-08-07 Thread Simon Carr
So the web2py documentation is incorrect then and the db.person.ALL line removed from the example. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [web2py] is this is postgres issue with groupby?

2013-08-07 Thread Simon Carr
2013 13:15, Simon Carr simon...@gmail.com javascript:wrote: So the web2py documentation is incorrect then and the db.person.ALL line removed from the example. -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from

[web2py] Left Join on fields other than id

2013-07-25 Thread Simon Carr
Hi I have the following code RSRecs = db(query).select( db.weekly_data_reporting.supplier_code, db.weekly_data_reporting.supplier_name, db.weekly_data_reporting.item,

[web2py] Re: getting duplicate results using with_alias

2013-07-11 Thread Simon Carr
are starting from. Il giorno mercoledì 10 luglio 2013 15:22:00 UTC+2, Simon Carr ha scritto: The following code duplicate records based on the number of tables referenced using with_alias. You see below that I have a reference to 5 tables which is resulting in every record being duplicated 5 times

[web2py] getting duplicate results using with_alias

2013-07-10 Thread Simon Carr
I have 5 records in my database. The following code gives me duplicate records. Currently every record is duplicated 5 times. Anu idwhat is going wrong. RSRisks = db( (db.risks.user == userid) (db.risks.status == status) ).select(

[web2py] Re: getting duplicate results using with_alias

2013-07-10 Thread Simon Carr
you are starting from. Il giorno mercoledì 10 luglio 2013 15:22:00 UTC+2, Simon Carr ha scritto: The following code duplicate records based on the number of tables referenced using with_alias. You see below that I have a reference to 5 tables which is resulting in every record being

[web2py] auth_wiki permissions

2013-07-08 Thread Simon Carr
The auth_wiki facility is great for providing traditional wiki facilities but it would also be great for quickly putting together a traditional website. The only problem with this is that I cant find an option to prevent any other logged in user from editing my pages. Users would still need to

[web2py] web2py on the BeagleBone Black up and running!!

2013-07-04 Thread Simon Carr
Just wanted to say thanks for the ubuntu deployment script on the recipes page at http://web2py.com/book/default/chapter/13#Linux-and-Unix I now have web2py running on ubuntu/Apache with my BeagleBone Black and it seems very fast. Here is a link http://www.lancslad.co.uk/welcome/default/index

[web2py] PyQt Model Views and gluon. Has anyone had any experience with this combination?

2013-06-17 Thread Simon Carr
Hello All, I am working on a application that uses PyQt for the GUI. I am also using gluon as my ORM. The next stage of the project is going to be working with much larger data sets and and unknown column headings so I want to start using QView objects. I have not used the Model View

[web2py] DAL: Can I check if a value is in a list

2013-05-24 Thread Simon Carr
By the way I am using Gluon in a standalone Python script, so if the code does not look quite that might be the reason. I currently have some values hard coded in my SQL but I now want users to have a choice. Here is the current code. RS_Data = db(

Re: [web2py] DAL: Can I check if a value is in a list

2013-05-24 Thread Simon Carr
' or itemgroup=='c' or itemgroup=='d') It would be even better if I could just say itemgroup isin ['a','b','c','d'] but I know that probably isn't available. Thanks Simon On Friday, 24 May 2013 12:31:50 UTC+1, Manuele wrote: Il 24/05/13 13:21, Simon Carr ha scritto: By the way I am using

[web2py] Re: DAL: Can I check if a value is in a list

2013-05-24 Thread Simon Carr
@manuele @Anthony Many thanks for your help with this. As usual with Web2Py and gluon there is always an easy way. the .belongs() is perfect for what I need. Simon On Friday, 24 May 2013 13:37:37 UTC+1, Anthony wrote: buildCommod = ( for commodity in commodityList:

[web2py] Gluon outside web2py

2013-04-28 Thread Simon Carr
Hi All, It's been a while since I have posted on here, but have just started a new project with Python and PyQt4. Because of my positive experience with web2py in the past I wanted to make use of Gluon for the DAL in my app. So I have two table that I want a many to many relationship with.

[web2py] Re: Help with testing new app

2013-04-28 Thread Simon Carr
I would suggest that when the slide show is downloaded it opens in a new tab. When I finished reading I was tempted to close the window to return to the app. I would also suggest a short description on each information request screen to help the user with what is being requested. on the

[web2py] Re: Gluon outside web2py

2013-04-28 Thread Simon Carr
cannot say more without a better understanding of your workflow. Can you provide a more complete use-case? On Sunday, 28 April 2013 03:44:44 UTC-5, Simon Carr wrote: Hi All, It's been a while since I have posted on here, but have just started a new project with Python and PyQt4. Because

[web2py] Re: Web2Py and MS Access

2012-11-16 Thread Simon Carr
Which SQL Standard? On Friday, 16 November 2012 02:39:24 UTC, Tim Richardson wrote: Your experience with MS Access will not be good I think. It doesn't even pretend to support SQL standards as far as I remember, and you'll have a very difficult time getting support. The advice to

Re: [web2py] Re: Web2Py and MS Access

2012-11-16 Thread Simon Carr
I will take a look at this. Thanks On Friday, 16 November 2012 09:53:13 UTC, Vasile Ermicioi wrote: man do a favor for yourself and don't use ms access database, move to sqlite which is built in python :) why?

[web2py] Re: Web2Py and MS Access

2012-11-16 Thread Simon Carr
On Friday, 16 November 2012 10:25:36 UTC, Tim Richardson wrote: On Friday, 16 November 2012 20:32:23 UTC+11, Simon Carr wrote: Which SQL Standard? :) But seriously, the SQL you develop to get anything working with Access will be unusually idiosyncratic. I have bad memories ... --

[web2py] Re: Web2Py and MS Access

2012-11-16 Thread Simon Carr
There is no way I will get away with that at work. However Oracle is available so I might see if I can get a business case together for them to set me up with a schema. Again many thanks. On Friday, 16 November 2012 21:08:49 UTC, Tim Richardson wrote: Humour me back ... download SQL Server

[web2py] Web2Py and MS Access

2012-11-15 Thread Simon Carr
There is very little information on this topic available on the internet. I have found one post where a user asked if Web2Py could be used with MS Access and a few users including Massimo suggested that it might be possible using the MSSql driver. There was no further information to suggest

[web2py] Re: Web2Py and MS Access

2012-11-15 Thread Simon Carr
if it flies... On Thursday, November 15, 2012 9:26:11 AM UTC-5, Simon Carr wrote: There is very little information on this topic available on the internet. I have found one post where a user asked if Web2Py could be used with MS Access and a few users including Massimo suggested that it might

[web2py] Re: Web2Py and MS Access

2012-11-15 Thread Simon Carr
it should be db=DAL for current versions and the connection string is normally mssql://user:pwd@server/database On Thursday, November 15, 2012 10:32:08 AM UTC-5, Simon Carr wrote: Should the connection string not start db=DAL(.) If not how does this method of connection allow you

[web2py] Re: Web2Py and MS Access

2012-11-15 Thread Simon Carr
You may be right for speed but I have never done any testing so I couldn't comment, but my point was regarding the ability to have concurrent writes, which I should have made clearer. As it happens the size of application I am developing this would not be a problem, but as I have learned to my

[web2py] Re: Web2Py and MS Access

2012-11-15 Thread Simon Carr
something you can run 'from the desktop'. On Thursday, November 15, 2012 11:46:23 AM UTC-5, Simon Carr wrote: Bat Man strikes again, That seems to work perfectly to make the actual connection, unfortunately :-( there is an immediate error in the SQL as it tries to create the auth tables

[web2py] Re: Web2Py and MS Access

2012-11-15 Thread Simon Carr
So would I just subclass MSSQL2Adapter and then change types dictionary values to match what MS Access expects to see? Once done, what do I have to do in order to make something like db=DAL('msaccess://.') available to use? Thanks Simon On Thursday, 15 November 2012 17:02:04 UTC,

[web2py] Re: Web2Py and MS Access

2012-11-15 Thread Simon Carr
Thank you, Will take a look at it tomorrow and let you know how I got on. It would be nice if I had something to commit back to the project. Simon On Thursday, 15 November 2012 21:24:43 UTC, Niphlod wrote: subclass MSSQLAdapter (creating, e.g. MSAccessAdapter(MSSQLAdapter)), then just

[web2py] datetime object from datetime field

2012-11-11 Thread Simon Carr
What is the best way to create a python datetime object from a datetime field. i.e import datetime ... my_date_time_object = datetime.datetime(myrecord.datetimevalue) Ultimately what I want to do is add x hours to a datetime value held in a field and compare the new time to datetime.now to see

[web2py] Re: Is there a way to force https usage for specific controller

2012-11-11 Thread Simon Carr
Hi, Put this code in your model if request.controller == 'default' and request.function == 'user': request.requires_https() I found it on the net and it is not tested. On Sunday, 11 November 2012 20:16:04 UTC, Calycé wrote: Hi all, Probably a silly question, but is there an easy way to

Re: [web2py] datetime object from datetime field

2012-11-11 Thread Simon Carr
what I am trying to do with the code above. How should I do it? On Sunday, 11 November 2012 21:17:07 UTC, viniciusban wrote: Your myrecord.datetimevalue is already a python datetime.datetime field. On Sun, Nov 11, 2012 at 6:24 PM, Simon Carr simon...@gmail.comjavascript: wrote: What

Re: [web2py] datetime object from datetime field

2012-11-11 Thread Simon Carr
11, 2012 11:20:04 PM UTC+1, Simon Carr wrote: so given this code then def refresh_charts(): import datetime charts = db(db.user_chart).select() for chart in charts: a = chart.id_chart.lastupdated print chart.id_chart.lastupdated, a + datetime.timedelta(hours=5

[web2py] conditional update after form is submitted

2012-11-10 Thread Simon Carr
Hi, I want to run some code after an update form is submitted but before the record in the database is updated. Where can I put the code so that I know the values in the form have passed validation before I run my code. Thanks Simon --

Re: [web2py] conditional update after form is submitted

2012-11-10 Thread Simon Carr
Hi Vasile, Thanks for the reply, but that code seems to generate an error if form.validate(request.vars): TypeError: validate() takes exactly 1 argument (2 given) Here is my full function that I am trying to run if it helps @auth.requires_login() def edit_chart(): record =

Re: [web2py] conditional update after form is submitted

2012-11-10 Thread Simon Carr
Thanks Batman, That is what I was looking for. I thought I had seen it before, but could not find it again when searching the documentation. Cheers Simon On Saturday, 10 November 2012 19:47:00 UTC, Niphlod wrote: or use the onvalidation callback on form.process

[web2py] join in DAL

2012-11-07 Thread Simon Carr
Hi All, I have these 3 tables among others db.define_table('workbook', Field('path',requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'workbook.path')]), Field('title',requires=IS_NOT_EMPTY()), format=%(title)s, ) db.define_table('chart', Field('chartName'), Field('id_workbook',db.workbook),

[web2py] Re: join in DAL

2012-11-07 Thread Simon Carr
Thanks for the reply Bill, but I don't need to know who uploaded the charts. They are more of a data warehouse. Users subscribe to them and a reference is created in user_chart. The bit of my web site I am working on at the moment is where the user subscribes. I am showing a list of all the

[web2py] Re: join in DAL

2012-11-07 Thread Simon Carr
, Simon Carr wrote: Hi All, I have these 3 tables among others db.define_table('workbook', Field('path',requires=[IS_NOT_EMPTY(),IS_NOT_IN_DB(db,'workbook.path')]), Field('title',requires=IS_NOT_EMPTY()), format=%(title)s, ) db.define_table('chart', Field('chartName'), Field

[web2py] SQLFORM via AJAX - action is blank

2012-11-07 Thread Simon Carr
I have this piece of code that calls a function in my controller when clicked. {{=A('Add to My Charts',callback=URL('subscribe_form',vars={'chartname': chart.chartName}),target=str(chart.chartName).replace('.','_'))}} The subscribe_form function looks like this def subscribe_form():

[web2py] Re: SQLFORM via AJAX - action is blank

2012-11-07 Thread Simon Carr
On Wednesday, 7 November 2012 19:26:46 UTC, Derek wrote: Why would you need to create an action for the form? Are you not using self submit? On Wednesday, November 7, 2012 12:22:03 PM UTC-7, Simon Carr wrote: I have this piece of code that calls a function in my controller when clicked. {{=A('Add

[web2py] Re: SQLFORM via AJAX - action is blank

2012-11-07 Thread Simon Carr
Charts',_href=URL('subscribe_form',vars={'chartname': 'whatever'}), cid='whatever') That will load the component and trap all links and form submissions, because it translates to an onclick=web2py_component(url, target) On Wednesday, November 7, 2012 8:39:50 PM UTC+1, Simon Carr wrote

[web2py] Re: SQLFORM via AJAX - action is blank

2012-11-07 Thread Simon Carr
to be updated after submitting the form. Thanks Simon On Wednesday, 7 November 2012 21:04:35 UTC, Niphlod wrote: doesn't it already (provided that there is a div id='whatever'/div in the page) ? On Wednesday, November 7, 2012 9:36:27 PM UTC+1, Simon Carr wrote: Thank you, but how do I

[web2py] Re: SQLFORM via AJAX - action is blank

2012-11-07 Thread Simon Carr
page, so it can't be submitted with anything else) now what ? On Wednesday, November 7, 2012 10:34:48 PM UTC+1, Simon Carr wrote: Your right. Thanks mate. I was getting confused over cid. But anyway it works great for creating the form. I notice that the form also submits via AJAX. How do

[web2py] Re: SQLFORM via AJAX - action is blank

2012-11-07 Thread Simon Carr
optimization / I don't want to use a LOAD :P did you try redirecting after the form with type='auto' ? (I think that that's a feature available in the last few releases...) On Wednesday, November 7, 2012 11:31:09 PM UTC+1, Simon Carr wrote: I want it to be loaded with AJAX and submitted normally

[web2py] auth.wiki() run Function

2012-11-06 Thread Simon Carr
Is there a way to run a Controller or Model Function in a wiki page created with auth.wiki() I am thinking some like {{ =insertImage(5) }} as you would have in a view. Thanks Simon --

[web2py] Re: Getting an error in auth.wiki()

2012-10-28 Thread Simon Carr
No need to type the name, the name is already populated for you. Could someone else try to test this issue. I have just downloaded the latest nightly build and still get the same error. A very quick test to replicate this problem is 1) Create new App and in default/index simply return

[web2py] Re: Getting an error in auth.wiki()

2012-10-28 Thread Simon Carr
@newpage]] On Monday, October 29, 2012 2:14:03 AM UTC+13, Simon Carr wrote: In Answer to your questions about step 6, there is no need to type the name, the name is already populated for you. Could someone else try to test this issue. I have just downloaded the latest nightly build and still

[web2py] Re: Getting an error in auth.wiki()

2012-10-27 Thread Simon Carr
. You could hide the function part of the URL using routing if you want. On Friday, October 26, 2012 5:01:18 PM UTC-7, Simon Carr wrote: I know I have already been talking about auth.wiki() in another thread but this is a different questions, so thought I should start a new thread. When I

[web2py] Re: WIKI or plugin wiki?

2012-10-27 Thread Simon Carr
with the new improvements. On web2py 2.1.1 there's the preview, though. On Friday, October 26, 2012 9:30:25 PM UTC+2, Simon Carr wrote: I notice in Web2Py 2.x the index function in Default offers the suggestion of returning auth.wiki I was assuming that this was just plugin wiki now

[web2py] Re: WIKI or plugin wiki?

2012-10-27 Thread Simon Carr
UTC+2, Simon Carr wrote: Hi Massimo, I do like auth.wiki, but I am sure there is a bug in the creation of links. I have logged a an issue here. http://code.google.com/p/web2py/issues/detail?id=1119start=100 I would have a look myself, but after a lot of searching, I cant even find the code

[web2py] Re: Getting an error in auth.wiki()

2012-10-27 Thread Simon Carr
I have tried this now on an Installation in Windows and Linux. Here is the process I go through. 1) Create a new simple App 2) Edit Controller default.py 3) Edit def index() to have just return auth.wiki() 4) Now go to the Front End index file 5) I am asked to login, so I register a new user and

[web2py] Cant get Janrain working

2012-10-26 Thread Simon Carr
Hi All, I am trying to get Janrain work. I have signed up for a free account on their site. Here is my model code. ## if you need to use OpenID, Facebook, MySpace, Twitter, Linkedin, etc. ## register with janrain.com, write your domain:api_key in private/janrain.key from

Re: [web2py] Cant get Janrain working

2012-10-26 Thread Simon Carr
wizard or doing it by yourself, either way is simple. At the end you'll have something like this: http://saiadarede.com.br/cadastro/default/user/login Depending on what you choose at Janrain's site, you can change that a bit. I hope that help you a bit... C'ya 2012/10/26 Simon Carr

[web2py] WIKI or plugin wiki?

2012-10-26 Thread Simon Carr
I notice in Web2Py 2.x the index function in Default offers the suggestion of returning auth.wiki I was assuming that this was just plugin wiki now built into the core. But I notice that there is no widget option and no WYSIWYG editor when creating a new page. Should I continue to plugin wiki

[web2py] Re: WIKI or plugin wiki?

2012-10-26 Thread Simon Carr
. On Friday, October 26, 2012 9:30:25 PM UTC+2, Simon Carr wrote: I notice in Web2Py 2.x the index function in Default offers the suggestion of returning auth.wiki I was assuming that this was just plugin wiki now built into the core. But I notice that there is no widget option and no WYSIWYG

[web2py] Getting an error in auth.wiki()

2012-10-26 Thread Simon Carr
I know I have already been talking about auth.wiki() in another thread but this is a different questions, so thought I should start a new thread. When I create a new page the following link to that page is created localhost/simoncarr/default/contactme when I click it I get the error invalid

[web2py] Re: is it possible to run web2py parallel to php on apache port 80?

2012-10-24 Thread Simon Carr
Sorry for the delay in getting back to you Don, I just tried out your solution below and it works just great. Many thanks. My only problem now is actually having the guts to do this on my live VPS. I need to do some planning!! Cheers Simon On Sunday, 21 October 2012 17:04:05 UTC+1, Don_X

Re: [web2py] web2py integration with apache alongside PHP

2012-10-20 Thread Simon Carr
Hi Kenneth, Sorry for the delay in getting back to you. Yes, if you could send me a copy of your vhosts file it might be very useful. Regards Simon On Saturday, 13 October 2012 09:11:03 UTC+1, Kenneth wrote: Hi, the is no problems running both PHP and web2py side by side. If you're

[web2py] Re: is it possible to run web2py parallel to php on apache port 80?

2012-10-20 Thread Simon Carr
Hi Massimo, I have run your script on a test box (linux mint) and it worked just fine. It got me running web2py with Apache. Can you elaborate on what I need to do in order to also get php working. I copied that code you wrote Location /php/Location into the apache configuration file. I

[web2py] executesql - referring to fields in result?

2012-10-17 Thread Simon Carr
When I run a query using executesql, what is the object that is returned? is it a dictionary? The reason I ask is that I am starting to think that the order of fields being returned to me is not the order that I put them in the SQL statement. As an example, I am running this code. def

[web2py] Re: executesql - referring to fields in result?

2012-10-17 Thread Simon Carr
. In that case you get a Rows object. On Wednesday, 17 October 2012 16:13:20 UTC-5, Simon Carr wrote: When I run a query using executesql, what is the object that is returned? is it a dictionary? The reason I ask is that I am starting to think that the order of fields being returned to me

[web2py] HELP - type 'exceptions.TypeError'('Set' object is not iterable)

2012-10-16 Thread Simon Carr
HI All, I am up against the wall as far as time is concerned, I have promised I will get the images for his updated products on his site by end of play today and this is the first time I have used web2py to automate most of the process. I am getting this error type

[web2py] Re: HELP - type 'exceptions.TypeError'('Set' object is not iterable)

2012-10-16 Thread Simon Carr
Many Many Thanks, I owe you a beer. Simon On Tuesday, 16 October 2012 22:09:46 UTC+1, Niphlod wrote: whoops, gotcha. syntax for executesql is rows = db.executesql(), not rows = db(db.executesql()) :-P now, go back hitting the wall :P --

[web2py] Adding extra links to smartgird

2012-10-12 Thread Simon Carr
Hi All, How do I add an extra link to the SQLFORM.smartgird As an example I want to add a link or a button Process File and have it run a controller function that opens and processes an uploaded file. Thanks Simon --

[web2py] Adding named arguments to the url

2012-10-12 Thread Simon Carr
Is it possible to added named arguments to the URL, such as ?n=123 the problem with request.args is that you have to know in advance where in your url structure the data you want to access is held. Thanks Simon --

[web2py] Re: Adding extra links to smartgird

2012-10-12 Thread Simon Carr
buttons or links on my grid either. Am I doing something wrong? Simon On Friday, 12 October 2012 18:49:42 UTC+1, Simon Carr wrote: Hi All, How do I add an extra link to the SQLFORM.smartgird As an example I want to add a link or a button Process File and have it run a controller function

Re: [web2py] Adding named arguments to the url

2012-10-12 Thread Simon Carr
Thanks for the reply Bruno, but is there a web2py function that can add vars to the url? On 12 October 2012 19:10, Bruno Rocha rochacbr...@gmail.com wrote: http:///?name=Bruno then request.vars {name: Bruno} -- --

Re: [web2py] Re: Adding extra links to smartgird

2012-10-12 Thread Simon Carr
OK Sorted it, Not sure why your example didn't work, but I took a very similar example from another web site and it worked fine. Thanks anyway for putting me on the write track. Simon On 12 October 2012 20:35, Simon Carr simonjc...@gmail.com wrote: Do you mean like this: def uploadfile

Re: [web2py] Re: Adding extra links to smartgird

2012-10-12 Thread Simon Carr
dict(filelist=filelist) def processfile(): return dict() On 12 October 2012 21:15, Simon Carr simonjc...@gmail.com wrote: OK Sorted it, Not sure why your example didn't work, but I took a very similar example from another web site and it worked fine. Thanks anyway for putting me

Re: [web2py] Adding named arguments to the url

2012-10-12 Thread Simon Carr
Bruno, Massimo - Thanks to you both. On 12 October 2012 21:14, Massimo Di Pierro massimo.dipie...@gmail.comwrote: URL('function',vars=dict(name='value')) On Friday, 12 October 2012 15:07:19 UTC-5, Simon Carr wrote: Thanks for the reply Bruno, but is there a web2py function that can add

[web2py] web2py integration with apache alongside PHP

2012-10-12 Thread Simon Carr
I currently have a VPS which I am hosting active sites for my customers in PHP. In future I would like to write apps for my customers in web2py and host them on the same server. From what I have seen it seems possible, but I can't find any clear instructions. Can someone point me to a link

[web2py] Re: web2py 2.0.2 is out

2012-10-12 Thread Simon Carr
Thanks to all of you who have given so many of us another wonderful evolution of this great framework. Simon On Thursday, 30 August 2012 04:41:34 UTC+1, Massimo Di Pierro wrote: After 5 months. It is done. This is the most waited and the most feature-packed release. I am sure we'll find

[web2py] Editing html views in Eclipse

2012-10-09 Thread Simon Carr
I know this is a question that I should be asking in an eclipse forum, but I dont know of any off hand, but I am sure a lot you probably use eclipse and will be able to help me very quickly. When I open one of web2py html view files, it opens as a web page in the eclipse editor and I am not able

Re: [web2py] Where to host web2py

2012-08-22 Thread Simon Carr
the Raspberry-PI ! cheers, Stef On 20-08-2012 21:12, Simon Carr wrote: I think I have made a mistake with SWVPS, I would suggest that no one touch them. I had no response from them after sending my money, even though it was less than $20. I have sent them two emails to what is supposed

[web2py] Field to get file path

2012-08-21 Thread Simon Carr
Hi, I want to create a field where a user can select a file. But I dont want to upload the file, I just want to record the file path in the database. How do I do this? Thanks Simon --

Re: [web2py] Re: Field to get file path

2012-08-21 Thread Simon Carr
, as it would present a security risk (i.e., the browser won't send that information to the server). Anthony On Tuesday, August 21, 2012 4:32:01 PM UTC-4, Simon Carr wrote: Hi, I want to create a field where a user can select a file. But I dont want to upload the file, I just want

Re: [web2py] Where to host web2py

2012-08-20 Thread Simon Carr
mikegirar...@gmail.com wrote: Wow, those are great prices for VPS. Was there anything besides price that made you choose them? On Sunday, August 19, 2012 5:42:32 AM UTC-4, Simon Carr wrote: I have just found this service http://webkeepers.com I think i will give their medium service a try

[web2py] How to add a hidden field

2012-08-20 Thread Simon Carr
I am still writing my learning application a Blog. I have now created a function in my controller to produce a form for users to leave comments for a post. How do I add a hidden field to the comment form with the post_id? here is my database defs if it helps. db.define_table( 'post',

Re: [web2py] Re: How to add a hidden field

2012-08-20 Thread Simon Carr
() for title in comments. On Monday, August 20, 2012 10:23:47 PM UTC+2, Simon Carr wrote: I am still writing my learning application a Blog. I have now created a function in my controller to produce a form for users to leave comments for a post. How do I add a hidden field to the comment form

Re: [web2py] Re: How to add a hidden field

2012-08-20 Thread Simon Carr
Cheers Villas, As I am learning, I will give both methods a try. Simon On 20 August 2012 21:42, villas villa...@gmail.com wrote: Something like this... SQLFORM(, hidden=dict('post_id'='999')) Hope that is what you meant. On Monday, August 20, 2012 9:23:47 PM UTC+1, Simon Carr

[web2py] How to build form is another action

2012-08-20 Thread Simon Carr
Sorry to be pain keep asking loads of what probably seems like dumb questions but. Given this section of my controller, you will see that in view_post(), I am calling comment_form() to generate a form and return it back so I can include it in the view_post.html. The form displays fine in the

[web2py] routes.py changed but user still called from default

2012-08-20 Thread Simon Carr
I have updated my routes.py as below default_application = 'blog'# ordinarily set in base routes.py default_controller = 'post' # ordinarily set in app-specific routes.py default_function = 'index' # ordinarily set in app-specific routes.py This works fine for the home page and the

Re: [web2py] Re: How to build form is another action

2012-08-20 Thread Simon Carr
The idea was that after a comment is accepted and saved to the DB the user will be returned to the view_post() controller which will update the page so they can see the comment they just posted. I assumed that because I put view_post() under the if form.process().accepted: it would only be called

Re: [web2py] Re: How to build form is another action

2012-08-20 Thread Simon Carr
is part of the view_post page anyway. Another option is to turn the comment_form into an Ajax component (see http://web2py.com/books/default/chapter/29/12#Components). Anthony On Monday, August 20, 2012 6:30:16 PM UTC-4, Simon Carr wrote: The idea was that after a comment is accepted

Re: [web2py] Re: routes.py changed but user still called from default

2012-08-20 Thread Simon Carr
the problem go away if you remove routes.py altogether? Anyway, instead of the routes you have (which is legacy functionality), you're better off using the parameter-based router to set the default application, controller, and function. Anthony On Monday, August 20, 2012 6:13:53 PM UTC-4, Simon

Re: [web2py] Where to host web2py

2012-08-19 Thread Simon Carr
issue here is that i would have to invest in a new pc and the computer room shares a wall with the bedroom so the fan noise might become an issue at night. Will give webkeepers a try and report back with results. Simon On 19 Aug 2012 00:54, Simon Carr simonjc...@gmail.com wrote: After a few weeks

Re: [web2py] Where to host web2py

2012-08-19 Thread Simon Carr
In the end i went for another option. swvps.com the reason being they were also cheap but an option to locate my vps in the uk. The uk option was an extra $4.99 a month but still cheap. Simon. On 19 Aug 2012 10:42, Simon Carr simonjc...@gmail.com wrote: I have just found this service http

Re: [web2py] Where to host web2py

2012-08-19 Thread Simon Carr
prices for VPS. Was there anything besides price that made you choose them? On Sunday, August 19, 2012 5:42:32 AM UTC-4, Simon Carr wrote: I have just found this service http://webkeepers.com I think i will give their medium service a try on the one month contract and see how it goes

[web2py] Database datetime data type

2012-08-19 Thread Simon Carr
I am trying to use a datetime type in my database. I have the following table definition. db.define_table( 'post', Field('author',db.auth_user), Field('PostDate','datetime',requires=IS_DATETIME(format='%d/%m/%Y %H:%M:%S'),default=request.now), Field('title',requires=IS_NOT_EMPTY()),

[web2py] linking tables to auth_user

2012-08-19 Thread Simon Carr
How do I change the default display field when I link a table to the auth_user table. The default is Full Name (id) i.e. Simon Carr (1) How do I change this to either email or just full name? Thanks Simon --

  1   2   >