[web2py] Re: SQLFORM.grid - Create from list of objects

2013-09-09 Thread Gliese 581 g
Hi Massimo, Thanks for suggesting this solution. I am now able to display a gird on my page with pagination and sorting options available. But whenever I click on page number or try to sort a column by clicking on its header, nothing happens. I get a blank page. I tried to debug it and found tha

[web2py] Re: Please help me to design my database structure

2013-09-09 Thread Luc Chase
You have thought of the correct solution ( I would call it project_steps ) . On Monday, 9 September 2013 17:12:04 UTC+1, Andreas Wienes wrote: > > Hello, > > I've three models called project, project_type and steps. > > A project belongs to a certain project_type and depending on what kind o

[web2py] Re: Updating the auth_user profile that also has a one-to-many field?

2013-09-09 Thread Apple Mason
Ah, okay. Thanks! On Monday, September 9, 2013 3:57:38 PM UTC-4, Niphlod wrote: > > your user_image is a reference to the id of the images table: you're the > one choosing to have it instead of the image itself on the auth_user table. > You have to deal with your model and your requirements maki

[web2py] SQLFORM.grid and count field (web2py 2.6.0. test)

2013-09-09 Thread damufo
Hi, I'm using web2py 2.6.0. test. on line sqlhtml 1916 columns = [f for f in fields if f.tablename in tablenames] AttributeError: 'Expression' object has no attribute 'tablename' when field count, count not attribute 'tablename' My code: submenus = db.menus.with_alias('menusopt

[web2py] Re: Please help me to design my database structure

2013-09-09 Thread Andreas Wienes
Thanks for your advice! I corrected the small error and created the new table. Now I'm trying to copy the steps for a specific project_type to a new created project. I tried the following: def start(): form = SQLFORM(db.project).process() if form.accepted: project_type = form.va

[web2py] Updating the auth_user profile that also has a one-to-many field?

2013-09-09 Thread Apple Mason
I created a custom profile view so that the user can create/update his profile. Currently I have something like: models/db.py: db.define_table('images', Field('image', 'upload', requires = IS_EMPTY_OR(IS_IMAGE())) auth.settings.extra_fields['auth_user'] = [ Field('user_image', 'reference

[web2py] Re: Crowdsourcing platform in Web2Py?

2013-09-09 Thread samuel bonill
link : https://github.com/codeupstudio/chipincode/wiki/O-que-%C3%A9-o-Chip-In-Code link 2: https://github.com/codeupstudio/chipincode El jueves, 4 de julio de 2013 04:35:01 UTC-5, D.P. escribió: > > Hello, > > it is my first post in this group, and it is a pleasure to be in, as I > really thin

Re: [web2py] Re: Newby, can't connect to a Postgresl database

2013-09-09 Thread Massimo Di Pierro
You need postgresql 8.2+. postgresql 8.1 does not allow you changing the string escaping and, by default, it is non conform to the SQL standard. This results in a security issue with web2py. You must upgrade. On Monday, 9 September 2013 10:43:55 UTC-5, Sartglider wrote: > > Change the platform:

[web2py] wey2py+apache+windows

2013-09-09 Thread agosalo
Hello everyone, just attached to web2py framework. Can anybody guide me install web2py+apache+windows in intranet environment. I've found tutorials but somewhat misleading or I can't perceive it properly. Tried http://ochiba77.blogspot.com/2011/10/how-to-setup-web2py-apache-wsgi-uniform.html

[web2py] Re: Defining one extra auth table

2013-09-09 Thread Massimo Di Pierro
Probably this is the easiest solution: http://www.web2py.com/books/default/chapter/29/09/access-control?search=extra_fields You can always defined your own additional tables with db.define_table(...) On Monday, 9 September 2013 11:07:30 UTC-5, ranjith wrote: > > Hi, > > I want to define one extr

Re: [web2py] Why doesnt web2py need to be installed?

2013-09-09 Thread Richard Vézina
Yes you can copy/paste the app and it will work as long as there a is a web2py properly setup and running on the remote machine. Notice that is you want to improve execution time you can put in prod/staging the bytecomplied app. There is a button in the admin to compile your app. Richard On Mon,

[web2py] Re: link to item on list.

2013-09-09 Thread אבי אברמוביץ
Alright, that works for me: items = db().select(db.t_items.ALL, cache=(cache.ram, 60)) I guess there is a method to create a select request on the background? for the list the user is currently watching or even to other queries that the user might get to via the page links? Thanks. On Monday,

[web2py] Re: We deployed web2py with apache2 but when we need password to access https://outser.com/appadmin

2013-09-09 Thread Massimo Di Pierro
When you start web2py, you set the password. How do you start web2py? On Monday, 9 September 2013 14:18:39 UTC-5, D Dan wrote: > > What is the password to admin access? Where to set this password? > > > Thanks > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://

[web2py] About Python Logo

2013-09-09 Thread Massimo Di Pierro
Quote from: http://pythonconquerstheuniverse.wordpress.com/2009/10/03/python-java-a-side-by-side-comparison/#comment-2495 The Python logo is obviously a snake. The name of the language, however, was based on Monty Python. So what this means is that you are going to have good laughs when the p

[web2py] Re: Why doesn't validate_and_insert() return on error?

2013-09-09 Thread Christopher Morlier
Okay, that is what I what I was anticipating when I asked, "Do the validators not check required fields?" The behavior is still a little surprising to me, since validate_and_insert() is part of the DAL, and it has an explicit method of reporting errors. It is also surprising to me that an erro

[web2py] Re: Why doesn't validate_and_insert() return on error?

2013-09-09 Thread Anthony
On Monday, September 9, 2013 4:40:43 PM UTC-4, Christopher Morlier wrote: > Okay, that is what I what I was anticipating when I asked, "Do the > validators not check required fields?" > > The behavior is still a little surprising to me, since > validate_and_insert() is part of the DAL, and it ha

[web2py] Re: Why doesn't validate_and_insert() return on error?

2013-09-09 Thread Anthony
>From the book: Notice that requires=... is enforced at the level of forms, required=True is enforced at the level of the DAL (insert), while notnull,unique and ondelete are enforced at the level of the database. While they sometimes may seem redundant, it is important to maintain the distinct

[web2py] Re: wey2py+apache+windows

2013-09-09 Thread Niphlod
does this work ? http://web2py.com/books/default/chapter/29/13/deployment-recipes#Apache-and-mod_wsgi On Monday, September 9, 2013 8:21:26 PM UTC+2, ago...@gmail.com wrote: > > Hello everyone, > > just attached to web2py framework. > Can anybody guide me install web2py+apache+windows in intranet

[web2py] Re: Why doesn't validate_and_insert() return on error?

2013-09-09 Thread Christopher Morlier
Basically it is this: db.define_table('recording', Field('time_stamp','bigint',required= True, comment='Recording creation time in milliseconds.'), Field('system_id', 'reference system', required= True, commen

Re: [web2py] Re: How to leverage web2py popularity and usage?

2013-09-09 Thread Anthony
There was one: http://www.web2py.com.ar/planet/. Looks like it's returning an error ticket now. Anthony On Monday, September 9, 2013 12:39:48 PM UTC-4, Julie Bouillon wrote: > > If there's enough enough bloggers out there writing about web2py, I'll > be happy to put a "planet web2py" in place.

[web2py] Re: Why doesn't validate_and_insert() return on error?

2013-09-09 Thread Niphlod
ok, let me rephrase: what is your model ? On Monday, September 9, 2013 6:07:46 PM UTC+2, Christopher Morlier wrote: > > At the moment, I am not explicitly providing any validators; so I expect > only the default validators for my field types. > > Actually, the test where this arises is when I lea

[web2py] Re: Updating the auth_user profile that also has a one-to-many field?

2013-09-09 Thread Niphlod
your user_image is a reference to the id of the images table: you're the one choosing to have it instead of the image itself on the auth_user table. You have to deal with your model and your requirements making your own profile update/insert page, dealing with all the things you explained . On

[web2py] We deployed web2py with apache2 but when we need password to access https://outser.com/appadmin

2013-09-09 Thread D Dan
What is the password to admin access? Where to set this password? Thanks -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message becau

[web2py] Re: Why doesn't validate_and_insert() return on error?

2013-09-09 Thread Christopher Morlier
At the moment, I am not explicitly providing any validators; so I expect only the default validators for my field types. Actually, the test where this arises is when I leave out a required field, and I get the error "Table: missing required field: time_stamp". Do the validators not check requi

Re: [web2py] Re: How to leverage web2py popularity and usage?

2013-09-09 Thread Mirko Scavazzin
I'm interested in. Julie Bouillon a écrit : >If there's enough enough bloggers out there writing about web2py, I'll be >happy to put a "planet web2py" in place. >Just let me know if there's an interest for that. > >Julie > >On 09/07/2013 06:01 PM, Massimo Di Pierro wrote: > >yes the number time

[web2py] Re: how to create rickshaw graph in the web2py

2013-09-09 Thread Dave S
Just to be sure the question is understood, you're talking about using this tool in web2py? On Friday, September 6, 2013 4:35:04 AM UTC-7, Pramod Jadhav wrote: > > h > /dps "newbie with no answers" -- --- You received this message becaus

[web2py] Re: how to create rickshaw graph in the web2py

2013-09-09 Thread Dave S
On Monday, September 9, 2013 10:41:53 AM UTC-7, Dave S wrote: > > Just to be sure the question is understood, you're talking about using > this tool in web2py? > > > > > > On Friday, September 6, 2013 4:35:04 AM UTC-7, Pramod Jadhav wrote: >> >> h

[web2py] Re: Why doesnt web2py need to be installed?

2013-09-09 Thread Niphlod
"installed" in python barely means "put in a std dir, append that dir to the sys.path". web2py will be eventually re-integrated with pipy, in order to be able to do "pip install web2py" and have it working just fine, but as of right now you can just download the zip and run it from wherever it i

Re: [web2py] Re: Newby, can't connect to a Postgresl database

2013-09-09 Thread starglider.dev
Change the platform: windows XP and postgresql 8.1, everything local, no root user, but now trys 5 seconds and give this error: Failure to connect, tried 5 times: Traceback (most recent call last): File "/home/mdipierro/make_web2py/web2py/gluon/dal.py", line 7413, in __init__ File "/home/mdipierro

Re: [web2py] Re: How to leverage web2py popularity and usage?

2013-09-09 Thread Julie Bouillon
If there's enough enough bloggers out there writing about web2py, I'll be happy to put a "planet web2py" in place. Just let me know if there's an interest for that. Julie On 09/07/2013 06:01 PM, Massimo Di Pierro wrote: > yes the number time distance between releases has increased, mostly > becau

Re: [web2py] Re: web2py on GoDaddy shared hosting

2013-09-09 Thread Richard Vézina
http://support.godaddy.com/help/category/436/web-hosting-languages-and-scripts-linuxbased-languages-and-scripts-python Difficult to say... You need Python and middleware wsgi, fastcgi, etc. You will need an advice from someone that has godaddy shared server... Richard On Mon, Sep 9, 2013 at 1

[web2py] Re: smartgrid of grid and list of dictionary

2013-09-09 Thread keiser1080
thank you for your help Massimo. I think there are a misunderstanding sory for that. (usualy i speak french, so sometime i say something and i would say otherting) I don't mean it easy to do a function for converting a list of dictionary to a rows. I mean if a fonction like that exist that would

[web2py] Defining one extra auth table

2013-09-09 Thread ranjith
Hi, I want to define one extra auth table. Could you pls explain me how to do that? Currently the auth class has user, role,group and permission tables. I want to develop a web application related to colleges. So, I want to define one more extra table which contain the colleges and the users tab

[web2py] Please help me to design my database structure

2013-09-09 Thread Andreas Wienes
Hello, I've three models called project, project_type and steps. A project belongs to a certain project_type and depending on what kind of project it is, includes different steps. For example "writing a book" is a new project and belongs to the project_type "hobby project". "making a plan" an

[web2py] Why doesnt web2py need to be installed?

2013-09-09 Thread Muzaffar
I am currently using CodeIgniter and now moving to web2py and noticed its similar in how easy it is to start. I like the feature of web2py not having to be installed. Does this sacrifice anything performance-wise for example? Whats the tech/reasoning behind not making this more common among web

Re: [web2py] Crowdsourcing platform in Web2Py?

2013-09-09 Thread Ykä Marjanen
Hi, check out Massimo's appliances from Git. There are lots of good example sources for web2py projects: https://github.com/mdipierro/web2py-appliances Ykä On Monday, September 9, 2013 11:40:58 AM UTC+3, D.P. wrote: > > Sorry about the long time to answer. I will would be please to take a look

[web2py] Re: web2py on GoDaddy shared hosting

2013-09-09 Thread ranjith
If web2py installation in GoDaddy shared server is not possible, let me know any of the good servers(cheap). My user base is in Tamil Nadu,India On Friday, 23 August 2013 12:58:56 UTC+5:30, ranjith wrote: > > Hi, > > I am new to web2py. I have a shared hosting account in Godaddy. Will I be > ab

[web2py] Master-detail CRUD

2013-09-09 Thread Luc Chase
Given two joined tables, I can see how things work for generating a CRUD form to manage each one. But are there any examples of code available that show how to generate a view that allows both to be edited and saved at the same time? e.g. Invoice header with Invoice-lines and one save button.

[web2py] Re: Why doesn't validate_and_insert() return on error?

2013-09-09 Thread Niphlod
how do you specify the validators for your required fields ? On Monday, September 9, 2013 5:09:04 AM UTC+2, Christopher Morlier wrote: > > Hello, > > I am implementing a RESTful API and have the following code in my POST > handler: > > ret = db.recording.validate_and_insert(**fixed_fields) >

[web2py] Re: link to item on list.

2013-09-09 Thread Anthony
On Monday, September 9, 2013 11:20:02 AM UTC-4, אבי אברמוביץ wrote: > Thanks, yes, I know of the item.id problem for next and previous, I just > used it for now I'll try to do something with the > http://docs.python.org/2/library/functions.html#enumerate later on.Will I > also have to ask from

[web2py] Re: link to item on list.

2013-09-09 Thread אבי אברמוביץ
Thanks, yes, I know of the item.id problem for next and previous, I just used it for now I'll try to do something with the http://docs.python.org/2/library/functions.html#enumerate later on.Will I also have to ask from the controller to change each item page meta data for google indexing? On M

[web2py] Re: Managing Greenlet Queues

2013-09-09 Thread archeaneon
I am using gevent and I was planning on using a list of queues to perhaps manage individual communications between users (rather than broadcast communications). On Monday, September 9, 2013 8:58:35 AM UTC-4, Massimo Di Pierro wrote: > > Please tell us more about what you are doing. Web2py is bas

Re: [web2py] Re: Grid takes an awful long time to show result.

2013-09-09 Thread Johann Spies
On 9 September 2013 14:43, Niphlod wrote: > if you don't need the grid to search through the table, the moment you > turn off the search widget you won't get the "performance penalty" of > creating the dropbox for the IS_IN_DB requirement you have in your models. > Of cause yes. Thanks. I forg

Re: [web2py] Re: Grid takes an awful long time to show result.

2013-09-09 Thread Anthony
On Monday, September 9, 2013 4:24:48 AM UTC-4, Johann Spies wrote: > Thanks Anthony. That explains some of the delays when I am using the > grid. As a result of this experience I will try to avoid using it for > queries involving large tables and look at alternatives like Solidtable. > I thin

[web2py] Why doesn't validate_and_insert() return on error?

2013-09-09 Thread Christopher Morlier
Hello, I am implementing a RESTful API and have the following code in my POST handler: ret = db.recording.validate_and_insert(**fixed_fields) if ret.errors: raise HTTP(400, 'Validation failed: ' + str(ret.errors)) url = URL('api', args=('recording',ret.id)) response.head

Re: [web2py] Crowdsourcing platform in Web2Py?

2013-09-09 Thread D.P.
Sorry about the long time to answer. I will would be please to take a look and help you testing it. Regards, D. On Thursday, July 4, 2013 4:35:23 PM UTC+2, Relsi Hur Maron wrote: > > What features you need? > > I'm developing a project of crowdsourcing here, is commercial but I'll > release a p

[web2py] Re: smartgrid of grid and list of dictionary

2013-09-09 Thread Massimo Di Pierro
While it would be easy to create a torows function it would not help you. The grid does not take rows, it takes a query and modifies when you interact with it. It paginates it, sorts it, etc. You cannot do these things with a rows object. On Monday, 9 September 2013 04:10:37 UTC-5, keiser1080 w

[web2py] Re: Managing Greenlet Queues

2013-09-09 Thread Massimo Di Pierro
Please tell us more about what you are doing. Web2py is based on cpython which does not has greenlets. Are you using gevent? What the greenlets for? What's the web server? On Sunday, 8 September 2013 21:50:28 UTC-5, arche...@gmail.com wrote: > > For the purpose of managing greenlet queues, is th

[web2py] Re: link to item on list.

2013-09-09 Thread Anthony
The query will happen on every page request, though you can cache it. There's another problem, though -- in the list view, the arg in the link is the item.id, but in the individual item view, you use t

Re: [web2py] Re: Grid takes an awful long time to show result.

2013-09-09 Thread Niphlod
if you don't need the grid to search through the table, the moment you turn off the search widget you won't get the "performance penalty" of creating the dropbox for the IS_IN_DB requirement you have in your models. On Monday, September 9, 2013 10:24:48 AM UTC+2, Johann Spies wrote: > > Thanks A

[web2py] Re: deployment on Windows - errors

2013-09-09 Thread Niphlod
Please use this recipe. The windows service integration has slowly stopped working and we're going to remove it from future releases http://www.web2pyslices.com/slice/show/1614/nssm-webserver-and-scheduler-as-services-in-windows-oses On Monday, September 9, 2013 11:01:47 AM UTC+2, Dmitry Ermolae

[web2py] Re: link to item on list.

2013-09-09 Thread אבי אברמוביץ
After some tries I got to this, which works fine: My question is if the controller "saves" the "items" dict, or it queries for it on every time the view calls it (when moving between pages using the next/previous links? Thanks. controller def index(): items = db(db.t_items).select() ret

Re: [web2py] Custom form updating field not in view

2013-09-09 Thread Johann Spies
On 6 September 2013 20:23, SimonD wrote: > > I have a complex table, where I want to expose just some of the fields in > a custom form, and am using SQLFORM with a custom form. > I would not use SQLFORM in this case but SQLFORM.factory. In that way you can handle the updates explicitly and not

[web2py] Re: smartgrid of grid and list of dictionary

2013-09-09 Thread keiser1080
thanks massimo that work. But that could be more simple if there are an opposit methode to rows.as_list() Is there any function in web2py like this rows = torows(mylistofdict)? With a function like tihs we can easy past any data to a grid, smartgrid and sqltable. Le lundi 9 septembre 2013 0

[web2py] Re: wsgihandler.py not exist!

2013-09-09 Thread Dmitry Ermolaev
суббота, 7 сентября 2013 г., 12:23:43 UTC пользователь Niphlod написал: > > if you dowloaded the trunk version, all handlers are in the /handlers > directory: just copy the one you need to the root and you're good to go. > > On Saturday, September 7, 2013 7:33:38 AM UTC+2, Dmitry Ermolaev wrote:

[web2py] deployment on Windows - errors

2013-09-09 Thread Dmitry Ermolaev
If I use web2py.exe from download "For Normal Users" - error on start windows service: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved. C:\web2py>web2py -W install -L options.py web2py Web Framework Created by Massimo Di Pierro, Copyright 200

Re: [web2py] Re: Newby, can't connect to a Postgresl database

2013-09-09 Thread Johann Spies
Postgresql would not allow root as a database user. It is also not safe to work with 'postgres' as your normal user for normal day-to-day usage as postgres is the superuser for Postgresql. So you have to create a user in postgresql, create the correct database with the user you created as owner,

Re: [web2py] Re: Grid takes an awful long time to show result.

2013-09-09 Thread Johann Spies
Thanks Anthony. That explains some of the delays when I am using the grid. As a result of this experience I will try to avoid using it for queries involving large tables and look at alternatives like Solidtable. Fortunately with the possibility (probably (co)created by you) to get a result of db