[web2py] Re: newbie question Can't use versioning in web2py

2019-08-12 Thread Dave S
On Sunday, August 11, 2019 at 10:34:32 AM UTC-7, Jirawat Kusolpredee wrote: > > Access admin page -> edit -> versioning -> throw exception ??? versioning > just doesn't work I never messing up the core ? What happened here ? > Source control? Use an external source control, like Tortoise HG or

Re: [web2py] Re: Newbie question about github / trunk

2017-09-11 Thread Nico Zanferrari
Well, if you cannot use git, in fact you can do this: - download https://github.com/web2py/web2py/archive/master.zip and uncompress it (for example in /tmp/web2py.master) - download https://github.com/web2py/pydal/archive/master.zip and uncompress it. Move its content inside the web2py directory (

Re: [web2py] Re: Newbie question about github / trunk

2017-06-22 Thread Anthony
On Thursday, June 22, 2017 at 4:05:15 AM UTC-4, Nico Zanferrari wrote: > > You can also download the current "master branch" directly from the link > https://github.com/web2py/web2py/archive/master.zip > > No, the web2py repo includes PyDal as a Git submodule, and the download zip file generated

Re: [web2py] Re: Newbie question about github / trunk

2017-06-22 Thread Nico Zanferrari
You can also download the current "master branch" directly from the link https://github.com/web2py/web2py/archive/master.zip Nico 2017-06-21 17:38 GMT+02:00 Anthony : > That just means test the master branch on Github. You can get it via: > > git clone --recursive g...@github.com:web2py/web2py

[web2py] Re: Newbie question about github / trunk

2017-06-21 Thread Anthony
That just means test the master branch on Github. You can get it via: git clone --recursive g...@github.com:web2py/web2py.git Of course, you need Git installed. Anthony On Wednesday, June 21, 2017 at 3:53:55 AM UTC-4, Karoly Kantor wrote: > > I raised an issue in github about Google Cloud SQL (

[web2py] Re: Newbie question about github / trunk

2017-06-21 Thread Karoly Kantor
Sorry I don't get it. The code under that link seems old to me, the particular pdal adapter file I am interested in is from 2016 May 10. On Wednesday, June 21, 2017 at 10:05:03 AM UTC+2, 黄祥 wrote: > > in http://web2py.com/init/default/download you can see there are several > links for tester (tr

[web2py] Re: Newbie question about github / trunk

2017-06-21 Thread 黄祥
in http://web2py.com/init/default/download you can see there are several links for tester (trunk) e.g. for source code https://mdipierro.pythonanywhere.com/examples/static/nightly/web2py_src.zip best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - ht

[web2py] Re: Newbie to Web2Py...Integration with Bootstrap3...PyCharm How-To's

2017-05-17 Thread Dave S
On Tuesday, May 16, 2017 at 8:22:19 PM UTC-7, pbreit wrote: > On Saturday, May 13, 2017 at 1:53:42 PM UTC-7, Christopher wrote: >> >> Greetings, >> >> I'm a WEB2PY newbie and I'm looking to quickly prototype a web >> application. >> >> I'm hoping to use http://www.layoutit.com/ with Bootstrap 3

[web2py] Re: Newbie to Web2Py...Integration with Bootstrap3...PyCharm How-To's

2017-05-16 Thread pbreit
If you're looking to prototype rapidly, forget all that stuff and just build something in a text editor (ie Atom) with the pre-installed Bootstrap. Don't over-complicate it. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code

[web2py] Re: Newbie question regarding controllers and views

2016-08-06 Thread Massimo Di Pierro
The controller is executed fully every time the page is requested by the browser. The output is passed to the view which is also rendered every time the page is requested. No execution is ever paused by the server. The first time .accpets() is false. When you submit the form, .accepts() is true

[web2py] Re: newbie question about login

2014-11-03 Thread Leonel Câmara
Yes that's possible, web2py can work as a Central Authentication Service. http://www.web2py.com/books/default/chapter/29/09/access-control#Central-Authentication-Service -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - h

[web2py] Re: Newbie Web2Py Questions

2014-05-18 Thread Anthony
> > 2) I currently have information pulling from a collection of documents > called a cartulary (long story on that project). So when I select from > default/index the name > of a collection I go from: > http://127.0.0.1:8000/deeds/default/index > to > http://127.0.0.1:8000/deeds/default/cartul

[web2py] Re: Newbie Web2Py Questions

2014-05-18 Thread Massimo Di Pierro
1) You can return anything your want: def index(): a = {} b = {} return {'a':a, 'b':b} 2) Not really but you should look into gluon/contrib/webclient.py and doctests. Web2py runs doctests in controllers automatically. On Saturday, 17 May 2014 07:23:33 UTC-5, Christopher Power wrote:

[web2py] Re: Newbie - SQLFORM ordering of reference fields

2014-04-25 Thread M Bailey
On Thursday, 24 April 2014 14:05:45 UTC+1, Massimo Di Pierro wrote: > > db.search_form.pet_type_ref.requires = > IS_IN_DB(db,'pet_type',orderby=db.pet_type.description) > > OR this may work too: > > db.search_form.pet_type_ref.requires.orderby = db.pet_type.description > >> >> Massimo thank you

[web2py] Re: Newbie - SQLFORM ordering of reference fields

2014-04-24 Thread Massimo Di Pierro
db.search_form.pet_type_ref.requires = IS_IN_DB(db,'pet_type',orderby=db.pet_type.description) OR this may work too: db.search_form.pet_type_ref.requires.orderby = db.pet_type.description On Thursday, 24 April 2014 07:31:40 UTC-5, M Bailey wrote: > > I'm trying to migrate a django project to w

[web2py] Re: Newbie print question

2014-04-18 Thread jimbo
Dave S, followed you instructions and added that at the end of the bootstrap css file, worked a treat thanks! On Thursday, 17 April 2014 11:25:14 UTC+1, jimbo wrote: > > Right, I have made a simple database which works well and looks nice on > screen. That is in 'edit' everything looks as it sho

[web2py] Re: Newbie print question

2014-04-17 Thread Dave S
On Thursday, April 17, 2014 8:48:17 AM UTC-7, jimbo wrote: > > Cheers Anthony, will have a go at that. Can I just comment out or remove > those lines. Thanks Jimmy. > Been there, done that, got the turtleneck: :-) /dps >

[web2py] Re: Newbie print question

2014-04-17 Thread Anthony
Yes, you can just comment/remove those lines. On Thursday, April 17, 2014 11:48:17 AM UTC-4, jimbo wrote: > > Cheers Anthony, will have a go at that. Can I just comment out or remove > those lines. Thanks Jimmy. > > On Thursday, 17 April 2014 11:25:14 UTC+1, jimbo wrote: >> >> Right, I have made

[web2py] Re: Newbie print question

2014-04-17 Thread jimbo
Cheers Anthony, will have a go at that. Can I just comment out or remove those lines. Thanks Jimmy. On Thursday, 17 April 2014 11:25:14 UTC+1, jimbo wrote: > > Right, I have made a simple database which works well and looks nice on > screen. That is in 'edit' everything looks as it should, every

[web2py] Re: Newbie print question

2014-04-17 Thread Anthony
Bootstrap includes some "@media print" CSS rules, one of which displays the href of links right after the link (this is in bootstrap.min.css). See http://drupal.stackexchange.com/questions/59900/how-to-get-rid-of-added-urls-when-printing-a-bootstrap-themed-page. If you'd like, you can go to htt

[web2py] Re: Newbie print question

2014-04-17 Thread jimbo
Sorry, the page displays on screen fine, it is when I send it to the printer that the extra 'garbage' appears. Thanks. On Thursday, 17 April 2014 11:57:48 UTC+1, LightDot wrote: > > I think there is a bit of vocabulary mismatch happening here. I assume > you, by "print", mean displaying generat

[web2py] Re: Newbie print question

2014-04-17 Thread LightDot
I think there is a bit of vocabulary mismatch happening here. I assume you, by "print", mean displaying generated html in the browser? In that case, please be more specific about what exactly you want removed or altered. Show us your code or a screenshot and state *exactly* what's the issue. R

[web2py] Re: [newbie] example authorization

2013-06-04 Thread Anthony
You didn't update the action of the login form, so it's trying to post to the URL of the page it is on. Should be: auth.login().update(_action=URL('default', 'user', args='login'), ...) or whatever your login URL is. Anthony On Tuesday, June 4, 2013 6:33:28 PM UTC-4, lesssugar wrote: > > OK, I

[web2py] Re: [newbie] example authorization

2013-06-04 Thread lesssugar
OK, I have this in my view: {{if not auth.user:}} {{auth.settings.login_next = URL('default', 'test')}} {{=auth.login().update(_name='global_login')}} Forgot password? {{else:}} Logout {{pass}} As you say, if login data are correct, user should be automatically logged in and [in this case] r

[web2py] Re: [newbie] example authorization

2013-06-04 Thread Anthony
The auth.login() action automatically verifies the login and logs the user in (which involves adding the user record to the user's session) -- you don't have to do any of that explicitly. If you want to redirect to a specific URL after login, you can set auth.settings.login_next to the desired

[web2py] Re: Newbie Tables Question

2013-04-17 Thread Anthony
On the client side, you can handle the UI changes using Javascript/Ajax. The problem is modeling the data in the DAL and the database. If there aren't too many distinct attributes across the types of items, you can use a single database table as usual, only populating the fields that are releva

[web2py] Re: Newbie Tables Question

2013-04-17 Thread 黄祥
i think it can be achieve in the view part by jquery. e.g. i assume you use sqlform.grid with the table food and have the table field food_type (requires=IS_IN_SET('Pizza', 'Steak')) and field specific_food *default/food.html* {{extend 'layout.html'}} {{=grid}} jQuery(document).ready(function

[web2py] Re: newbie question about digitally signed URLs using hmac

2013-04-10 Thread Tim Richardson
Ah, thank you. I now understand much more about userSignature. -- --- 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 web2py+unsubscr...@googlegroups.com. For mor

[web2py] Re: newbie question about digitally signed URLs using hmac

2013-04-10 Thread Massimo Di Pierro
No. If you chose to use the hmac key than you have to handle it. Normally you use URL(user_signature=True). In this case the key is per user and per session and managed for you. On Wednesday, 10 April 2013 07:36:14 UTC-5, Tim Richardson wrote: > > the book has an example to use hmac digitally si

[web2py] Re: [Newbie]How to query and display table records defined in db.py in pages of auth.wiki()

2013-03-26 Thread Spring
Thanks for explaining. 在 2013年3月26日星期二UTC+8下午10时33分05秒,Spring写道: > > Hi there, > > I've going through the web2py group trying various keywords but didn't > find a clear answer: in the pages of auth.wiki, how can I query and display > tables defined in db.py? Or, more importantly is this possibl

[web2py] Re: [Newbie]How to query and display table records defined in db.py in pages of auth.wiki()

2013-03-26 Thread Niphlod
though the current "recommended" way is to code such "views" on a different controller and embed those "views" as components http://web2py.com/books/default/chapter/29/03?search=wiki#Components On Tuesday, March 26, 2013 4:40:17 PM UTC+1, Alan Etkin wrote: > > I've going through the web2py group

[web2py] Re: [Newbie]How to query and display table records defined in db.py in pages of auth.wiki()

2013-03-26 Thread Alan Etkin
> > I've going through the web2py group trying various keywords but didn't > find a clear answer: in the pages of auth.wiki, how can I query and display > tables defined in db.py? Or, more importantly is this possible. Accordingly > to the introduction of auth.wiki it sounds like a Swiss knife

[web2py] Re: Newbie: Cascading deletes with SQLFORM.grid and GAE

2012-11-27 Thread Julian Sanchez
Aha!! I don't know how I missed that before but indeed the event was throwing an exception and GAE kept on going on its merry way. Found a couple of things I was doing wrong. The delete event method takes only one parameter (the query) and once you get the query you can do a straight 'select

[web2py] Re: Newbie: Cascading deletes with SQLFORM.grid and GAE

2012-11-27 Thread howesc
Julian, can you add logging to your delete_linked method to prove to yourself that it is being called, and that it is not throwing an exception? that will help us track down where it's gone astray thanks! cfh On Sunday, November 25, 2012 5:43:16 PM UTC-8, Julian Sanchez wrote: > > Oh, I

[web2py] Re: Newbie: Cascading deletes with SQLFORM.grid and GAE

2012-11-25 Thread Julian Sanchez
Oh, I see. I thought that were you mentioned logs you were referring to the built-in logs inside web2py (I assume there are some?). As far as my 'test app' is concerned all there is is the code I posted a couple of posts ago. I also added these controllers for testing the deletion of records:

[web2py] Re: Newbie: Cascading deletes with SQLFORM.grid and GAE

2012-11-24 Thread howesc
honestly, i'm not smart enough to use logging.conf. i'm not sure how much of it is GAE overriding things, and how much of it is my inability to read the docs and understand how it works! anyhow, i don't have a logging.conf in my GAE setups, but i use logging extensively and it all seems to sho

[web2py] Re: Newbie: Cascading deletes with SQLFORM.grid and GAE

2012-11-24 Thread Julian Sanchez
Are there any specific things I need to do to enable logging under GAE? This is what I did: - renamed the logging.example.conf file to logging.conf - added an entry for the test app I created above - removed all references to all handlers except consoleHandler Any page I request gives

[web2py] Re: Newbie: Cascading deletes with SQLFORM.grid and GAE

2012-11-23 Thread howesc
can you add some logging in and let us know if there are exceptions? about the delete limitations - web2py iterates over the set of items to delete and deletes them (the version in trunk is improved over the last release, but both still work). if the set of items to delete is large the query t

[web2py] Re: Newbie: Cascading deletes with SQLFORM.grid and GAE

2012-11-21 Thread Julian Sanchez
Massimo, I created a small test to try your function: db.define_table('carrier', Field('name', type='string'), Field('description', type='string') ) db.carrier.name.requires = IS_NOT_IN_DB(db(db.carrier.id > 0), 'carrier.name')

[web2py] Re: Newbie: Cascading deletes with SQLFORM.grid and GAE

2012-11-17 Thread Massimo Di Pierro
You can try something like def delete_linked(query, table=table): ids = [t.id in db(query).select(db.table.id)] for field in table._referenced_by: db(field._table._id.belongs(ids)).delete() db.table._before_delete.append(delete_linked) but you will run into consistency problems.

[web2py] Re: NewBie Question about crud.create

2012-09-06 Thread tommasot
Il giorno mercoledì 5 settembre 2012 17:09:41 UTC+2, tommasot ha scritto: > > I have the following code in the controller about record creation > > *form = crud.create(db.anno,next='list_anno')* > > This is the model,how you can see is very simple :) > > *db.define_table('anno', > Field('desc

[web2py] Re: NewBie Question about crud.create

2012-09-06 Thread tommasot
I need to verify if 'incorso' field is True for the new record created,after this check i need to set all other records in False,The 'incorso 'Field' is the equivalent for the current year in English Il giorno mercoledì 5 settembre 2012 18:34:48 UTC+2, Anthony ha scritto: > > Do you want to mani

[web2py] Re: NewBie Question about crud.create

2012-09-05 Thread Anthony
Do you want to manipulate it (a) after submission but before validation (use request.vars.incorso), (b) after validation but before the insert (use crud.settings.create_onvalidation), or (c) after the record is inserted (use crud.settings.create_onaccept). Anthony On Wednesday, September 5, 20

[web2py] Re: Newbie: interactive monitoring of a scheduler job?

2012-07-24 Thread Niphlod
If you don't want your user to click somewhere every n seconds to see it, the only two ways are ajax (polling at n seconds interval the status) or websocket. The easier way is monitoring with ajax calls. You can find complete examples online. I'm sure that there are a lot of implementations, b

[web2py] Re: [Newbie] Using existing Mysql DB with web2py app

2012-07-09 Thread Anthony
> > 1. Can I use web2py to connect to the existing DB? Is there any automated > way of creating the model classes from existing DB tables? Any specific > things to keep in mind? > http://code.google.com/p/web2py/source/browse/scripts/extract_pgsql_models.py

Re: [web2py] Re: Newbie Alert: A flow chart of how things happen

2012-06-07 Thread Bruno Rocha
This is a very nice tutorial --> http://killer-web-development.com/ *Bruno Cezar Rocha* http://www.CursoDePython.com.br [image: Facebook] [image: Twitter] [image: LinkedIn] [image: about.me]

[web2py] Re: Newbie Alert: A flow chart of how things happen

2012-06-07 Thread Omar Ali
Thank you all for your feedback. I suppose that's correct. I should try to change my way of thinking about writing applications from plain simple event-driven programming. It just felt so natural thinking about it that way... I will definitely go through the online manuals thoroughly and then

[web2py] Re: Newbie Alert: A flow chart of how things happen

2012-06-07 Thread Cliff Kachinske
Some googles: http request http response On Thursday, June 7, 2012 6:15:26 AM UTC-4, Omar Ali wrote: > > I'm a total newbie. I have programmed extensively during the VB days > (event driven programming) (I know, you'd hardly call that programming!) so > ... Web programming is taking a toll on

[web2py] Re: Newbie Alert: A flow chart of how things happen

2012-06-07 Thread pbreit
I'd suggest running through the "Overview": http://web2py.com/books/default/chapter/29/3 If I understand correctly, you're not going to see "event driven programming". Basic web programming is "Request > Build Response > Send Response back to the User". On Thursday, June 7, 2012 3:15:26 AM UTC

[web2py] Re: Newbie Alert: A flow chart of how things happen

2012-06-07 Thread Anthony
It might be easier if you go through http://web2py.com/books/default/chapter/29/1#Model-View-Controller, http://web2py.com/books/default/chapter/29/4#Workflow, and http://web2py.com/books/default/chapter/29/4#Dispatching, and then come back with specific questions. Anthony On Thursday, June 7

[web2py] Re: newbie - dreamweaver and web2py

2012-04-09 Thread villas
I recently did a few experiments with Dreamweaver and quickly decided that it would make things more complicated rather than easier. If you are starting to study web2py then I believe it is better to get used to working directly with the files before trying to use productivity aids. A good c

[web2py] Re: newbie - dreamweaver and web2py

2012-04-08 Thread weheh
Sure, you could use dreamweaver to generate some html page templates and embed them in a web2py directory structure. But you would have to tell dreamweaver where to store pages in the web2py views folders. In other words, you would have to ensure they adhered to the structure expected by web2py

[web2py] Re: newbie question about relationships in model

2012-02-04 Thread air_cooled
So the order is important I take it, I'll check out the order on the ones that work, and see if moving the definitions around helps. However, surely this isn't going to be possible in every situation. What if you have A -> B and B -> C and C -> A ? You can't satisfy all these by putting them in o

[web2py] Re: newbie : Accessing specific form elements' values from a controller.

2012-02-04 Thread Anthony
When a form is submitted, the submitted values will be in request.post_vars as well as request.vars (the former is specifically for variables submitted via post requests, whereas the latter includes both post and get variables). So, you could do: if request.vars: do something with request.v

[web2py] Re: Newbie Tutorial Confusion

2012-01-31 Thread llanitedave
You hit the nail on the head. So I'm really just misunderstanding the tutorial. And of course, looking at the code now it makes sense, because it only redirects to the second page if there is actually a value in "visitor_name". Now I get it. Thanks, folks. It's a self-facepalm. But there will

[web2py] Re: Newbie Tutorial Confusion

2012-01-31 Thread Benjamin
Oups you're right. Now I remember what I didn't understand at this point, and probably what the OP was expecting. The book says : " Note that if the "second" action is ever called before a visitor name is set, it will display "Hello anonymous" because session.visitor_name returns None. " What t

[web2py] Re: Newbie Tutorial Confusion

2012-01-31 Thread Anthony
> > I'm pretty sure the first should be like this : > > > > ** > > def first(): > if request.vars.visitor_name: > session.visitor_name = request.vars.visitor_name > redirect(URL('second')) > return dict(form=form) > > ** > > NOTICE THE return dict(fo

[web2py] Re: Newbie Tutorial Confusion

2012-01-31 Thread Benjamin
Hello again, I'm pretty sure the first should be like this : ** def first(): if request.vars.visitor_name: session.visitor_name = request.vars.visitor_name redirect(URL('second')) return dict(form=form) ** NOTICE THE return dict(form=form), I think it'

[web2py] Re: Newbie Tutorial Confusion

2012-01-31 Thread Benjamin
Hi, I did the tutorial of the pdf last week (newest pdf of december) and there is a missing step exactly at this spot of the PDF. (or actually a "not so clear change which needs to be made to run the tutorial without any issue"). I didn't know of the google groups at that time so I didn't post the

[web2py] Re: Newbie Tutorial Confusion

2012-01-31 Thread Anthony
Note the following line: if request.vars.visitor_name: That means it will only store the value in the session and do the redirect if "visitor_name" is in request.vars. If you're not submitting a visitor name, then that variable will not be in request.vars, and the conditional branch in the co

[web2py] Re: newbie: How to match REST URL and extract path params

2011-12-23 Thread Anthony
All the elements of the URL after the controller and function are request.args (except the query string, of course). You could have a function called company(), and then companyid and storeid would be in request.args(0) and request.args(2), respectively. Or you might want a more general functio

[web2py] Re: newbie: How to match REST URL and extract path params

2011-12-22 Thread spiffytech
What you need is the pattern-based routing system: http://web2py.com/books/default/chapter/29/4#Pattern-based-system The pattern-based system allows you to route URLs based on regular expressions. You can convert certain portions of a URL into GET args or vars. web2py does not allow you to map UR

[web2py] Re: Newbie - install on Apache not working...

2011-11-17 Thread juanduke
Do you have enable all the apache modules indicated in web2py book?

Re: [web2py] Re: Newbie - install on Apache not working...

2011-11-17 Thread Kenneth Lundström
Is the name of the configuration file correct, on Red Hat deratives only .conf are read by Apache (if not otherwise configured in httpd.conf)? Write some errors in the file, just add for example asdasd in the beginning of the file and try restarting Apache. If file read Apache should not be ab

[web2py] Re: Newbie - install on Apache not working...

2011-11-17 Thread Derek
I have check the logs - the only place that I see anything related is in the access log, which shows the call to the URL (and nothing else). The call appears to get redirected to the home page for the main site. I have re-linked   CustomLog /private/var/log/apache2/access.log common   ErrorLog /

[web2py] Re: Newbie - install on Apache not working...

2011-11-17 Thread Derek
I agree Apache does not see this - that is what I am wondering about :) Yes, there are other name-based webpages on the server; this is a subdomain of them. On Nov 15, 2:17 pm, Kenneth Lundström wrote: > Hi Derek, > > is this the first name based domain on the server? Do you have other > name base

[web2py] Re: [Newbie] Best practice to set application wide settings

2011-07-26 Thread Jagmal
Thanks David for the link. I think I am not at a stage right now, where I need to store configurations in the database. I will definitely give this a try once I am at that stage.

Re: [web2py] Re: [Newbie] Best practice to set application wide settings

2011-07-22 Thread Bruno Rocha
look at this -> http://martin.tecnodoc.com.ar/default/post/2011/05/13/20_optimize-your-web2py-app-using-the-new-import-method

[web2py] Re: [Newbie] Best practice to set application wide settings

2011-07-22 Thread David Marko
Look to this web2py utils ... http://packages.python.org/web2py_utils/index.html ... there is an object for storing/accessing configurations values into database. Its very handy ...

Re: [web2py] Re: Newbie questions

2011-03-19 Thread Niklas Rosencrantz
On Wed, Mar 16, 2011 at 12:46 PM, Anthony wrote: > On Wednesday, March 16, 2011 5:29:09 AM UTC-4, Nick Rosencrantz wrote: > >> Hi >> I just deployed my first attempt to try web2py with google app engine >> (http://matochsovklockan.appspot.com) >> Basically it works while a few links return "inval

[web2py] Re: Newbie questions

2011-03-16 Thread Anthony
On Wednesday, March 16, 2011 5:29:09 AM UTC-4, Nick Rosencrantz wrote: > Hi > I just deployed my first attempt to try web2py with google app engine > (http://matochsovklockan.appspot.com) > Basically it works while a few links return "invalid request" eg > http://matochsovklockan.appspot.com/e

Re: [web2py] Re: Newbie Problems with Cherokee + Web2py

2011-01-06 Thread Offray Vladimir Luna Cárdenas
Hi, El 05/01/11 19:12, John-Kim Murphy escribió: > Try using the most recent instructions for getting Web2Py working with > Cherokee > . > I documented the steps I took about two weeks ago.

[web2py] Re: Newbie Problems with Cherokee + Web2py

2011-01-05 Thread John-Kim Murphy
Try using the most recent instructions for getting Web2Py working with Cherokee . I documented the steps I took about two weeks ago. The other instructions

[web2py] Re: newbie

2010-12-13 Thread Shel
That clears up a lot. Thank you both.

[web2py] Re: newbie

2010-12-13 Thread Shel
That clears up a lot. Thank you both.

[web2py] Re: newbie

2010-12-13 Thread Mirek Zvolský
To understand the basic behaviour of web2py, you can try following: In the default controller default.py make a function, f.e. allstorylines(): def allstorylines(): rsStorylines = db().select(db.storyline.ALL) return dict(rsStorylines=rsStorylines) In addition you need a view default/all

[web2py] Re: newbie

2010-12-12 Thread weheh
I assume you've got something like: db.define_table('story',Field('text'), ...) db.define_table('storyline',Field('story_id',db.story,requires=IS_IN_DB(db,'story.id','% (text)s'), ...) Then you can query the db: rows=db(db.storyline.story_id==session.story_id).select(db.story.ALL,left=db.story.

[web2py] Re: Newbie question:add new record as a copy of an existing row in SQLFORM

2010-12-06 Thread tomt
Thanks for the example and the reference. - Tom On Dec 6, 5:58 pm, villas wrote: > Hi tomt > > I believe it takes the fields from the specified source table and > lines them up with a target table.  Any fields which don't match and > the id are discarded. > > What Denes means is that it wouldn'

[web2py] Re: Newbie question:add new record as a copy of an existing row in SQLFORM

2010-12-06 Thread villas
Hi tomt I believe it takes the fields from the specified source table and lines them up with a target table. Any fields which don't match and the id are discarded. What Denes means is that it wouldn't work when for example you use form.vars from multiple tables which have some identical field na

[web2py] Re: Newbie question:add new record as a copy of an existing row in SQLFORM

2010-12-06 Thread DenesL
See http://groups.google.com/group/web2py/msg/4a9e84fb5ceb2e4f It only works if there are no common field names. I have added this to the book. On Dec 5, 5:07 pm, tomt wrote: > Hi, > > I'm unfamiliar with _filter_fields. I couldn't find it in the manual > but eventually found it in the source in

[web2py] Re: Newbie question:add new record as a copy of an existing row in SQLFORM

2010-12-05 Thread tomt
Hi, I'm unfamiliar with _filter_fields. I couldn't find it in the manual but eventually found it in the source in gluon/tools.py. Am I correct in assuming it is intended to return everything but the id field from a record? (I've just started to learn python) Is there some documentation available

[web2py] Re: Newbie question:add new record as a copy of an existing row in SQLFORM

2010-12-05 Thread mr.freeze
Interesting, I didn't have to set id to None. Perhaps it's db specific. I was using sqlite. Anyway, _filter_fields is better in either case. Thanks! On Dec 5, 7:00 am, villas wrote: > Hi Nathan > > Just a small point, I tried your code example and it seems you have to > set id==None otherwise it

[web2py] Re: Newbie question:add new record as a copy of an existing row in SQLFORM

2010-12-05 Thread villas
Hi Nathan Just a small point, I tried your code example and it seems you have to set id==None otherwise it tries to add a duplicate row with the same id. Anyway, I thought you also might like this alternative using _filter_fields, just because it's shorter. Maybe it's got other issues, but it se

[web2py] Re: Newbie question:add new record as a copy of an existing row in SQLFORM

2010-12-04 Thread tomt
Thanks to both of the responders. The reference and example have answered my question. (and introduced some concepts I was unfamiliar with) - Tom On Dec 3, 9:30 pm, "mr.freeze" wrote: > Here is an example: > > Model > - > db.define_table('things',Field('name',requires=IS_NOT_EMPTY()), >  

[web2py] Re: Newbie question:add new record as a copy of an existing row in SQLFORM

2010-12-03 Thread mr.freeze
Here is an example: Model - db.define_table('things',Field('name',requires=IS_NOT_EMPTY()), Field('age','integer'),Field('weight','double')) db.things.id.represent = lambda v: A(v,_href=URL(vars=dict(dupe=v)), _onclick='return confirm("Copy

[web2py] Re: Newbie question:add new record as a copy of an existing row in SQLFORM

2010-12-03 Thread DenesL
Hi Tom, you can use dbio=False in the accepts and do the insert "manually" as explained in http://web2py.com/book/default/chapter/07#SQLFORM-without-database-IO On Dec 3, 7:12 pm, tomt wrote: > Hi, > > I've started to write a simple application to learn web2py. I am using > SQLFORM to insert,

[web2py] Re: newbie + resources on web design

2010-11-08 Thread mdipierro
http://vimeo.com/16048970 http://vimeo.com/13485916 On Nov 9, 12:38 am, Markandeya wrote: > Dear Friends at Web2Py, >  i need some resources, books ebooks, tutorials, etc. on how to design > a database driven web application that will help me with web2py > development. Any advice will be appreci

[web2py] Re: newbie + resources on web design

2010-11-08 Thread cjrh
On Nov 9, 8:38 am, Markandeya wrote: > Dear Friends at Web2Py, >  i need some resources, books ebooks, tutorials, etc. on how to design > a database driven web application that will help me with web2py > development. Any advice will be appreciated. http://web2py.com/book

[web2py] Re: Newbie Parent/Child editing- The right way

2010-10-18 Thread Markandeya
Thank you so very much for your lightening fast replies with real help. So much appreciated. Now i will do my homework and learn. thank you again, Markandeya

[web2py] Re: Newbie Parent/Child editing- The right way

2010-10-18 Thread mdipierro
Look at the source code of this app: http://www.web2py.com/appliances/default/show/63 It does what you ask (although for radio logs but you can change table names and add fields) and it is very compact. Done by the book. On Oct 18, 12:59 am, Markandeya wrote: > Dear Friends of Web2py, > i am st

[web2py] Re: Newbie question: Access to data loaded via ajax in view

2010-09-30 Thread mdipierro
You cannot in the page that calls web2py but you can do it 'mydata.load' On Sep 30, 6:17 pm, Relaxd wrote: > I'm a web2py newbie. I have some data that gets updated constantly. I > used the following code to load the data via ajax every few seconds. > The data is updated as expected automatically

[web2py] Re: newbie, import csv table file

2010-09-16 Thread Markandeya
Many thanks. Such a quick a helpful response and much needed. I can't get it to work yet, keep getting an error, but am trying to debug it. (no group for a nontype). Thanks again. Markandeya

[web2py] Re: newbie, import csv table file

2010-09-14 Thread mdipierro
You can use this script http://code.google.com/p/web2py/source/browse/scripts/extract_mysql_models.py to generate a model from the mysql database. On Sep 14, 7:42 am, Markandeya wrote: > Dear Friends of web2py, > Sorry for this repeated question, but i can't seem to understand > properly. I h

Re: [web2py] Re: Newbie needs help

2010-08-22 Thread Michele Alzetta
On Sun, Aug 22, 2010 at 12:12 AM, mdipierro wrote: > My guess is that this is a problem with sqlite. You had the field, you > removed it (but sqlite does not support drop), then you put it back > (and web2py tried to define it again). > > Delete everything in applications//databases then run it >

[web2py] Re: Newbie needs help

2010-08-21 Thread mdipierro
My guess is that this is a problem with sqlite. You had the field, you removed it (but sqlite does not support drop), then you put it back (and web2py tried to define it again). Delete everything in applications//databases then run it again. You have a typo db.define_table('SchemaTurni', ...

[web2py] Re: Newbie question on self-submitting form

2010-06-06 Thread mr.freeze
Try changing your redirect to this: redirect(URL(r=request, f='gotopage',args=request.vars.page_no)) On Jun 6, 6:50 am, NoNoNo wrote: > Can anyone help me with this? Still not get it.    =_=

[web2py] Re: Newbie question on self-submitting form

2010-06-06 Thread NoNoNo
Can anyone help me with this? Still not get it.=_=

[web2py] Re: Newbie question on self-submitting form

2010-06-02 Thread NoNoNo
actually, what i was trying to achieve is provide a form to the visitor to input a page number if there are multi pages. The current problem is, when a page number is submitted, the visitor is not redirected to that page. I hope I made the question clear. Thank you. BTW, there is a CRUD to submit

[web2py] Re: Newbie question on self-submitting form

2010-05-27 Thread mdipierro
Do I understand correctly? When you submit a new db.whoelse. you want to be redirected to a page in the list that shows it. But messages are timestamped. When you submit a new now don't you get redirected to page 1 which shows the last message? Perhaps I do not understand what you mean. Massimo

[web2py] Re: Newbie question on self-submitting form

2010-05-26 Thread NoNoNo
Hi Massimo, Thanks for the reply. I tried your codes and the Previous and Next works well, however the self-submitting form is still not functioning. Input any page number and submit, still on the current page. I'm not sure about the mechanism how the progrom respond to a form submission, because

  1   2   >