2 |
3 |
4 |
5 |
6 |
7 |
8 |
All of your newsletter posts can be found here.
130 | {% autoescape false %} {{ posts }} {% endautoescape %} 131 |{{ excerpt }}
78 | {{ newsletter_title }}79 | 80 | |
81 |
82 |
88 | {{ post_title }}89 |{{ post_date }} 90 |
91 | {% autoescape false %}
92 | {{ post_content }}
93 | {% endautoescape %}
94 |
95 | |
96 |
97 |
103 | | 106 | 107 | 104 | 105 |
467 |
|
521 |
75 | Confirm that you want to Unsubscribe76 | 77 | |
78 |
79 |
85 |
86 | Please verify that you want to unsubscribe from {{ newsletter_title }}. If you don't verify this, we won't remove your email from our list. |
95 |
96 |
102 | | 105 | 106 | 103 | 104 |
75 | Verify your Email76 | 77 | |
78 |
79 |
85 |
86 | Please verify your Email to subscribe to {{ newsletter_title }}. If you don't verify your Email, you won't be subscribed. |
95 |
96 |
102 | | 105 | 106 | 103 | 104 |
30 | {{ error_description }} - (the server literally threw an error)
31 |
32 |
33 |
34 |
47 | {{ description }}
48 |
49 |
50 |
51 |
Before you can start using your own installation of microletter, you need to complete the initial setup.
30 |Here are your current newsletter subscribers.
130 |{{ total_subscribers }}
{{ monthly_subscribers }}
Subscribed on | 155 |156 | |
---|
48 | {{ description }}
49 |
50 |
51 |
52 |
You have no posts
""" 17 | else: 18 | entries.sort(key = lambda x:x["date"]) 19 | entries = entries[::-1] 20 | posts_html = """""" 21 | with open("templates/elements/post_card.html", "r") as f: 22 | posts_html_template = jinja2.Template(f.read()) 23 | for entry in entries: 24 | data = { 25 | "title": entry["title"], 26 | "date": entry["date"], 27 | "excerpt": entry["excerpt"], 28 | "delete_link": "/dashboard/home/delete/{0}".format(entry["key"]) 29 | } 30 | posts_html = posts_html + posts_html_template.render(data) 31 | return posts_html 32 | 33 | def subscribertable(): 34 | entries = subscribers.fetch({"verified": True}).items 35 | month = str(datetime.now().strftime("%B %Y")) 36 | total_subscribers = len(entries) 37 | monthly_subscribers = 0 38 | table_html = """""" 39 | 40 | if len(entries) != 0: 41 | entries.sort(key = lambda x:x["subscribed_on"]) 42 | entries = entries[::-1] 43 | 44 | for entry in entries: 45 | if month in entry["subscribed_on"]: 46 | monthly_subscribers += 1 47 | delete_link = "/dashboard/subscribers/delete/{0}".format(entry["key"]) 48 | table_html = table_html + """ 49 |