Compare commits
No commits in common. "db036aff771cc1edf37ac5501bd59ffa0095eef7" and "f9fc02564e51bae3e1a9321d91243b996f0e3bd2" have entirely different histories.
db036aff77
...
f9fc02564e
@ -1 +1,3 @@
|
||||
title = "CostaPy"
|
||||
|
||||
copyright = "Copyright (C) 2022 Dita Aji Pratama"
|
||||
|
||||
@ -1,17 +1,12 @@
|
||||
import mysql.connector as mariadb
|
||||
|
||||
from config import database, globalvar, navigation
|
||||
from mako.template import Template
|
||||
from mako.template import Template
|
||||
from config import globalvar, navigation
|
||||
|
||||
class main:
|
||||
|
||||
def __init__(self):
|
||||
self.db_main = mariadb.connect(**database.db_main)
|
||||
self.cursor = self.db_main.cursor(dictionary=True)
|
||||
pass
|
||||
|
||||
def html(self, params):
|
||||
self.cursor.execute("SELECT `favicon`, `copyright` FROM `metaprofile` WHERE id = 1 ;")
|
||||
metaprofile = self.cursor.fetchone()
|
||||
return Template(params["mako"]["website"]['index']).render(
|
||||
title = globalvar.title,
|
||||
header = "Welcome to CostaPy",
|
||||
@ -21,7 +16,7 @@ class main:
|
||||
active_page = "Home"
|
||||
),
|
||||
footer = Template(params["mako"]["website"]['footer']).render(
|
||||
copyright = metaprofile["copyright"],
|
||||
copyright = globalvar.copyright,
|
||||
),
|
||||
container = Template(params["mako"]["website"]['container']).render(
|
||||
greeting = f"Welcome to your new web application! This placeholder page is here to let you know that your web framework is successfully set up and ready to go. Now, it's time to start building your project. Dive into the documentation to explore the features and capabilities at your disposal."
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
import datetime
|
||||
|
||||
def prcss(loc, msg):
|
||||
print(f"[loggorilla][{datetime.datetime.now()}][\033[32mprcss\033[39m][\033[95m{loc}\033[39m] {msg}", flush=True)
|
||||
|
||||
def accss(loc, msg):
|
||||
print(f"[loggorilla][{datetime.datetime.now()}][\033[36maccss\033[39m][\033[95m{loc}\033[39m] {msg}", flush=True)
|
||||
|
||||
def fyinf(loc, msg):
|
||||
print(f"[loggorilla][{datetime.datetime.now()}][\033[93mfyinf\033[39m][\033[95m{loc}\033[39m] {msg}", flush=True)
|
||||
|
||||
def error(loc, msg):
|
||||
print(f"[loggorilla][{datetime.datetime.now()}][\033[31merror\033[39m][\033[95m{loc}\033[39m] {msg}", flush=True)
|
||||
@ -53,8 +53,3 @@ create table if not exists `metaprofile_brand_logo` (
|
||||
on delete cascade
|
||||
) engine=InnoDB default charset=utf8mb4;
|
||||
|
||||
-- Default Data
|
||||
|
||||
INSERT INTO metaprofile VALUES (1, 'img/favicon.png', 'Copyright (C) 2022 Dita Aji Pratama');
|
||||
INSERT INTO metaprofile_baseurl VALUES (1, 1, 'local', 'http://localhost:11000');
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 127 KiB |
Loading…
Reference in New Issue
Block a user