[web2py] How to upload the file through the controller in uploads folder and insert them into database

2012-02-08 Thread Sanjeet Kumar
def create(): import os filepath = os.path.join(request.folder,'uploads') form = FORM(TABLE(TR("Compliance Activity:",INPUT(_type="text",_name="activity",requires=IS_NOT_EMPTY(error_message='Please Enter the Activity'))), TR("Document:",INPUT(_type="file",_name

[web2py] Re: The "Delete" doesn't work in my SQLForm.Grid

2012-02-08 Thread Dan
Thanks a lot, Niphlod. It seems that's my environment issue, I created a new project with "colorus" plugin and the "Delete" in grid works just fine. Thanks again. On Feb 8, 8:54 pm, Niphlod wrote: > Uhm, strange. If you see the table from the admin app, after you delete the > record there is stil

[web2py] Re: Anyone deployed web2py on 1and1 shared hosting?

2012-02-08 Thread Edward Shave
Just an update I opened a webfaction account, pointed one of my 1and1 domains to it, and installed web2py by running a single script I found on the webfaction forum... Install web2py with nginx and uwsgi

[web2py] session2trash doesn't work with separate=True

2012-02-08 Thread VP
with this option: session.connect(request, response, separate=True) session2trash script crashed (it couldn't unlink directories). Can someone fix this? Thanks.

[web2py] Re: Wanting to learn

2012-02-08 Thread pbreit
I'd suggest sticking to the Web2py book in the beginning. The "Overview" chapter essentially steps you through building app-like functionality (ie, a wiki). http://web2py.com/books/default/chapter/29/3

[web2py] Re: Wanting to learn

2012-02-08 Thread weheh
Did you try recreating the example in Overview section of online book? On Feb 9, 9:42 am, bradcland wrote: > I'm wanting to learn how to use the web2py framework but I'm a bit of > a python newbie. I've got some of the basics down and I have > experience in other languages(mostly php/javascript a

[web2py] Wanting to learn

2012-02-08 Thread bradcland
I'm wanting to learn how to use the web2py framework but I'm a bit of a python newbie. I've got some of the basics down and I have experience in other languages(mostly php/javascript and some java). I've been looking through the web2py book and I really want to find something that will walk you thr

[web2py] Re: Handling a POST

2012-02-08 Thread pbreit
I use this code to accept an image submission from an iPhone app: def mobilepost(): item_id = 0 form = SQLFORM.factory( Field('username'), Field('title'), Field('price'), Field('image', 'upload', uploadfolder=request.folder+'static/uploads')) if form.ac

[web2py] Re: using radio widget can't receive the empty submit

2012-02-08 Thread Dan
Got it. Thanks a lot for your patience and the explanation. On Feb 8, 10:45 pm, DenesL wrote: > Note that when there are no values in the set then *no* input > type=radio fields are created in the form, so there is nothing to send > when you submit the form. > > On Feb 7, 10:38 pm,Dan wrote: > >

[web2py] Re: how to deploy web2py not in the apache root (help with url rewriting)

2012-02-08 Thread tomt
Hi, I have had some success using wsgi on a fedora system by installing the following config file in /etc/httpd/conf.d . It's basically the config from the online manual with rewrite rules taken from the user group. I have two applications, 'cpa4' and 'master' that are accessed with http://server

[web2py] why many lines in /root/var/log/uwsgi-python/web2py log : routing 0 routes 0 ?

2012-02-08 Thread Carlos
Hi, My production environment: latest web2py trunk, nginx, uwsgi, postgresql, ubuntu, linode. Why are there many lines (one per web request) in the following format: Wed Feb 8 19:03:53 2012* - routing 0 routes 0* showing in the following log file:? /root/var/log/uwsgi-python/web2py.log

Re: [web2py] Re: keep shared objects permanently in RAM: Is it possible ?

2012-02-08 Thread Michele Comitini
Using mmap you share memory among processes. You have at least two ways: 1) named 2) unnamed With 1) named mmap you just open the handle in each process. With 2) you need to open the handle before the fork. I suggest 1) because fcgi or scgi fork early so you could not be able to create an unname

[web2py] Re: maybe minor bug or just documentation

2012-02-08 Thread Anthony
> > In line 14, db.image.title represents the field "title" of table > "image". The > attribute requires allows you to set requirements/constraints that > will be > enforced by web2py forms. Here we require that the "title" is unique: > IS_NOT_IN_DB(db, db.image.title) > Notice this is option

Re: [web2py] Re: is_https

2012-02-08 Thread Michele Comitini
Joerg, Sorry for late reply, yes your solution is very correct. mic 2012/2/8 Joerg Poeltl : > thank you for the fast reply. > > I'm using scgi, so my setup looks like this: > > > location / { >                include /etc/nginx/scgi_params; >                scgi_pass 127.0.0.1:4000; >        }

[web2py] Re: option to move smartgrid buttons to the left side

2012-02-08 Thread Adi
Still have to ask one more time about this possibility, or something else that would help for mobile viewing of smartgrid. Just opened the application on iPad and all is perfect, actually IMPRESSIVE. But on the android phone, I couldn't scroll horizontally to reach buttons and that is a problem.

[web2py] maybe minor bug or just documentation

2012-02-08 Thread Lewis
I set a field in a table definition to "unique = True". I then tested this and deliberately entered a duplicate value. The result was an error ticket: 76.22.75.122.2012-02-08.23-48-55.c324e160-1b8e-4db0-9345-5422e59467c2 duplicate key value violates unique constraint "category_name_key" DETAIL

[web2py] xml-rpc code causes compile error in mywiki default.py

2012-02-08 Thread bill.tha...@live.com
Hello, While working through the book I got to the part in chapter 3 mywiki where you replace "def call()..." function with [code] service = Service() @service.xmlrpc def find_by(keyword): "finds pages that contain keyword for XML-RPC" return db(db.page.title.contains(keyword).selec

[web2py] Re: Advice please: best way to count records?

2012-02-08 Thread Cliff
Thanks Richard. Not heavy use sites as they are business to business or management tool sites. On Feb 8, 5:31 pm, Richard Vézina wrote: > If your query don't involve joins, why not making to request to database? > > If you don't have a heavy load site I don't think you will have speed issue > by

[web2py] Re: web2py long term projects: experiences ?

2012-02-08 Thread Cliff
Thanks Martin. Though I don't speak Spanish (I have a little Italian), I got enough from your presentation to understand the concepts behind no-models Web2py. Very clear presentation and code. On Feb 7, 6:35 am, Martín Mulone wrote: > I can tell my experience, I'm working for 2 years with web2p

Re: [web2py] Advice please: best way to count records?

2012-02-08 Thread Richard Vézina
If your query don't involve joins, why not making to request to database? If you don't have a heavy load site I don't think you will have speed issue by doing it that way... web2py make a lot of request to database if you use represent (one request per row) since the lambda is attached to a recor

[web2py] Re: Database error from constraint violation seemingly ignored

2012-02-08 Thread Cliff
+1 > but if the Ajax request > fails (which I assume happened in your case), I don't think any feedback is > displayed to the page. Perhaps we should correct that -- first check the > response of the Ajax request, and only remove the row from the grid if it > was successful, otherwise flash an err

[web2py] Advice please: best way to count records?

2012-02-08 Thread Cliff
I'm building my own record counter and paginator for index functions, like this: 'records 1 - 20 of 315 found by query' The question is what is the best way to get the total record count, in this case 315. In the case above, I use a limitby(0, 20) to get the first 20 records. I can think of two

[web2py] Re: Update legacy table using primarykey failed

2012-02-08 Thread Omi Chiba
I mean on version 1.99.2, I got error when I access the function(page). On version 1.99.4, I can access the function(page) but got the error when I submit. On Feb 8, 3:50 pm, Omi Chiba wrote: > Good point. > I was using ver 1.99.2. I tried with the 1.99.4 and now It shows a > different error for

[web2py] Re: Update legacy table using primarykey failed

2012-02-08 Thread Omi Chiba
Good point. I was using ver 1.99.2. I tried with the 1.99.4 and now It shows a different error for the same contoller. Hm... strange. Contoller (update:NG) -- def test(): return dict(form=crud.update(db.IQWAGFTY, db.IQWAGFTY(db.IQWAGFTY.TYPRCD=='000115126002200')))

Re: [web2py] Re: keep shared objects permanently in RAM: Is it possible ?

2012-02-08 Thread Ross Peoples
That is a VERY good question. If you already have a setup like this, give it a shot and see if it worksI would be interested to know the result.

[web2py] Re: Database error from constraint violation seemingly ignored

2012-02-08 Thread Mark Kirkwood
You are correct, I was clicking the delete button on the grid. Yes, I think checking the success or otherwise of the Ajax request sounds like the right thing to do - since calls to the db can fail for all sorts of reasons, not just constraints. Regards Mark Anthony wrote: In your case, wer

[web2py] Re: is_https

2012-02-08 Thread Joerg Poeltl
thank you for the fast reply. I'm using scgi, so my setup looks like this: location / { include /etc/nginx/scgi_params; scgi_pass 127.0.0.1:4000; } to solve the problem I created a file "scgi_ssl_params" with following content: scgi_param SSL_PROTOC

Re: [web2py] login next doesn't work Version 1.99.4 (2011-12-14 14:46:14) stable

2012-02-08 Thread Massimiliano
I've found that the problem could be in auth.navbar that doesn't take care of auth.settings.login_next and logout_next. I filed a bug and provided a patch. http://code.google.com/p/web2py/issues/detail?id=652 give it a try On Wed, Feb 8, 2012 at 10:08 PM, Ricardo Pedroso wrote: > Hi, > > Try t

Re: [web2py] login next doesn't work Version 1.99.4 (2011-12-14 14:46:14) stable

2012-02-08 Thread Ricardo Pedroso
Hi, Try this: 1. Logout from you app. 2. delete all your sessions files in sessions folder. (if your are in a development environment) 3. Login again and see how the redirect behave. Ricardo On Wed, Feb 8, 2012 at 8:57 PM, Tito Garrido wrote: > I don't know how I can debug it :-/ > > On Wed,

Re: [web2py] login next doesn't work Version 1.99.4 (2011-12-14 14:46:14) stable

2012-02-08 Thread Tito Garrido
I don't know how I can debug it :-/ On Wed, Feb 8, 2012 at 12:45 PM, Massimiliano wrote: > Same problem here > > On Fri, Feb 3, 2012 at 5:12 PM, Tito Garrido wrote: > >> Hi Folks, >> >> I'm using login with ldap and login_next doesn't work... >> >> from gluon.contrib.login_methods.ldap_auth impo

[web2py] Re: Update legacy table using primarykey failed

2012-02-08 Thread Niphlod
I tried with both sqlite and postgresql and it works as expected. Are you sure you are using the last version of web2py ? exceptions and line number don't match with 1.99.4 (that is the version I tested for your sample code, the only different thing is that I don't have a DB2 instance available,

Re: [web2py] Re: [web2py-users-brazil:2924] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-08 Thread Bruce Wade
FreeBSD is the base. And that is the beauty and problem for some with BSD. All the developers of FreeBSD don't benefit from apple using their code. But at the same time they are the kind of coders that just are happy someone is using their code :) On Wed, Feb 8, 2012 at 11:54 AM, Cliff wrote: >

Re: [web2py] Re: Update legacy table using primarykey failed

2012-02-08 Thread Richard Vézina
Maybe the : migrate=False I don't see it in your model so maybe web2py try to modify you database?? I have never use keyed table since web2py is not designed for and strongly suggest to migrate data into a surrogate refactored database model... Richard On Wed, Feb 8, 2012 at 3:07 PM, Omi Chib

[web2py] Re: Update legacy table using primarykey failed

2012-02-08 Thread Omi Chiba
>Do you have a compatible DMS? Yes, I'm using DB2. On Feb 8, 2:01 pm, Richard Vézina wrote: > ote that currently this is only available for DB2, MS-SQL, Ingres and > Informix, but others can be easily added. > > At the time of writing, we cannot guarantee that the primarykey attribute > works w

[web2py] Re: Update legacy table using primarykey failed

2012-02-08 Thread Omi Chiba
Oh.. mabybe this ?? http://www.web2py.com/books/default/chapter/29/6?search=primarykey#Legacy-databases-and-keyed-tables "The update_record function is not available for Rows of keyed tables." Then what option do I have to update the table ? On Feb 8, 1:45 pm, Omi Chiba wrote: > I have legacy

Re: [web2py] Update legacy table using primarykey failed

2012-02-08 Thread Richard Vézina
ote that currently this is only available for DB2, MS-SQL, Ingres and Informix, but others can be easily added. At the time of writing, we cannot guarantee that the primarykey attribute works with every existing legacy table and every supported database backend. For simplicity, we recommend, if po

[web2py] Re: [web2py-users-brazil:2924] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-08 Thread Cliff
> Well, they are required to include the copyright notice and BSD license > with the code, so they can't really pass it off as their own, and they > aren't likely to be able to sell it given that it can be downloaded freely > elsewhere (unless, of course, they make value-added contributions, which

[web2py] Update legacy table using primarykey failed

2012-02-08 Thread Omi Chiba
I have legacy table called IQWAGFTY which doesn't have id field so I specify primarkey for the existing field. I received KeyError: 'TYPRCD' for crud.updae but not crud.create. What am I doing wrong or is it not supported to update with primarykey ? Model - db.define_table('IQWAGFTY',

[web2py] pycon 2012

2012-02-08 Thread Massimo Di Pierro
So... who's coming to pycon 2012 in Santa Clara? How about some open space meeting and dinner together? RSVP here http://mdp.cti.depaul.edu/rsvp/default/respond_event/a481f9c5-7aa9-404d-86cb-501ea29e043a Massimo

[web2py] Re: Just lost all my data

2012-02-08 Thread Massimo Di Pierro
The only problem I even had about migrations which has causes (what appeared to be) data loss is that if you run out of disk space the .table files may get corrupted. There is no actual loss of data but when this happens, one needs to recover some disk space and run web2py in fake_migrate mode to r

[web2py] Re: problems running web2py with apache on windows (client denied by server configuration)

2012-02-08 Thread giovanni allegri
SOLVED, setting the WSGIPythonHome directive to my python install, otherwise mod_wsgi looks in the wrong prefix (probably the one set when compiled?) giovanni On 8 Feb, 16:07, giovanni allegri wrote: > I've found the problem. I had added an erroneus wsgihandler.py to the > Directory tag. > Now m

[web2py] Re: how to deploy web2py not in the apache root (help with url rewriting)

2012-02-08 Thread giovanni allegri
For now I've solved setting the WSGIScriptAlias to /w2p and in routes.py: > routes_out = ((r'/(?P.*)', r'/w2p/\g'),) Any comments are welcome for something cleaner, but I fear that "reverse rewriting" for URL() is only possible if set inside routes.py. Am I wrong? giovanni On 8 Feb, 18:45, gio

[web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-08 Thread Anthony
> > The assumed connection between the number of users and a scale of > contributions does not sound right to me. I was just suggesting that it's an empirical question which approach will yield more (and better) contributions, and that it likely depends on the particular situation. AGPL will

[web2py] PyCon Web Development Summit 2012 Panel Discussions

2012-02-08 Thread blackthorne
Hey, this is your time to ask questions about Python on the web! Google Moderator: Submit questions to panelists at the PyCon Web Development Summit (March 8, 2012, Santa Clara CA) http://www.google.com/moderator/#16/e=1c9a94 Best regards

Re: [web2py] Setup virtual hosting with Web2py and apache2 mod wsgi on Ubuntu server 11.10

2012-02-08 Thread Bruce Wade
Also if you want to use uwsgi + nginx I supplied an updated script in a past post that works with Ubuntu 11.10 the default one that came with my version of web2py didn't work with Ubuntu 11.10 On Wed, Feb 8, 2012 at 10:06 AM, Martín Mulone wrote: > New blog entry http://bit.ly/xqB508 > Setup virt

[web2py] Re: Just lost all my data

2012-02-08 Thread Lewis
So, good news. I cannot reproduce. Yes, Massimo: I knew this change would invalidate passwords. Just 3 test accounts so that didn't matter. I backed up the data this time. (Good to learn how to backup postgresql...) Switched to incorrect auth with generic hash key. Worked. Everything there.

[web2py] Setup virtual hosting with Web2py and apache2 mod wsgi on Ubuntu server 11.10

2012-02-08 Thread Martín Mulone
New blog entry http://bit.ly/xqB508 Setup virtual hosting with Web2py and apache2 mod wsgi on Ubuntu server 11.10

[web2py] Re: 2 Questions regarding auth

2012-02-08 Thread Anthony
> > OK, thanks. Tricky. My exposure to classes didn't get as far as the > __call__ method. > Crud is also a callable class and works similarly to Auth. All of the validators are callable classes as well. When you specify the validator, you initialize it: Field('fruit', requires=IS_IN_SET(['

[web2py] how to deploy web2py not in the apache root (help with url rewriting)

2012-02-08 Thread giovanni allegri
I've seen a lot of examples to manage url rewriting and proxying with web2py, but I haven't found a solution to my problem. I don't have much experience with mod_rewrite, but I would like to use it and avoid rewriting inside web2py (through its routes facilites). My situation is a single domain, w

Re: [web2py] Re: [web2py-users-brazil:2924] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-08 Thread Anthony
On Wednesday, February 8, 2012 9:53:41 AM UTC-5, rochacbruno wrote: > > I am reading about, but I think I will go with LPGL. > Note, the oauth20_account_google.py module that is included is GPLv3, which I assum

Re: [web2py] Re: keep shared objects permanently in RAM: Is it possible ?

2012-02-08 Thread Sebastian E. Ovide
it looks good just wondering if that would work with fastcgi ? say that we have 10 fastcgi running... are they sharing the modules ? On Tue, Feb 7, 2012 at 10:53 PM, Ross Peoples wrote: > Sorry Mariano, I misspelled your name in my last post :) > > To give you a better example of what you

[web2py] Re: 2 Questions regarding auth

2012-02-08 Thread Lewis
OK, thanks. Tricky. My exposure to classes didn't get as far as the __call__ method. That explains how it works. On Feb 8, 7:17 am, Anthony wrote: > > Where would I add these? > > Add the links wherever you want them in your user interface. > > > I am really mystified how the auth() class call

Re: [web2py] Re: dataTables with serverside json

2012-02-08 Thread Richard Vézina
Yes! I think the PowerTable of Burno don't implement server side processing yet... We maybe can start form there to make a server side implementation of PowerTable... What do you think? I think, we have to split table header from data then wrote a python implementation fo the php script as shown

Re: [web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-08 Thread Bruce Wade
Yes it does make it very bad for business but good for customers/competition :D. For example the site I created made $5 million in 2 months, why in the world would I want that source code to get into the wrong hands? On Wed, Feb 8, 2012 at 8:59 AM, Wikus van de Merwe < dupakrop...@googlemail.com>

[web2py] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-08 Thread Wikus van de Merwe
I'm not sure if looking at the problem of license from the business point of view is reasonable. If Bruno's goal was to make the business people happy, he would put his software into the public domain. But I'm guessing he is more interested in getting some help from others and maybe building a

[web2py] Re: dataTables with serverside json

2012-02-08 Thread Vineet
Hi Richard ! Pl. excuse my late replying. Glad to hear that you got it working. If you are interested, I can share my code. I am not using "fnInitComplete". Mine is very simple & minimal code. --- Vineet On Feb 7, 10:19 pm, Richard Vézina wrote: > Finally got it to work... > > There was a probl

Re: [web2py] Re: Workflow engine for web2py

2012-02-08 Thread Richard Vézina
For my self I am interresting to workflow in context of LIMS and here a article about kind of workflows in LIMS : http://www.scientificcomputing.com/workflow-perspectives-in-lims.aspx Richard On Tue, Feb 7, 2012 at 11:12 PM, mart wrote: > I think features such as those you already implemented

Re: [web2py] how to display data

2012-02-08 Thread Carlos Costa
First select the data you want to display #select all records with all fields articles = db(db.articles).select() Second, pass it to the view return dict(articles=articles) Third, render it in the view inde.html {{=articles}} Note: this is the most basic data displaying with Web2py, you will ne

[web2py] Re: 2 Questions regarding auth

2012-02-08 Thread Anthony
> > Where would I add these? > Add the links wherever you want them in your user interface. > I am really mystified how the auth() class call receives the method as > its argument from these urls assuming that the user action looks like: > > def user() >return dict(form=auth()) > Auth

[web2py] Re: problems running web2py with apache on windows (client denied by server configuration)

2012-02-08 Thread giovanni allegri
I've found the problem. I had added an erroneus wsgihandler.py to the Directory tag. Now my problem is: [Wed Feb 08 16:04:26 2012] [error] File "D:/LAVORO/Software/Web/ web2py_src/web2py/wsgihandler.py", line 25, in [Wed Feb 08 16:04:26 2012] [error] import os [Wed Feb 08 16:04:26 2012] [er

Re: [web2py] Re: [web2py-users-brazil:2924] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-08 Thread Bruno Rocha
I am reading about, but I think I will go with LPGL. Thanks everyone for the hellp with this! On Wed, Feb 8, 2012 at 12:50 PM, Bruce Wade wrote: > http://www.bsdnewsletter.com/bsd/license.html > > > On Wed, Feb 8, 2012 at 6:45 AM, Bruce Wade wrote: > >> But with BSD they do not have to provide

Re: [web2py] Re: [web2py-users-brazil:2924] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-08 Thread Anthony
> > But with BSD they do not have to provide the code, and they do not have to > even say the code came from your project. > No, no matter what, they do have to say the code came from your project -- here's an excerpt: - Redistributions in binary form must reproduce the above copyright

[web2py] problems running web2py with apache on windows (client denied by server configuration)

2012-02-08 Thread giovanni allegri
I have to run web2py on a Windows dev server (before moving the app to a Linux box!) I've tried to setup the minimal apache conf: WSGIScriptAlias / path_to_web2py\wsgihandler.py AllowOverride None Order Allow,Deny Deny from all Allow from all AliasMatch ^/([^/]

Re: [web2py] Re: a beginner question about queries

2012-02-08 Thread Richard Vézina
I think you have a mistake in your requires : db.purchases.name.requires = IS_IN_DB(db,db.customers*.id*,'%(name)s') In purchases name you should have a id (an integer), so then you can use represent : db.purchases.name.represent = lambda id, row: db.auth_user(id).name if id!=None else 'N/A' # t

Re: [web2py] Re: [web2py-users-brazil:2924] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-08 Thread Bruce Wade
http://www.bsdnewsletter.com/bsd/license.html On Wed, Feb 8, 2012 at 6:45 AM, Bruce Wade wrote: > But with BSD they do not have to provide the code, and they do not have to > even say the code came from your project. Basically the only requirement is > if they do give the code away they need to

[web2py] Handling a POST

2012-02-08 Thread Hans Crijns
I have a device that generates regular POSTs with CSV data inside (10 values). I want to be able to receive these POSTs, check to see if they are valid CSVs (contain comma's and linebreak), store in database and send acknowledge. Anyone who can help with example controller/view? Thanks in adva

[web2py] Re: using radio widget can't receive the empty submit

2012-02-08 Thread DenesL
Note that when there are no values in the set then *no* input type=radio fields are created in the form, so there is nothing to send when you submit the form. On Feb 7, 10:38 pm, Dan wrote: > You are right, if I used an non-empty list to submit, both forms work > fine. > so the widget = SQLFORM.

Re: [web2py] login next doesn't work Version 1.99.4 (2011-12-14 14:46:14) stable

2012-02-08 Thread Massimiliano
Same problem here On Fri, Feb 3, 2012 at 5:12 PM, Tito Garrido wrote: > Hi Folks, > > I'm using login with ldap and login_next doesn't work... > > from gluon.contrib.login_methods.ldap_auth import ldap_auth > > auth.settings.login_methods=[ldap_auth(mode='company',server='mycompany',base_dn='ou=

Re: [web2py] Re: [web2py-users-brazil:2924] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-08 Thread Bruce Wade
But with BSD they do not have to provide the code, and they do not have to even say the code came from your project. Basically the only requirement is if they do give the code away they need to keep the BSD copyright which allows anyone else who downloads it to do whatever they want with the code a

Re: [web2py] Re: [web2py-users-brazil:2924] Re: [w2py-dev] Re: Movuca - Social CMS beta 0.1

2012-02-08 Thread Anthony
> > Well BSD isn't what you want for your goals. BSD allows anyone to download > and sell your code as if it was their own. > Well, they are required to include the copyright notice and BSD license with the code, so they can't really pass it off as their own, and they aren't likely to be able

[web2py] Re: Just lost all my data

2012-02-08 Thread Anthony
Can you reproduce the problem -- that is, first create the auth tables via Auth(jodb), then fill them with some test data, then change your code to Auth(jodb, hmac_key=Auth.get_or_create_key()), and observe if on the next request the Auth tables are all dropped and re-created in the database? A

[web2py] Re: Just lost all my data

2012-02-08 Thread Massimo Di Pierro
This is get_or_create function: def get_or_create_key(filename=None): request = current.request if not filename: filename = os.path.join(request.folder,'private','auth.key') if os.path.exists(filename): key = open(filename,'r').read().strip()

[web2py] Re: Just lost all my data

2012-02-08 Thread Massimo Di Pierro
Changing the hmac_key key will prevent existing users from logging in because stored keys cannot be hashed any more. I am pretty sure it does not delete any data. Something else has caused your problem (if indeed the data has disappeared). The only routines in dal.py that ever delete data require t

[web2py] Re: Database error from constraint violation seemingly ignored

2012-02-08 Thread Anthony
On Wednesday, February 8, 2012 2:16:21 AM UTC-5, Mark Kirkwood wrote: > > Sorry, I was not being all that clear. What I meant to say was: > > When I try to delete such a record, instead of the form telling me that > the delete was prevented it appears to have succeeded. However a refresh of > th

[web2py] Re: Openldap and user_groups

2012-02-08 Thread Massimiliano
This options resolve the error: *auth.settings.create_user_groups = False* On Wed, Feb 8, 2012 at 1:22 PM, Massimiliano wrote: > Hi, > > I'm trying to login to our openldap server. > > When a user login for the first time I got this error: > * > * > *AttributeError: 'NoneType' object has no at

[web2py] Re: dynamic model (with uploaded db)

2012-02-08 Thread Anthony
On Wednesday, February 8, 2012 8:55:11 AM UTC-5, giovanni allegri wrote: > > Thanks very much. > If I understand correctly auto_import will only work for DBs located > in the databases/ folder and have associated a .table file, right? > The db itself doesn't have to be in the /databases folder -

[web2py] Re: dynamic model (with uploaded db)

2012-02-08 Thread giovanni allegri
Thanks very much. If I understand correctly auto_import will only work for DBs located in the databases/ folder and have associated a .table file, right? While, if my DB is anywhere I still can use it (without auto_import) but setting to False the migration option. I will give it a try... as soon

[web2py] Re: NameError: name 'now' is not defined

2012-02-08 Thread Sciurus vulgaris
Solved, web2py automatic generates this table when using session.connect. Kind Regards, Sciurus vulgaris

[web2py] Re: NameError: name 'now' is not defined

2012-02-08 Thread Anthony
Should probably be request.now. Anthony On Wednesday, February 8, 2012 7:49:51 AM UTC-5, Sciurus vulgaris wrote: > > Hello, > > i got an exception when using the sample code for storring the sessions in > a database. I used the sample code from > http://www.web2py.com/book/default/chapter/04#se

[web2py] markmin and image width

2012-02-08 Thread Jose
Hi, How I can set the width of an image (to be processed by markmin)? Best regards, Jose

[web2py] NameError: name 'now' is not defined

2012-02-08 Thread Sciurus vulgaris
Hello, i got an exception when using the sample code for storring the sessions in a database. I used the sample code from http://www.web2py.com/book/default/chapter/04#session Model: ... db.define_table('web2py_session', Field('locked', 'boolean', default=False), Field('client_ip'),

[web2py] Re: The "Delete" doesn't work in my SQLForm.Grid

2012-02-08 Thread Niphlod
Uhm, strange. If you see the table from the admin app, after you delete the record there is still the same record on the table ? This question arises because "delete" attaches a small javascript "onclick" of the delete button that fires an ajax request to delete the record and then removes the

[web2py] Re: dynamic model (with uploaded db)

2012-02-08 Thread Niphlod
auto_import takes the database folder with all the stored files. You can then avoid to do "define_tables", because the definitions are on the files "auto_imported". This means that you create a db, define_table for every table in one app, and access the same data without re-defining all tables

[web2py] Openldap and user_groups

2012-02-08 Thread Massimiliano
Hi, I'm trying to login to our openldap server. When a user login for the first time I got this error: AttributeError: 'NoneType' object has no attribute 'user_groups' in tools.py / update_groups user_groups = self.user_groups = current.session.auth.user_groups = {} Happen that current.sessi

[web2py] Re: Transparently convert request.vars into unicode strings

2012-02-08 Thread Vladimir Rutsky
Bruno, Alan, thanks for replies! Actually I hoped that web2py have built-in methods to converting all input to Unicode strings (since this is tendency for all applications). Do web2py guaranties, that input string always converted to UTF-8 from client browser encoding? I'm not sure. But if it is

[web2py] how to display data

2012-02-08 Thread Praveen Bhat
Hello, I have 2 controllers Index and articles, how do I display data from defined in articles in Index controller? Regards, Praveen

[web2py] The "Delete" doesn't work in my SQLForm.Grid

2012-02-08 Thread Dan
Hi all, I'm using a grid to update my database, using it I can "Search", "Clear", "View" and "Edit" the table but not "Delete". Click on "Delete", the page response me nothing at all. My environment is using the "colours" layout plugin. When I'm using the following same code in the default ”Welc

[web2py] Search menu

2012-02-08 Thread shartha
Hello everyone, I'd like to have a search menu that has two submenus. Submenus will appear if the mouse is over the search menu. The first submenu is nothing but a text field and a button where the user can enter an expression and press the button to get the results of the search (this is for basi

[web2py] Re: dynamic model (with uploaded db)

2012-02-08 Thread giovanni allegri
PS: I've tried using the auto_import=True option in DAL, but if I try to access any table, eg. db(db['table'].select(), I get KeyErrors On 8 Feb, 09:28, giovanni allegri wrote: > Hi, > I'm moving my first steps ith web2py. > I'm considering it to setup a REST service where a user can upload > (zi

[web2py] dynamic model (with uploaded db)

2012-02-08 Thread giovanni allegri
Hi, I'm moving my first steps ith web2py. I'm considering it to setup a REST service where a user can upload (zipped) sqlite DBs and view/edit their content through a web interface. The db structure is fixed (it's the storage of a desktop application), so I can define a model for it, but I wonder i

[web2py] Re: Postgres: what am i doing wrong ?

2012-02-08 Thread Calycé
Anthony, You pointed me in the right direction. I thought DAL() was systematically importing the model... my wrong. Once I added auto_import=True everything worked as expected. Thanks a lot. PS: Many thanks too to the others who gave me some advice ;-) On Feb 7, 6:26 pm, Anthony wrote: > > Jus