Vlada Ćalić | 30 Oct 17:28 2014
Picon

P3P headers in redirects

Hello, 

I have a very strange problem which I'm not able to solve, somebody may be able to help.

I'm building a web app which needs to run embedded in an iframe of a company web. It works in normal browsers but not in IE. Of course, it's "Privacy policy" that prevents it from working. 

I found the suitable set of switches that I'm putting in a P3P header, but the trouble is: if I'm adding them using response.headers("P3P: CP='...') it only works on normal reposnses. And I have a lot of redirects in the app, and those headers are not sent when doing redirect. And when I don't sent P3P in the header, IE drop the session cookie and app stop working correctly.

Is there any solution?

--
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 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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Ken Archer | 29 Oct 05:02 2014
Picon

image blog

Hi, 
I am a newbie to web2py. I am going through the manual; at the 'image blog'.
Having entered the code, I get the following error when I click database administration.

I would greatly appreciate if assistance can be rendered in this regard.

<type 'exceptions.AttributeError'>('DAL' object has no attribute 'image_id')

--
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 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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Dmitry Vlasov | 30 Oct 00:10 2014
Picon

Deploying web2py-based service along with no-web2py main site

Hi, web2py users,

anybody know, is there a way to deploy service, written with web2py in a such a way:

1) we have a site, xxx.com, for example. The site isn't web2py based. It is accessible from internet and shouldn't be touched.

2) the main aim is to access web2py service requesting 

subdomain.xxx.com

In other words, how can I route requests to this subdomain to web2py service?

Main site uses Apache. Should I configure Apache, or I can use Rocket for these types of tasks?

I will be very appreciated for advices.

--
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 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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Jason Solack | 29 Oct 18:13 2014

Forcing download of generated PDF

Hello everyone, i'm generating a PDF using pdfkit and i'd like my function to force the download of the pdf file i'm making.

Here's some simple code demonstrating the PDF being made in memory:

def make_pdf():
    import pdfkit
    pdf = pdfkit.from_string("test", False)
    return pdf


Ideally i would like to have an "export" button on my page and have that function called and then download the PDF i have made.

Thank you in advance!

Jason

--
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 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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Sriram Gudimella | 29 Oct 18:23 2014
Picon

if else if in views

Why does this ......
<table>
{{for i in range(0,3):}}
        <tr>
        {{if i==0:}}
                <td>
                Email :
                </td>
                <td>
                {{=form[i]}}
                </td>
                <br/>
        </tr>
        {{else if i==1:}}
        <tr>
                <td>
                Passkey :
                </td>
                <td>
                {{=form[1]}}
                </td>
        </tr>
        {{else :}}
        <tr>
                <td>
                </td>
                <td>
                {{=form[2]}}
                </td>
        </tr>
        {{pass}}
        {{pass}}
</table>
translate to
for i in range(0,3):
response.write('\n\t<tr>\n\t', escape=False)
if i==0:
response.write('\n\t\t<td>\n\t\tEmail :\n\t\t</td>\n\t\t<td>\n\t\t', escape=False)
response.write(form[i])
response.write('\n\t\t</td>\n\t\t<br/>\n\t</tr>\n\t', escape=False)
else if i==1:
response.write('\n\t<tr>\n\t\t<td>\n\t\tPasskey :\n\t\t</td>\n\t\t<td>\n\t\t', escape=False)
response.write(form[1])
response.write('\n\t\t</td>\n\t</tr>\n\t', escape=False)
else :
response.write('\n\t<tr>\n\t\t<td>\n\t\t</td>\n\t\t<td>\n\t\t', escape=False)
response.write(form[2])
response.write('\n\t\t</td>\n\t</tr>\n\t', escape=False)
pass
response.write('\n\t', escape=False)
pass

--
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 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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Josh L | 31 Oct 03:34 2014

Asynchronous Background Processes

I'm trying to solve a business problem where I need to cache many images, around 20 at a time from a third party website on my server and then serve those to a client. A key requirement is that they be made available as quickly as possible, so for this reason I started building a function in Web2Py with the python multiprocessing module. I used the Process and Lock functions from this and got it to work fine in the web2py command line environment. Essentially it downloads all 20 images simultaneously, stores them to disk, and updates my DB with their location. However, when I call the function from my controller after a web request, I get lots of errors such as this one:

<class 'gluon.contrib.pg8000.errors.InternalError'>(Unexpected response msg <gluon.contrib.pg8000.protocol.BindComplete object at 0x7fd2f4513150>)

I know spawning processes is frowned upon in Web2py, so I also tried the Scheduler. While I could get that to work, I found the delay waiting for the heartbeat to cycle around to be a hindrance - even 1 second is too long to wait to start the caching process. The only way I have been able to get it to work is to download one file after the other with urllib, but I really need to be able to grab them all simulatenously, and launch the processes that grab them instantaneously. Is there a solution to this problem using Web2py?

--
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 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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Jason Solack | 29 Oct 23:46 2014

download an in memory PDF generated by pdfkit

Hello, i have a PDF file i have generated and i'd like to have users download when clicking an 'export' button on the page.

i have tried this:

    import pdfkit
    pdf = pdfkit.from_string("test", False)
    return response.stream(pdf, attachment=True, filename="whatever.pdf")


and it doesn't work... any help on how i might do this?

side note.... when i post my questions don't show up many times, or if they do they take a long time to show up.  Any insight on that would be appreciated!

Jason

--
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 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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Raouf Mir | 31 Oct 05:07 2014

<type 'exceptions.AttributeError'> function 'GEOSversion' not found

i am gettting this error.

<type 'exceptions.AttributeError'> function 'GEOSversion' not found

--
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 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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Ben Olivas | 28 Oct 23:27 2014
Picon

Unit Testing

What do people use to perform unit testing in web2py?

--
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 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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Luis Ramos | 30 Oct 22:37 2014
Picon

How to create a dual purpose login?

Hi guys, the website I'm programming has to parts, one for the "provider" and one for the "client". Is it possible to have just one login box for both? 
The main goal is that everybody logs in in the same page, then if is a client, take it to the client dashboard, if is a provider, take it to the provider dashboard.

--
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 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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.
Trevor Strauss | 30 Oct 21:34 2014
Picon

Re: Re: Web Editor Blank Screen

Thanks to whoever denied my last question. Here it is...plus broke something today which allow me to view the file but have no idea what broke.  picture attached of style change ... someone must know?

The other missing item is the create button in the files toggle slide out....does this give anyone additional ideas?

On Tue, Sep 30, 2014 at 2:36 PM, Trevor Strauss <trevor.strauss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
The other missing item is the create button in the files toggle slide out....does this give anyone additional ideas?

On Tue, Sep 30, 2014 at 1:56 PM, Trevor Strauss <trevor.strauss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
All files have the same ownership...other thoughts?

On Fri, Sep 26, 2014 at 8:27 AM, Trevor Strauss <trevor.strauss-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
Hi, upgraded through the admin console.  will check the user/file ownership but but think I recall them being the same when I checked file permissions.  Thanks for the help

On Wed, Sep 24, 2014 at 6:16 PM, Leonel Câmara <leonelcamara-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
How did you upgrade web2py? Is the nginx's user the same as the files in the web2py folder?

--
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 because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/PV8UHqc3AW4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.




--
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 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+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
For more options, visit https://groups.google.com/d/optout.

Gmane