<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>TShopping - Flask</title>
    <link>https://www.tshopping.com.tw/forum-342-1.html</link>
    <description>Latest 20 threads of Flask</description>
    <copyright>Copyright(C) TShopping</copyright>
    <generator>Discuz! Board by Comsenz Inc.</generator>
    <lastBuildDate>Tue, 28 Apr 2026 13:26:27 +0000</lastBuildDate>
    <ttl>60</ttl>
    <image>
      <url>https://www.tshopping.com.tw/static/image/common/logo_88_31.gif</url>
      <title>TShopping</title>
      <link>https://www.tshopping.com.tw/</link>
    </image>
    <item>
      <title>Python Flask 取得 ip 的方法</title>
      <link>https://www.tshopping.com.tw/thread-265129-1-1.html</link>
      <description><![CDATA[取得對外 ip

如果是要取得對外 ip 的話，可以用下列方式，簡單說就是用第三方網站所提供的功能，這些網站通常都可以讓你查詢你目前對外網的 ip 是多少，




完成]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Mon, 22 Dec 2025 14:28:57 +0000</pubDate>
    </item>
    <item>
      <title>Flask render_template 崁入Ckeditor 4.5.3 編輯器 並上傳圖片</title>
      <link>https://www.tshopping.com.tw/thread-265111-1-1.html</link>
      <description><![CDATA[在網域上要用ckeditor,要上傳圖片變成了很困難的事
於是不停地嘗試，終於找到適合的語法
用了線上版的 ckeditor 4.5.3


建立ckeditor_test.py
存檔路徑 static/upload


ckeditor 4.5.3分為standard, basic, full版本


建立 ckeditor_test.html (full版本)
改這裡



 ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Fri, 21 Nov 2025 10:03:28 +0000</pubDate>
    </item>
    <item>
      <title>flask 圖片上傳說明集錯誤解答IsADirectoryError: [Errno 21] Is a directory</title>
      <link>https://www.tshopping.com.tw/thread-265107-1-1.html</link>
      <description><![CDATA[關鍵就在這一行：

[*]app.config[\'UPLOAD_FOLDER\']提供您指定的上傳目錄的路徑（例如，static/uploads）。
[*]如果是在網域上需要絕對路徑才能上傳，不然無法正常上傳
[*]
[*]filename是上傳文件的安全名稱。
[*]os.path.join()正確地將這兩部分結合起來，以建立出檔 ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Wed, 19 Nov 2025 09:00:52 +0000</pubDate>
    </item>
    <item>
      <title>flask mariadb \'OperationalError\' object has no attribute \'cursor\'</title>
      <link>https://www.tshopping.com.tw/thread-265105-1-1.html</link>
      <description><![CDATA[今天flask 換空間帳號時出現錯誤
錯誤訊息如下：



搞了半天發現是database的使用者帳密輸入錯誤了]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Tue, 18 Nov 2025 15:25:59 +0000</pubDate>
    </item>
    <item>
      <title>python 用 threading array loop 執行緒 跑 陣列迴圈</title>
      <link>https://www.tshopping.com.tw/thread-265096-1-1.html</link>
      <description><![CDATA[要使用 Python 的threadingThread 模組並發處理數組（或列表）中的元素，可以建立和管理多個線程，每個線程負責處理數組的一部分或特定元素。 這種方法對於 I/O 密集型任務尤其有利，因為執行緒會花費大量時間等待外部資源（例如網路請求或檔案操作），而其他執行緒可以 ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Thu, 06 Nov 2025 06:02:15 +0000</pubDate>
    </item>
    <item>
      <title>flask render_template javascript to json</title>
      <link>https://www.tshopping.com.tw/thread-265089-1-1.html</link>
      <description><![CDATA[在使用FLASK時，要從表單即時檢查帳號或EMAIL是否有人已經註冊

這時須利用javascript把變數從資料庫檢查提取是否有人已使用
並用json傳回模板


範例


.py檔內


完成圖


文章來源：NetYea 網頁設計
 ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Thu, 23 Oct 2025 15:22:13 +0000</pubDate>
    </item>
    <item>
      <title>Flask website sql injection 工具測試</title>
      <link>https://www.tshopping.com.tw/thread-265087-1-1.html</link>
      <description><![CDATA[SQL注入是由於SQL語法撰寫不夠嚴謹，導致惡意的使用者能夠傳送SQL語句，獲得他們想要的資訊。SQLmap協助滲透測試者快速找到注入點，省去一個一個找注入點的時間。


可用一些工具測試，如Havij
屬於SQL探測工具
也可以算是一點點簡單的駭客軟體
會被大多數的防毒軟體誤 ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Thu, 23 Oct 2025 09:20:37 +0000</pubDate>
    </item>
    <item>
      <title>Flask 防止 sql injection 注入的幾種方法</title>
      <link>https://www.tshopping.com.tw/thread-265086-1-1.html</link>
      <description><![CDATA[以下是如何在 Flask 應用程式中使用我提到的一些安全措施的範例：

使用 HTTPS：要在 Flask 應用程式中使用 HTTPS，可以使用 NGINX 或 Apache 等反向代理伺服器來處理 SSL/TLS 加密。以下是 NGINX 的範例配置：


2. 驗證輸入：若要在 Flask 應用程式中驗證輸入，您可 ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Wed, 22 Oct 2025 15:07:02 +0000</pubDate>
    </item>
    <item>
      <title>immutablemultidict to string</title>
      <link>https://www.tshopping.com.tw/thread-265083-1-1.html</link>
      <description><![CDATA[在 Python 中將 request.form 及 request.args轉換ImmutableMultiDict為字串表示形式，在 Flask 中實例，可以根據所需的字串格式採取幾種方法。

標準字典轉換為字串：
有ImmutableMultiDict一個to_dict()方法可以將其轉換為常規的 Python dict。然後，接著使用 str()或 ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Thu, 16 Oct 2025 14:14:32 +0000</pubDate>
    </item>
    <item>
      <title>ecpay 綠界如何編碼 CheckMacValue</title>
      <link>https://www.tshopping.com.tw/thread-265081-1-1.html</link>
      <description><![CDATA[綠界SERVER回傳得知


得知要編出CheckMacValue與ECPAY給的CheckMacValue比對如下



已測試成功.........

文章來源：NetYea 網頁設計]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Wed, 15 Oct 2025 15:19:51 +0000</pubDate>
    </item>
    <item>
      <title>Flask 如何使用 綠界ecpay範例代碼?</title>
      <link>https://www.tshopping.com.tw/thread-265073-1-1.html</link>
      <description><![CDATA[開發金流時一定會遇到一些鳥問題
主要是伺服器是對方的
以下就是我遇到的問題，如圖


1. 到github 下載綠界的範例代碼

2. 把代碼放入CPanel Flask 下的目錄

範例 mvc-new/base 目錄下
打開 sample_create_order_ALL.py檔案
修改一下如下



這時提交網頁會跑到/creat ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Thu, 02 Oct 2025 04:30:22 +0000</pubDate>
    </item>
    <item>
      <title>print輸出int，錯誤 ValueError: Exceeds the limit (4300) for integer string conve</title>
      <link>https://www.tshopping.com.tw/thread-265066-1-1.html</link>
      <description><![CDATA[print輸出int，錯誤 ValueError: Exceeds the limit (4300) for integer string conversion；use sys.set_int_max

在某次輸出number時，遇到這個問題

ValueError: Exceeds the limit (4300) for integer string conversion; use sys.set_int_max_str_digits() to incr ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Tue, 16 Sep 2025 06:27:49 +0000</pubDate>
    </item>
    <item>
      <title>Flask 中的 CSRF 保護</title>
      <link>https://www.tshopping.com.tw/thread-265061-1-1.html</link>
      <description><![CDATA[跨站請求偽造 (CSRF)是一種安全漏洞，攻擊者會誘騙使用者在不知情的情況下向已驗證身分的 Web 應用程式提交請求。這可能導致攻擊者以使用者的名義執行未經授權的操作，例如更改帳戶設定或進行交易。

如何防止 CSRF 攻擊？
預防 CSRF 攻擊最有效的方法之一是使用 CSRF  ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Wed, 10 Sep 2025 08:18:06 +0000</pubDate>
    </item>
    <item>
      <title>(已解決)Cpanel Python Flask\'s session 無法正常運作</title>
      <link>https://www.tshopping.com.tw/thread-265057-1-1.html</link>
      <description><![CDATA[部屬一個APP到CPANEL帳戶上
我發現一個問題在我的SERVER
我使用了.venv
這時我用session登入帳戶
卻跳出錯誤訊息




畫面秀出





我看了 
發現是session沒有正常運作

解決方法(使用MVC架構)
/var/log/apache2/error_log錯誤訊息
是因為沒有在config寫入secret key
 ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Thu, 04 Sep 2025 04:35:15 +0000</pubDate>
    </item>
    <item>
      <title>Flask render_template post get button value</title>
      <link>https://www.tshopping.com.tw/thread-265051-1-1.html</link>
      <description><![CDATA[html



python]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Tue, 26 Aug 2025 15:35:50 +0000</pubDate>
    </item>
    <item>
      <title>Flask CPanel 實作 mail 郵件發送 (html碼)</title>
      <link>https://www.tshopping.com.tw/thread-265043-1-1.html</link>
      <description><![CDATA[說明
flask-mail本身是將smtplib包裝起來的一個套件
mail.py看的出來，搭配Flask應用對於我們派送註冊驗證信或警示訊息傳遞都非常實用。


安裝

範例
import的模式跟其它擴展一樣都有兩種方式，實作的時候放入app，或是利用init_app，視你的使用情境來選用，如下兩個範 ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Thu, 14 Aug 2025 09:02:48 +0000</pubDate>
    </item>
    <item>
      <title>Flask render_template 如何set cookie &amp; get cookie &amp; echo 警告視窗</title>
      <link>https://www.tshopping.com.tw/thread-265039-1-1.html</link>
      <description><![CDATA[在使用了簡易教學後，使用都沒問題

但是使用模板後就出現一堆錯誤訊息
set_cookie
get_cookie


當我使用模板時



rend_template居然是用在最前面，這時就跳出一堆錯誤
這時你這show.html傳了多少變數，就都要匯入，不然就出現錯誤


如果要echo 訊息


show.html 加 ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Fri, 08 Aug 2025 14:40:27 +0000</pubDate>
    </item>
    <item>
      <title>Flask 模板 如何抓到html form Radio的值，並發出警告視窗</title>
      <link>https://www.tshopping.com.tw/thread-265035-1-1.html</link>
      <description><![CDATA[如果要在html form裡抓到Radio的值

html

python檔，這拾取地的值是ImmutableMultiDict([])，所以用\'insert\' in req來檢查\'insert\' KEY在不在，req[\'choose\']來抓取選取值


若要使用 JavaScript檢索id選取單選按鈕的屬性值，可以採用下列方法：
選擇已勾選的單選按鈕 ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Mon, 04 Aug 2025 06:51:51 +0000</pubDate>
    </item>
    <item>
      <title>Flask render_template如何做二級導航</title>
      <link>https://www.tshopping.com.tw/thread-265034-1-1.html</link>
      <description><![CDATA[展示圖：




app.py


index.html


完成]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Sat, 02 Aug 2025 14:39:26 +0000</pubDate>
    </item>
    <item>
      <title>Flask render_template 如何崁入Ckeditor 編輯器</title>
      <link>https://www.tshopping.com.tw/thread-265031-1-1.html</link>
      <description><![CDATA[1. 安裝


先安裝flask_ckeditor套件。在主程式中需要先建立Flask實體，再使用Ckeditor應用在Flask實體中。如果你也需要使用code block，只要在configure中設定CKEDITOR_ENABLE_CODESNIPPET = True，就可以在Ckeditor的網頁編輯器中找到code editor的icon。
2.初始化 xx ...]]></description>
      <category>Flask</category>
      <author>woff</author>
      <pubDate>Thu, 31 Jul 2025 10:28:21 +0000</pubDate>
    </item>
  </channel>
</rss>