[NAKHLL_DESCRIPTION]
sudo apt install git postgresql virtualenv lzma lzma-dev python3 python3-dev libmysqlclient-devgit clone https://github.com/nakhll-company/nakhll_backend && cd nakhll_backendvirtualenv .venvsource .venv/bin/activatepip install -r requirements.txt
- Install python3 from python website
- Install Git, postgres
git clone https://github.com/nakhll-company/nakhll_backend && cd nakhll_backendC:/Program Files/python3/bin/python -m venv .venv.venv/bin/activate.batpip install -r requirements.txt
sudo -su postgrespsqlCREATE ROLE nakhll WITH ENCRYPTED PASSWORD '12345';CREATE DATABASE nakhlldb;GRANT ALL PRIVILEGES ON DATABASE nakhlldb TO nakhll;ALTER ROLE "nakhll" WITH LOGIN;
Rename sample.env to .env, fill all data that is available
python3 manage.py migratepython3 manage.py runserver
We use autopep8 and pylint for formatting and linting our project. Code is
much more cleaner and readable in result. Here is how you can config formatter
and linter:
- Install
pep8,autopep8,pylint,pylint-djangousingpip. You probably installed them while installing all project dependencies usingpip install -r requirements.txt - Add this lines to
settings.jsonfile in vscode (Ctrl + , or File > Preferences > Settings):
{
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.linting.pycodestyleEnabled": true,
"python.formatting.provider": "autopep8",
"python.linting.pylintArgs": [
"--load-plugins=pylint_django"
],
"python.formatting.autopep8Args": [
"--max-line-length",
"80",
"--aggressive",
"--experimental"
],
"editor.formatOnSave": true,
"editor.formatOnSaveMode": "modifications",
}
[COMPLETE_THIS_SECTION]