Commit 08dafe75 authored by shadMod's avatar shadMod 💬

added news.generate_navbar to generate nav for news

reformat imports
parent a5f976f0
...@@ -16,10 +16,7 @@ ...@@ -16,10 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>. # along with this program. If not, see <http://www.gnu.org/licenses/>.
import os import os
import sys
import flask import flask
import shutil
from . import actions from . import actions
from . import auth from . import auth
...@@ -29,10 +26,10 @@ from . import navbar ...@@ -29,10 +26,10 @@ from . import navbar
from . import pages from . import pages
from . import redirects from . import redirects
from . import utils from . import utils
from .constants import BASE_DIR
from .constants import BASE_DIR
from .src.download.views import Downloads from .src.download.views import Downloads
from .src.news.views import News from .src.news import News, GetNews
def create_app(data_path, debug=False): def create_app(data_path, debug=False):
...@@ -74,6 +71,7 @@ def create_app(data_path, debug=False): ...@@ -74,6 +71,7 @@ def create_app(data_path, debug=False):
nav = navbar.Navbar() nav = navbar.Navbar()
nav.add_generator("download-distros", app.download.generate_navbar) nav.add_generator("download-distros", app.download.generate_navbar)
nav.add_generator("news-categories", app.news.generate_navbar)
nav.install(app) nav.install(app)
@app.errorhandler(403) @app.errorhandler(403)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment