mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-25 00:36:11 -06:00
Rename & move template file
This commit is contained in:
parent
b699c7bd98
commit
c75211d100
@ -7,7 +7,7 @@ from jinja2 import FileSystemLoader, Environment
|
|||||||
|
|
||||||
from dcim.choices import *
|
from dcim.choices import *
|
||||||
|
|
||||||
TEMPLATE_FILENAME = 'generated_schema.json'
|
TEMPLATE_FILENAME = 'devicetype_schema.jinja2'
|
||||||
OUTPUT_FILENAME = 'contrib/generated_schema.json'
|
OUTPUT_FILENAME = 'contrib/generated_schema.json'
|
||||||
|
|
||||||
CHOICES_MAP = {
|
CHOICES_MAP = {
|
||||||
@ -39,7 +39,7 @@ class Command(BaseCommand):
|
|||||||
|
|
||||||
def handle(self, *args, **kwargs):
|
def handle(self, *args, **kwargs):
|
||||||
# Initialize template
|
# Initialize template
|
||||||
template_loader = FileSystemLoader(searchpath=f'{settings.TEMPLATES_DIR}/extras/')
|
template_loader = FileSystemLoader(searchpath=f'{settings.TEMPLATES_DIR}/extras/schema/')
|
||||||
template_env = Environment(loader=template_loader)
|
template_env = Environment(loader=template_loader)
|
||||||
template = template_env.get_template(TEMPLATE_FILENAME)
|
template = template_env.get_template(TEMPLATE_FILENAME)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user