Re: [mezzanine-users] Re: Images in .pdf Invoice

2016-06-28 Thread Eduardo Rivas
I've also used wkhtmltopdf but with the Django bindings. It's available on
Pypi as django-wkhtmltopdf (that's off the top of my head, you should
check) and provides a class based view and PDF response type.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] Re: Images in .pdf Invoice

2016-06-28 Thread Sam Kingston
I'm not sure if this will help you or not, but I developed a replacement 
library for xhtml2pdf (though not a drop-in):

https://github.com/sjkingo/pywkhtmltopdf

On Friday, 24 June 2016 20:13:05 UTC+10, Joseph Mohan wrote:
>
> Any other things i'm missing with regards to getting an image into the 
> .pdf invoices?
>
> Set the url to a full path
>
> Tried .png/.jpg 
>
> Nothing...
>
> Any ideas?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] ngnix configurations overwritten

2016-06-28 Thread Akhlaq Rao
Ok, great explanation. I have a very clear view now how things are working
on Fabric side.

I really appreciated your help.

Thanks alot!

On Tue, Jun 28, 2016 at 4:19 PM, Eduardo Rivas 
wrote:

> Sure, I hope this clears it up:
>
> The idea is that the SSL cert should only be used when the site is being
> accessed through a single domain (because the cheapest and most common
> certs are single-domain anyways). For that reason, the ssl_disabled
> environment variable depends on the length of env.domains (which is just
> settings.FABRIC["DOMAINS"]).
>
> env.ssl_disabled is not a boolean, instead if just toggles between "#" and
> the empty string. The # is what comments-out the SSL settings in the nginx
> template.
>
> In other words, if you want enable SSL make sure you have only one domain
> listed in settings.FABRIC["DOMAINS"]. You'll also have to make sure you've
> pointed your nginx conf to the location of your certificate and key.
>
> I previously suggested that you simply overwrite the whole SSL
> configuration in the nginx template because it sounded like you already had
> a working implementation in the server, so you could have used that.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Mezzanine Workflow

2016-06-28 Thread AQ
Is there any update of approval workflow ?

On Monday, August 25, 2014 at 8:04:50 PM UTC+5, Mark Phillips wrote:
>
> Thanks for your input.
>
> Mark
>
>
> On Sun, Aug 24, 2014 at 6:22 PM, Stephen McDonald  > wrote:
>
>> You might also be interested in this discussion from two years ago, where 
>> I mostly described exactly the same workflow you need, and how it could be 
>> implemented:
>>
>>
>> https://groups.google.com/forum/#!msg/mezzanine-users/4vr3IWT-8UM/ORcbKB_CNeAJ
>>
>> Nothing happened on that front though - but the intention to provide this 
>> by default is certainly there, it will probably come to fruition when 
>> someone wants it badly enough to contribute it :-)
>>
>>
>>
>>
>> On Mon, Aug 25, 2014 at 11:19 AM, Stephen McDonald > > wrote:
>>
>>> Nothing like that exists in Mezzanine by default, but have a look at the 
>>> following plugin:
>>>
>>> https://github.com/renyi/mezzanine-editor
>>>
>>> I've not used it before, so make no claims to its suitability.
>>>
>>>
>>>
>>> On Mon, Aug 25, 2014 at 11:04 AM, >> > wrote:
>>>
 I am new to Mezzanine, but have worked with the Plone (a Python based 
 cms) a lot, and have developed several django based sites. I am curious if 
 Mezzanine will work for a new project that I am moving from Plone.

 The project is a US high school online newspaper. We have one unusual 
 requirement that many cms frameworks struggle with. I need a three step 
 workflow process for all content. The typical use case:

 step 1 - a Content Creator (ie anyone with an account on the site that 
 has been approved) creates a piece of content (article, photo, etc.) and 
 submits that piece of content for review.
 step 2 - the content is reviewed by a Reviewer - usually a teacher or 
 staff member. If the article is approved by the Reviewer, it is submitted 
 to the Editors for publication, if not it is sent back to the Content 
 Creator
 step 3 - an Editor, usually a student, reviews the submitted content 
 from the Reviewer, and either publishes the content, or sends it back to 
 the Content Creator for changes. 

 Only published content is available publicly on the site. Of course, 
 all of these submissions and back and fort between the Content Creator, 
 Reviewer, and Editor is documented with comments and date stamps - ie a 
 history is kept. Also, emails and texts are sent to each person(s) in 
 theses roles when something changes, so everyone can react as soon as 
 possible

 The basic rule is that all content (and edits to that content) must 
 first be reviewed by a Reviewer (ie teacher or staff) before any student 
 sees the submitted content - a school district rule and not my version of 
 Big Brother.

 I searched the Mezzanine documentation for "workflow" and did not find 
 any references, so I am not sure what it is called in this project. Does 
 Mezzanine have the concept of workflow for content, and can it be easily 
 adjusted for this three step workfow process?

 Thanks,

 Mark

 -- 
 You received this message because you are subscribed to the Google 
 Groups "Mezzanine Users" group.
 To unsubscribe from this group and stop receiving emails from it, send 
 an email to mezzanine-use...@googlegroups.com .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>>
>>> -- 
>>> Stephen McDonald
>>> http://jupo.org 
>>>
>>
>>
>>
>> -- 
>> Stephen McDonald
>> http://jupo.org 
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to mezzanine-use...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] ngnix configurations overwritten

2016-06-28 Thread Akhlaq Rao
Yes, exactly I see it as the length of env.domains determines the value of
ssl_disable. Could you please help me to understand how to produce
ssl_disable = false by the following statement.

I am trying to set SSL so which ever way it produces true.

env.ssl_disabled = "#" if len(env.domains) > 1 else ""


*Thanks,*


On Tue, Jun 28, 2016 at 3:51 PM, Eduardo Rivas 
wrote:

> Check the fabfile. All environment variables are defined there. Some are
> taken directly from the FABRIC dictionary in settings, others are defined
> conditionally.
>
> The SSL variable depends on the amount of domains you have configured.
> However, most of the times I just remove it completely from the nginx
> template and just define my own SSL configuration.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] ngnix configurations overwritten

2016-06-28 Thread Eduardo Rivas
It should be inside the deploy/ folder in your project root.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] ngnix configurations overwritten

2016-06-28 Thread Akhlaq Rao
Hi Rivas,

I am directly modifying the file on server, I have no clue how do I use the
template because I can't find it in my project. Any idea where do I find
the template for nginx?

Thanks.

On Tue, Jun 28, 2016 at 3:24 PM, Eduardo Rivas 
wrote:

> Are you applying your changes to the nginx template in your repo? The idea
> with Fabric is that you edit all configuration files in the included
> templates instead of doing it directly on the server.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] ngnix configurations overwritten

2016-06-28 Thread Eduardo Rivas
Are you applying your changes to the nginx template in your repo? The idea
with Fabric is that you edit all configuration files in the included
templates instead of doing it directly on the server.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[mezzanine-users] ngnix configurations overwritten

2016-06-28 Thread Akhlaq Rao
Everytime I deploy my project to DigitalOcean through Fabric, it over 
writes my (app).conf settings. I enabled SSL through settings then after 
deployment I see the SSL is all commented out.  What could be wrong?

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Images in .pdf Invoice

2016-06-28 Thread Ken Bolton
Outside the scope of Mezzanine/Cartridge, I am getting amazing results
using athenapdf  to convert HTML to
PDF. I manage a sprawling Python application that had a homebrew and
long-in-the-tooth webkit integration in c++ and Python to generate PDF. I
replaced it with http calls to the athenapdf microservice. The performance
and quality have been astounding.

-ken

On Tue, Jun 28, 2016 at 8:24 AM, Joseph Mohan  wrote:

> Thanks for your help.
>
> I've spent the last 2 days pulling xhtml2pdf apart and still cannot get
> this to work. It seems to just not recognize any src attribute on an img
> tag, even tried brute forcing it but
>
> xhtml2pdf also seems to now be abandoned
>  and their python3 support is
> shaky.. hense why i'm struggling so much.
>
> Had a quick look at weazyprint  but having
> trouble installing it on my dev machine let alone my production shared
> servers
>
> Anyone had any luck using an alternative to xhtml2pdf?
>
>
> On Friday, 24 June 2016 16:03:41 UTC+1, Eduardo Rivas wrote:
>>
>> Well, Cartridge uses Pisa
>> 
>> to create the PDFs. Apparently you can pass a "link_callback" arg to
>> CreatePDF(). This callback should handle the conversion of the relative
>> path of the image in the HTML to the complete filesystem path to be
>> embedded in the document.
>>
>> The xhtml2pdf docs provide a full example
>> .
>> You'll need to override the invoice view to pass the callback to
>> CreatePDF().
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mezzanine-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [mezzanine-users] Images in .pdf Invoice

2016-06-28 Thread Joseph Mohan
Thanks for your help. 

I've spent the last 2 days pulling xhtml2pdf apart and still cannot get 
this to work. It seems to just not recognize any src attribute on an img 
tag, even tried brute forcing it but 

xhtml2pdf also seems to now be abandoned 
 and their python3 support is 
shaky.. hense why i'm struggling so much.

Had a quick look at weazyprint  but having trouble 
installing it on my dev machine let alone my production shared servers  

Anyone had any luck using an alternative to xhtml2pdf? 

On Friday, 24 June 2016 16:03:41 UTC+1, Eduardo Rivas wrote:
>
> Well, Cartridge uses Pisa 
> 
>  
> to create the PDFs. Apparently you can pass a "link_callback" arg to 
> CreatePDF(). This callback should handle the conversion of the relative 
> path of the image in the HTML to the complete filesystem path to be 
> embedded in the document.
>
> The xhtml2pdf docs provide a full example 
> .
>  
> You'll need to override the invoice view to pass the callback to 
> CreatePDF().
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.