Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

django send email with html template

<!DOCTYPE html>
<html>
    <body>
        <br>

        <h2>Thank you for your order {{ order.full_name }}</h2>
        <h3>Your Order ID: {{ order.short_uuid }}</h3>


        <h3>Shipping Details:</h3>

        {{ order.full_name }} </br>
        {{ order.shipping_address.street }} <br/>
        {{ order.shipping_address.city }} <br/>
        {{ order.shipping_address.postcode }}

        <h3>
            Contact Details:
        </h3>
        Email: {{ order.email }} <br/>
        Phone: {{ order.phone }}

        <h2>Order Details:</h2>

        <table>

            <thead>
                <tr>
                    <th>Product</th>
                    <th>Quantity</th>
                    <th>Price</th>
                    <th>Total Price</th>
                </tr>
            </thead>

            <tbody>
                {% for item in order.order_items %}
                    <tr>
                        <td>{{ item.name }}</td>
                        <td>{{ item.quantity }}</td>
                        <td>{{ item.price }}</td>
                        <td>{{ item.total_price }}</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    </body>
</html>

it will help you
Comment

PREVIOUS NEXT
Code Example
Python :: change value in nested dictionary python 
Python :: get height of image in pygame 
Python :: learn basic facts about dataframe | dataframe info 
Python :: plt.tight_layout() cuts x axis 
Python :: cache pyspark 
Python :: how to import nltk 
Python :: %s in python 
Python :: request post python 
Python :: set default formatter for python vscode 
Python :: python multiply each item in list 
Python :: get data from model with field name in django 
Python :: python how to make integer show 2 numbers 
Python :: python single line comment 
Python :: python filter numbers from list 
Python :: combining strings in python 
Python :: get lastest files from directory python 
Python :: Python basic discord bot 
Python :: re.search() 
Python :: python svg viewing 
Python :: datetime to unix timestamp python 
Python :: check django channels with redis setup 
Python :: group by dataframe 
Python :: how to remove last 2 rows in a dataframe 
Python :: python dictionary contains key 
Python :: validationerror django params 
Python :: cv2.videocapture python set frame rate 
Python :: python flatten one liner 
Python :: python string: .lower() 
Python :: dont truncate dataframe jupyter pd display options 
Python :: developpement limité sinus python 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =