Re: [web2py] keyError

2015-10-04 Thread Alex Glaros
It works Denes, thanks. Here is the version needed for my app {{cc=[]}} {{for x in location_data['postalcodes']:}} {{c=x['countryCode']}} {{if c not in cc:}} {{cc.append(c)}} {{countryName=db(db.Country.countryCode==c).select(limitby=(0,1)).first()}} {{=A

[web2py] Markmin best practices

2015-10-04 Thread St. Pirsch
I have some noob questions on how to use Markmin correctly: Is there a way to link pictures within markmin, i.e. to produce ? I noticed that anchors get the prefix "markmin-" automatically. I guess there is a concept behind this decision, but I do not see the reason & is there a way to circumve

[web2py] Static content seems to load with a 404 error... uwsgi nginx

2015-10-04 Thread Encompass solutions
I have setup uwsgi and I seem to be very close to having everything working. It just seems that my static data is not loaded now. (css, images, so forth) This is my nginx file with the web2py applicaiton in it. Any ideas into the issue? My web2py installation is located in /var/www/web2py/. # fil

[web2py] Re: Has anyone done a detailed security analysis or attempted a methodical attack on web2py?

2015-10-04 Thread Ian Ryder
Hi, just looking back over anything about penetration testing and web2py - does anyone know of any recent (or any at all) testing of web2py? We're getting close to our first customers on an app we've been developing the last year so really need to try and pick it to pieces now while we have a f

[web2py] Re: Web2py celery plugin

2015-10-04 Thread Mark Graves
Luis, I've never personally used celery to queue tasks to execute in a web2py environment. I found myself in a similar situation recently and just used a cron task running a python script in the web2py environment from the command line. Is there a particular reason this workflow would not work

[web2py] Re: Web2py celery plugin

2015-10-04 Thread Luis Valladares
Hello mark! thanks for you answer. Your approach sounds really nice, but exactly how you run a cron task inside web2py environment? you start the web2py client with the console option and there execute the task? may you give me an example of this? El domingo, 4 de octubre de 2015, 8:31:20 (UTC-

[web2py] Re: Static content seems to load with a 404 error... uwsgi nginx

2015-10-04 Thread Anthony
location ~* /(\w+)/static/ { root /home/www-data/web2py/applications/; should be: location ~* /(\w+)/static/ { root /var/www/web2py/applications/; Also, you'll need to repeat that configuration in the SSL section if you want nginx to serve static files vi

Re: [web2py] Re: Web2py celery plugin

2015-10-04 Thread Mark Graves
As documented in the web2py book, The "web2py.py" script can take many command-line arguments specifying the maximum number of threads, enabling of SSL, etc. For a complete list type: >>> python web2py.py -h For example, a shell script called async_events.sh can be called at reboot as follows:

Re: [web2py] Re: Web2py celery plugin

2015-10-04 Thread Luis Valladares
Thanks Mark! I think this will work, i will try it on the job and come here if i have any troubles. El domingo, 4 de octubre de 2015, 8:59:37 (UTC-4:30), Mark Graves escribió: > > As documented in the web2py book, > > The "web2py.py" script can take many command-line arguments specifying the > m

[web2py] Re: Static content seems to load with a 404 error... uwsgi nginx

2015-10-04 Thread Encompass solutions
Goodness me... How did I miss that! And doesn't seem to be working in my server section for ssl... here is the adapted, section: I assume the "location" should be before / is that right? Does it make a difference? server { listen 443 default_server ssl; server_name $hostname;

[web2py] Re: ST_X function on POSTGIS geography() fields

2015-10-04 Thread 'DenesL' via web2py-users
How do you propose to code those functions if they are not available in the DB engine?. MS SQL Server does have functions to extract longitude and latitude data from geography points but PostGIS does not seem to have them. I can send in a patch for MSSQL with the following extended methods: Lat

Re: [web2py] keyError

2015-10-04 Thread Alex Glaros
am having hard time finding syntax for checking for empty API data in above example tried many variations of: {{if location_data:}} any ideas? thanks, Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://c