create an equivalent of router, need to find a data type for it
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 3s
This commit is contained in:
@@ -4,6 +4,7 @@ import os
|
||||
#import jinja2
|
||||
from jinja2 import Environment, FileSystemLoader
|
||||
|
||||
router_path = os.path.join(settings.BASE_DIR,'core','routers_jinja.py')
|
||||
|
||||
class Command(BaseCommand):
|
||||
args = '<team_id>'
|
||||
@@ -12,9 +13,9 @@ class Command(BaseCommand):
|
||||
template_dir = os.path.join(settings.BASE_DIR, 'templates')
|
||||
env = Environment(loader=FileSystemLoader(template_dir))
|
||||
template = env.get_template('helloWorld.jinja')
|
||||
output = template.render()
|
||||
output = template.render(name = 'Geeks')
|
||||
|
||||
with open("outputFileName.txt", 'w') as f:
|
||||
with open(router_path, 'w') as f:
|
||||
print(output, file = f)
|
||||
|
||||
print(output)
|
||||
|
||||
Reference in New Issue
Block a user