How to Install UI and Auth in PWeb?
This section we will learn about installation of Bootstrap Default UI & Authentication Module.
Install Dependencies
-
For UI need pweb-ssr & pweb-ui (Please active venv)
pip install -U pweb-ssr
pip install -U pweb-ui
-
For permanent Add
def get_dependencies():
dependency = ["pweb-ssr", "pweb-ui"]
-
For Authentication Module need pweb-auth. (Please active venv)
pip install -U pweb-auth
-
For permanent Add
def get_dependencies():
dependency = ["pweb-auth"]
Configure UI and Auth
-
Register module into module_registry.py
from pweb_ssr.pweb_ssr_module import PWebSSRModule
from pweb_auth import PWebAuthModule
from pweb_ui.pweb_ui_module import PWebUIModule
class Register(PWebModuleRegister):
def get_module_list(self) -> list:
return [
.....,
PWebSSRModule,
PWebUIModule,
PWebAuthModule,
]
Initialized DB
Please active virtual instance first
pweb db-cli init
Change Configuration
Go to app_config.py
class Config(PWebAppConfig):
APP_NAME = "pweb-crud-example"
PORT: int = 1212
CONNECT_MESSAGE: str = "PWeb is an Open Source Python based Web Framework for Rapid Development."
DEVELOPED_BY: str = "Bangla Fighter Engineering"
DEVELOPED_BY_LINK: str = "https://banglafighter.com"
APP_VERSION: str = "v1.0.0"
ENABLE_REGISTRATION: bool = True