#codegeneration-allcode
Code Generation Plugin Introduction
This code generation plugin is written using python jinja module, which is very simple and flexible, and can be changed according to your needs
how to use
- Install python3.9
- pip install -U Jinja2
- git clone https://github.com/265525/codegeneration-allcode.git
- Run demo.py
example
from utils. templatebase import TemplateInit
# home generation
home = TemplateInit()
home.render("index.txt",context={"title":"home test 1"})
# user module generation
user = TemplateInit()
user. setdirPath("user")
user.render("index.txt",context={"title":"One layer of yser test 2"})
# The login module under user is generated
user.setdirPath("user/login")
user.render("login.txt",context={"content":"Second-layer user test 3"})
MIT License
Copyright (c) 2023 br66