Browse Source

Redirect / to repo

master
The Dod 1 year ago
parent
commit
8d98743858
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      mymastotag.py

+ 5
- 1
mymastotag.py View File

1
 import time
1
 import time
2
 import feedparser
2
 import feedparser
3
-from flask import Flask, render_template
3
+from flask import Flask, render_template, redirect
4
 from bs4 import BeautifulSoup
4
 from bs4 import BeautifulSoup
5
 
5
 
6
 # Source: https://lingohub.com/academy/best-practices/rtl-language-list
6
 # Source: https://lingohub.com/academy/best-practices/rtl-language-list
8
 
8
 
9
 application = Flask(__name__)
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
 @application.route('/<string:lang>/<string:instance>/<string:user>/<string:tag>')
15
 @application.route('/<string:lang>/<string:instance>/<string:user>/<string:tag>')
12
 def my_masto_tag(lang, instance, user, tag):
16
 def my_masto_tag(lang, instance, user, tag):
13
     lang = lang.lower()
17
     lang = lang.lower()

Loading…
Cancel
Save