浏览代码

Redirect / to repo

master
The Dod 1年前
父节点
当前提交
8d98743858
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5
    1
      mymastotag.py

+ 5
- 1
mymastotag.py 查看文件

@@ -1,6 +1,6 @@
1 1
 import time
2 2
 import feedparser
3
-from flask import Flask, render_template
3
+from flask import Flask, render_template, redirect
4 4
 from bs4 import BeautifulSoup
5 5
 
6 6
 # Source: https://lingohub.com/academy/best-practices/rtl-language-list
@@ -8,6 +8,10 @@ RTL_LANGS = ['ar', 'arc', 'dv', 'fa', 'ha', 'he', 'khw', 'ks', 'ku', 'ps', 'ur',
8 8
 
9 9
 application = Flask(__name__)
10 10
 
11
+@application.route('/')
12
+def redirect_to_repo():
13
+    return redirect('https://nimrodkerrett.opalstacked.com/nimrodkerrett/mymastotag')
14
+
11 15
 @application.route('/<string:lang>/<string:instance>/<string:user>/<string:tag>')
12 16
 def my_masto_tag(lang, instance, user, tag):
13 17
     lang = lang.lower()

正在加载...
取消
保存