This commit is contained in:
@@ -1,8 +1,23 @@
|
|||||||
from django.core.management.base import BaseCommand
|
from django.core.management.base import BaseCommand
|
||||||
|
from django.conf import settings
|
||||||
|
import os
|
||||||
|
#import jinja2
|
||||||
|
from jinja2 import Environment, FileSystemLoader
|
||||||
|
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
args = '<team_id>'
|
args = '<team_id>'
|
||||||
help = 'Affiche la liste des backlogs'
|
help = 'Affiche la liste des backlogs'
|
||||||
|
|
||||||
|
template_dir = os.path.join(settings.BASE_DIR, 'templates')
|
||||||
|
env = Environment(loader=FileSystemLoader(template_dir))
|
||||||
|
template = env.get_template('helloWorld.jinja')
|
||||||
|
output = template.render()
|
||||||
|
|
||||||
|
with open("outputFileName.txt", 'w') as f:
|
||||||
|
print(output, file = f)
|
||||||
|
|
||||||
|
print(output)
|
||||||
|
|
||||||
def handle(self, *args, **options):
|
def handle(self, *args, **options):
|
||||||
self.stdout.write('Coucou !')
|
self.stdout.write('Coucou !')
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
hello
|
||||||
Reference in New Issue
Block a user