Thank you so much! My first day working with jinja and I have my own template!
@python360 Жыл бұрын
Excellent, glad it helped you, and thanks for your nice feedback. Cheers David!
@NetworkNinja111 Жыл бұрын
Got my sub off this video. Appreciate the simple breakdown!!
@python360 Жыл бұрын
Thanks NN glad you liked 👍🙂
@YZIOHP2 жыл бұрын
Thank you so much! I've been looking for an example like this and you hit it on the head!
@python3602 жыл бұрын
No problem, very pleased it helped! 👍👍👍
@YZIOHP2 жыл бұрын
Is there any capability to capture our variables for our Jinja2 template via an HTML form instead of a csv or yaml file and output that to the html page?
@python3602 жыл бұрын
Yes, you could use Flask to do exactly that, or FastAPI if you wanted.
@rajradia63672 жыл бұрын
Hi, great video. I was wondering, if you have a list of routers some with multiple interfaces say 2x gig interfaces and some with 1 X gig interface. So in the template you would have 2 interfaces. How does the template handle the config for routers with 1 X gig interface?
@python3602 жыл бұрын
Ah yes, i see what you're saying, you could build a CSV with same format as per this video, but with a new "column" after column 1. With the python code : after line 21 in my code, you could have G002 = row[2] on line 22 (and then current line of code, line 22, moves down a line! and makes use of row[3]). In the cases where G002 is not present, you could simply have a blank space between the commas in your CSV file. (Make sure you still have the same number of commas on each line though).
@python3602 жыл бұрын
(ps. If I was to redo it, I might also look to use a python dictionary, and then the key:values would be better than relying on having the correct column numbers).
@thescientisthorse Жыл бұрын
The thumbnail got me here.
@VRivai2 жыл бұрын
Thanks a lot! This video helps me a lot.
@python3602 жыл бұрын
Glad to hear it was helpful. Thanks for the kind comment 👍