GitHub: https://github.com/Sokhavuth/TV-Channel
Vercel: https://khmerweb-tv-channel.vercel.app/login
To be able to build a dashboard, we need to define a route to that page first. This route will be linked to the Post class in the controllers section that in turn will be linked to the views section.
# index.py
from bottle import static_file, get
from routes.frontend import index
from routes.frontend import login
from routes.backend import admin
app = index.app
app.mount("/login", login.app)
app.mount("/admin", admin.app)
@app.get('/static/<filepath:path>')
def staticFile(filepath):
return static_file(filepath, root="public")
###################################################################
import socket
host = socket.getfqdn()
addr = socket.gethostbyname(host)
if(addr == '127.0.1.1'):
app.run(host='localhost', port=8000, debug=True, reloader=True)
###################################################################
# routes/backend/admin.py
from bottle import Bottle
app = Bottle()
from . import post
app.mount("/post", post.app)
# routes/backend/post.py
from bottle import Bottle, get
from controllers.backend.post import Post
app = Bottle()
post = Post()
@app.get("/")
def getPage():
return post.getPage()
# controllers/backend/post.py
import config, copy
from bottle import template, redirect, request
class Post:
def __init__(self):
self.setup = copy.deepcopy(config.settings())
def getPage(self):
self.setup["pageTitle"] = "Post Page"
self.setup["route"] = "/admin/post"
return template("base", data=self.setup)
Top comments (11)
Yacine TV v3 is a powerful streaming app that offers live sports, movies, and TV channels with high-quality, buffer-free streaming. Its user-friendly interface and wide compatibility with Android, Firestick, and Smart TVs make it a top choice for entertainment lovers. Whether you're into sports or movies, Yacine TV v3 ensures a smooth and enjoyable viewing experience anytime, anywhere!
GoodCore's philosophy of structured development resonates deeply with me, particularly its parallel to how we organize information for human understanding. It's the difference between a dense, unindexed ledger and an intuitive visual guide. This is what makes a resource like the Michigan County Map so powerful—it transforms complex geographical data into an immediate, visual story that anyone can navigate instinctively, proving that true clarity is the ultimate user interface.
CircFy TV v5.3 is a robust streaming app that provides buffer-free, high-quality live streaming for TV networks, movies, and sports. It is a great option for those who enjoy entertainment because of its easy-to-use interface and broad compatibility with Android, Firestick, and Smart TVs. CircFy TV v3 guarantees a seamless and entertaining viewing experience whenever and wherever you choose, whether you prefer sports or movies!
Some comments may only be visible to logged-in visitors. Sign in to view all comments.