-
Notifications
You must be signed in to change notification settings - Fork 0
Coding Style
Usually follow the code surrounding where you want to add code. Usually it should be good, but you can never be sure if you don't know the coding styles. Read them below for each language:
!!! INDENT WITH SPACES NOT TABS (everywhere) !!!
Python coding style and conventions are best described by:
Use this to construct a basis for coding in python, but this may be overwritten by the Django coding style
You can install "Python PEP8 Autoformat" for automatic indentation and formatting. I use it sometimes but never for "urls.py" !! You can install the package for sublime-text from the package manager and then use CTRL+SHIFT+R to auto-format. Make sure that you configure sublime so that it ignores breaking the lines that are too long.
Here are my settings for the autoformatter:
{
// autoformat code on save ?
"autoformat_on_save": false,
// enable possibly unsafe changes (E226, E24, W6)
// aggressive level, 0 to disable:
"aggressive": 0,
// list codes for fixes; used by --ignore and --select
"list-fixes": false,
// do not fix these errors / warnings (e.g. [ "E501" , "E4" , "W"])
"ignore": ["E501"],
// select errors / warnings (e.g. ["E4", "W"])
"select": [],
// Maximum line length
"max-line-length": 79
}
For django there is no standard but there are a few suggestions like:
-
The original Django Documentation
-
and this
connect.academy/academy/static/local/js/*
$course-rating-badge-color: #33424D;
connect.academy/academy/static/bootstrap/stylesheets/bootstrap/_variables.scss