Re: [web2py] Re: Tags output by Python in views problem

2013-06-15 Thread Alexei Vinidiktov
I've figured it out. It's working consistently on all my setups, it was a misunderstanding on my part. Some html was only output if the code was run on the remote server, so I didn't see the escaping on the local server. On Sun, Jun 16, 2013 at 10:02 AM, Anthony wrote: > You're sure it's the e

Re: [web2py] Re: Tags output by Python in views problem

2013-06-15 Thread Anthony
You're sure it's the exact same code? On Saturday, June 15, 2013 10:06:30 PM UTC-4, Alexei Vinidiktov wrote: > > Thank you, Anthony. It solves the problem. > > But I don't understand why I'm not seeing the escaping in my other setups. > > On 16.06.2013, at 8:56, Anthony > wrote: > > You should s

Re: [web2py] Re: Tags output by Python in views problem

2013-06-15 Thread Alexei Vinidiktov
Thank you, Anthony. It solves the problem. But I don't understand why I'm not seeing the escaping in my other setups. On 16.06.2013, at 8:56, Anthony wrote: > You should see the escaping in any environment. To avoid it: > > {{=XML("Some text here")}} > > Anthony > > On Saturday, June 15, 2

[web2py] Re: Tags output by Python in views problem

2013-06-15 Thread Anthony
You should see the escaping in any environment. To avoid it: {{=XML("Some text here")}} Anthony On Saturday, June 15, 2013 9:20:26 PM UTC-4, Alexei Vinidiktov wrote: > > Hello, > > I'm having a weird encoding problem in views. > > If I display html code like this in a view: > > {{= "Some text he

[web2py] Tags output by Python in views problem

2013-06-15 Thread Alexei Vinidiktov
Hello, I'm having a weird encoding problem in views. If I display html code like this in a view: {{= "Some text here" }} it comes out like this on the resulting page: Some text here instead of Some text here The problem setup is Ubuntu 13.04 64 bit, Python 2.7.4, web2py 2.5

[web2py] Re: example for validating input (using requires = IS_IN_DB) against form.vars before submit.

2013-06-15 Thread webpypy
I am looking for an example for validating input (using requires = > IS_IN_DB) against form.vars before submit. > You mean you want to test an html form values to match a set of db values client-side? I am trying to have a form with three fields, the first one needs to to validat

Re: [web2py] websockets

2013-06-15 Thread shartha
Hi Ricardo. I would love to have a functional example. Could you please make one? Thanks! On Friday, June 14, 2013 3:50:08 PM UTC-5, Ricardo Pedroso wrote: > > > > > On Fri, Jun 14, 2013 at 2:36 AM, shartha > > wrote: > >> Hello. Some questions about websockets: >> 1) Can websockets be implemen

[web2py] Re: Many to many skills matrix

2013-06-15 Thread villas
As Alan says, you don't seem to have a score field. Maybe try this: db.define_table('online_team', Field('first_name', notnull=True), Field('last_name', notnull=True), Field('email', requires=IS_EMAIL(), notnull=True, unique=True), Field('initials', notnull=True, unique=True))

[web2py] Re: Simple way to start a minimal web2py view and table border problem

2013-06-15 Thread villas
>> Another problem is not working. Yes, whenever "html attributes" clash with "css", it seems the latter will win. Html attributes are definitely out of fashion! -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this

Re: [web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread villas
> rephrasing. honeypot field (i.e. hidden from users, needs to be empty, usually filled by bots) is the "simplier implementation". > If users programming bots wants to tackle your site, they find the > honeypot pretty easily and then code accordingly, so back to square 1. > My experience is t

[web2py] Re: Many to many skills matrix

2013-06-15 Thread Alan Etkin
> I have a group of employees and a set of skills. One employee can have > many skills and one skill can be had by many employees. What I want to do > is to represent the skills of all employees in one table, where the score > of each employee in each skill is given on a scale from 0 to 5 lik

Re: [web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread Alan Etkin
> > almost forgot. Second step is actually to add a time verification to see > if user opened the comment form at least 5 seconds before posting. > web2py could use this default validators, as long as they can actually be implemented: db.auth_user.email.requires = IS_NOT_SPAMMER(...) db...requ

Re: [web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread Niphlod
almost forgot. Second step is actually to add a time verification to see if user opened the comment form at least 5 seconds before posting. On Saturday, June 15, 2013 10:52:44 PM UTC+2, Niphlod wrote: > > rephrasing. honeypot field (i.e. hidden from users, needs to be empty, > usually filled by

Re: [web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread Niphlod
rephrasing. honeypot field (i.e. hidden from users, needs to be empty, usually filled by bots) is the "simplier implementation". If users programming bots wants to tackle your site, they find the honeypot pretty easily and then code accordingly, so back to square 1. Second one is js execution. T

[web2py] Many to many skills matrix

2013-06-15 Thread Angie Tawfik
Hi all, I have a group of employees and a set of skills. One employee can have many skills and one skill can be had by many employees. What I want to do is to represent the skills of all employees in one table, where the score of each employee in each skill is given on a scale from 0 to 5 like

[web2py] Re: Simple way to start a minimal web2py view and table border problem

2013-06-15 Thread LMisi
Thanks Anthony. I see, i have to move closer friendship with css. You are right, i made a new app and edit the layout.html file. After some attempt and experiment succeeded to produce a visible table border with a relatively clean view. Probebly i had/have a bad edited layout.html file, it made

Re: [web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread Alan Etkin
What about this. Would it be useful? Looks like the source is not mantained nowadays. http://www.voidspace.org.uk/python/akismet_python.html -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receivin

Re: [web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread villas
Why is honeypot field your first stop when I just said that it was too unreliable? (Especially as my site was not even worth spamming). JS verification can be bypassed completely by bots, so what do you have in mind? My question/answer solution is better than a simple honeypot field, so d

Re: [web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread Niphlod
honeypot is the first stop, javascript evaluation is the second another step that is almost impossible to break is to require registration for everything (on google and facebook), but that can scare off users (although probably not users of web2pyslices.com) On Saturday, June 15, 2013 9:10:

[web2py] Re: example for validating input (using requires = IS_IN_DB) against form.vars before submit.

2013-06-15 Thread Alan Etkin
> > I am looking for an example for validating input (using requires = > IS_IN_DB) against form.vars before submit. > You mean you want to test an html form values to match a set of db values client-side? -- --- You received this message because you are subscribed to the Google Groups "web

Re: [web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread villas
I started to get bot spam. So I introduced the non-displayed honeypot field that the bots would complete. This worked great at first, but the bots seemed to learn the trick and started leaving it empty. So the spam returned. After a little research, I decided that I liked those questions

[web2py] example for validating input (using requires = IS_IN_DB) against form.vars before submit.

2013-06-15 Thread webpypy
Hi, I am looking for an example for validating input (using requires = IS_IN_DB) against form.vars before submit. Your help is appreciated. Regards, Ashraf -- --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group

[web2py] Re: Referenced table values order

2013-06-15 Thread lesssugar
Missed "%": '%(name)s' It's kinda comforting that the Framefork Creator makes mistakes also ;)) Of course, thanks for help. On Saturday, June 15, 2013 6:35:12 PM UTC+2, Massimo Di Pierro wrote: > > My bad. Try this > > db.seafarer_education.country.requires=IS_IN_DB(db,'country.id > ','(name)s

Re: [web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread Niphlod
On Saturday, June 15, 2013 6:17:37 PM UTC+2, Paolo valleri wrote: > > I don't see an approach able to tackle the issue at all,we should > implement several techniques together. > Anyway, what shall we do when a bot is detected? Have we got a sort of > blacklist? If so,instead of starting with a

[web2py] Re: Referenced table values order

2013-06-15 Thread Massimo Di Pierro
My bad. Try this db.seafarer_education.country.requires=IS_IN_DB(db,'country.id ','(name)s',orderby=db.country.name) On Saturday, 15 June 2013 11:07:01 UTC-5, lesssugar wrote: > > Almost. I get the following error when I get to appadmin: > > *__init__() got an unexpected keyword argument 'format'

Re: [web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread paolo.vall...@gmail.com
I don't see an approach able to tackle the issue at all,we should implement several techniques together. Anyway, what shall we do when a bot is detected? Have we got a sort of blacklist? If so,instead of starting with an empty list, we could think to start from a public available blacklist of bot.

[web2py] Re: Referenced table values order

2013-06-15 Thread lesssugar
Almost. I get the following error when I get to appadmin: *__init__() got an unexpected keyword argument 'format'* * * My test table: db.define_table('seafarer_education', Field('user_id', db.auth_user, default=auth.user_id, readable=False, writable=False), Field('school'), Field('country', db.c

[web2py] Re: Filling form in multiple phases with some data from database and some from a dictionary

2013-06-15 Thread Ykä Marjanen
Hi J, Of course you were here too :) I solved the issue by using SQLFORM.factory to generate the form for those pages where there was a dictionary variable. I've edited the code so that I think I got it working properly. I save the form.vars of each page to session.page_nro and at the end (fou

[web2py] Re: Referenced table values order

2013-06-15 Thread Massimo Di Pierro
This should do it. db.table. country.requires=IS_IN_DB(db,'country.id',format='%(name)s',orderby=db.country.name) On Saturday, 15 June 2013 10:10:56 UTC-5, lesssugar wrote: > > I have a table 'country' storing country names. Its format is > > format=lambda r: r.name > > I'm referencing the tabl

[web2py] Referenced table values order

2013-06-15 Thread lesssugar
I have a table 'country' storing country names. Its format is format=lambda r: r.name I'm referencing the table in another one like this ... Field('country', db.country) ... When I create an update form for the second table, the Country field comes as a drop-down and it's great. However, the

[web2py] Respective update / create form in a modal box

2013-06-15 Thread lesssugar
I have a list of items. Each of them is editable, I can also add a new one. My goal is to provide update / create form in a modal box. The perfect solution would be to have the modal's template and dynamically load respective form into it. Now, to make it clear: I do not want to have lots of hi

[web2py] Re: The connection to mongodb://localhost/test could not be made

2013-06-15 Thread Alan Etkin
I have submitted a patch for the debugging problem of mongodb connections (not for your actual issue) http://code.google.com/p/web2py/issues/detail?id=1532 Anyway, with that change, you should be able to allowed the driver error traceback at the error ticket. -- --- You received this messag

[web2py] Thesaurus for Web2py?

2013-06-15 Thread Joe Magaro
Hi, Can someone recommend a thesaurus that works with Web2py? -- --- 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 more

[web2py] Re: Scheduler compatible with nginx/uwsgi?

2013-06-15 Thread Niphlod
scheduler and whatever you choose to run your "web part" are totally unrelated. It's meant to be as a separate process, and can totally run on its own. What you need to check is that the scheduler instance can connect to the database (if this was a result of permission problems on the file, the

[web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread Niphlod
I have an unrelated (on web2py's side) website that uses captchas from google and bots are successfully registering to it (of course, they need to be approved first but it's a PITA to remove them anyway). There are captcha services that decode the images for you (and your bot). I'm working on a

[web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread Alan Etkin
> > Is it possible these are not being posted by bots? It would take a very smart bot to pass captcha (no?). Maybe it is possible to change type of captcha used (i.e. random visual tests like those of arithmetics with objects, etc.)?. I'm clueless about authentication beyond the built-in web

[web2py] Re: The connection to mongodb://localhost/test could not be made

2013-06-15 Thread Alan Etkin
> > I haven't been with the website for a while, and I do not understand this > error. > The driver could not connect to the mongodb backend. For debugging the connection error, you can try commenting the code under the except clause in dal.py near line 5234 and adding the raise command, so yo

[web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread Anthony
Is it possible these are not being posted by bots? If so, we might need another tactic, such as requiring that a new user's first post be approved by a moderator. Anthony On Saturday, June 15, 2013 5:33:12 AM UTC-4, rochacbruno wrote: > > Implemented only for user registration, but spammers are

[web2py] The connection to mongodb://localhost/test could not be made

2013-06-15 Thread Hugo Costa
Hey, So I returned to the web2py and I found this error on my website. I haven't been with the website for a while, and I do not understand this error. My db.py: ## if SSL/HTTPS is properly configured and you want all HTTP requests to ## be redirected to HTTPS, uncomment the line below: # requ

[web2py] Re: routes_app

2013-06-15 Thread Júlia Rizza
Thank you guys! Em quinta-feira, 13 de junho de 2013 10h20min22s UTC-3, Loïc escreveu: > > In your web2py root folder, you have a base routes.py > for example in the base routes.py you define your two applications app1 > and app2 : > > # -*- coding: utf-8 -*- > #app1 > routes_app = ( > (r'.

[web2py] Re: [web2py-dev] Re: Spammers on web2pyslices.com

2013-06-15 Thread Bruno Rocha
Implemented only for user registration, but spammers are registering, so I guess they have captcha breaking system or there is a hole in the website security? (needs investigation) The captcha, honeypot, confirm by email or something would be really nice if implemented in "create a slice" form.

[web2py] Re: Spammers on web2pyslices.com

2013-06-15 Thread Paolo valleri
Personally I don't like captcha image, before delving into the implementation of whatever like that it is worth to try the honeypot mechanism namely a 'hidden field'. A field that if filled out allow you to distinguish between user and robots requests. The field it is hidden by css properties r