- Django 2 by Example
- Antonio Melé
- 124字
- 2021-06-25 21:19:03
Sharing posts by email
First, we will allow users to share posts by sending them emails. Take a short time to think how you would use views, URLs, and templates to create this functionality using what you have learned in the preceding chapter. Now, check what you need in order to allow your users to send posts by email. You will need to do the following things:
- Create a form for users to fill in their name and email, the email recipient, and optional comments
- Create a view in the views.py file that handles the posted data and sends the email
- Add a URL pattern for the new view in the urls.py file of the blog application
- Create a template to display the form
推薦閱讀
- 計算機網(wǎng)絡(luò)與通信(第2版)
- 物聯(lián)網(wǎng)安全(原書第2版)
- 異構(gòu)基因共表達網(wǎng)絡(luò)的分析方法
- Hands-On Chatbots and Conversational UI Development
- 智慧城市中的移動互聯(lián)網(wǎng)技術(shù)
- 互聯(lián)網(wǎng)基礎(chǔ)資源技術(shù)與應(yīng)用發(fā)展態(tài)勢(2021—2023)
- 中小型局域網(wǎng)組建、管理與維護實戰(zhàn)
- Mastering TypeScript 3
- 6G:面向2030年的移動通信
- 網(wǎng)絡(luò)安全應(yīng)急響應(yīng)技術(shù)實戰(zhàn)指南
- 局域網(wǎng)組成實踐
- Dart Cookbook
- 工業(yè)以太網(wǎng)技術(shù):AFDX/TTE網(wǎng)絡(luò)原理、接口、互連與安全
- Corona SDK Application Design
- 網(wǎng)絡(luò)互聯(lián)技術(shù)(理論篇)