Compare commits
5 Commits
f9fc02564e
...
db036aff77
| Author | SHA1 | Date | |
|---|---|---|---|
| db036aff77 | |||
| 25db50e6bc | |||
| 68c85c3efe | |||
| 8f3b7488eb | |||
| 46c069f54f |
@ -1,3 +1 @@
|
||||
title = "CostaPy"
|
||||
|
||||
copyright = "Copyright (C) 2022 Dita Aji Pratama"
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
import mysql.connector as mariadb
|
||||
|
||||
from config import database, globalvar, navigation
|
||||
from mako.template import Template
|
||||
from config import globalvar, navigation
|
||||
|
||||
class main:
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
self.db_main = mariadb.connect(**database.db_main)
|
||||
self.cursor = self.db_main.cursor(dictionary=True)
|
||||
|
||||
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",
|
||||
@ -16,7 +21,7 @@ class main:
|
||||
active_page = "Home"
|
||||
),
|
||||
footer = Template(params["mako"]["website"]['footer']).render(
|
||||
copyright = globalvar.copyright,
|
||||
copyright = metaprofile["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."
|
||||
|
||||
13
scripts/loggorilla.py
Normal file
13
scripts/loggorilla.py
Normal file
@ -0,0 +1,13 @@
|
||||
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,3 +53,8 @@ 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');
|
||||
|
||||
|
||||
BIN
static/img/favicon.png
Normal file
BIN
static/img/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 127 KiB |
Loading…
Reference in New Issue
Block a user