Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django template naming with dashes VS underscores

We are using the Django framework and in the book "2 scoops of django" there is a recommendation to use underscore naming for specific things, should this be included in the naming of templates as well? front end developers here are really locked on dashes and I was just wondering?

like image 823
elad silver Avatar asked Mar 09 '23 10:03

elad silver


1 Answers

I think one reason why underscores are better in Python files is so that they can be imported. A dash is interpreted as a minus sign, which can cause problems.

For your Django templates, it's a matter of preference so you will likely be fine using any convention you prefer.

like image 174
NS0 Avatar answered Mar 20 '23 01:03

NS0