Selaa lähdekoodia

Redirect / to repo

master
The Dod 1 vuosi sitten
vanhempi
commit
8d98743858
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5
    1
      mymastotag.py

+ 5
- 1
mymastotag.py Näytä tiedosto

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…
Peruuta
Tallenna