[NAKHLL_DESCRIPTION]
sudo apt install git postgresql virtualenv lzma lzma-dev python3 python3-dev libmysqlclient-dev
git clone https://github.com/nakhll-company/nakhll_backend && cd nakhll_backend
virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
- Install python3 from python website
- Install Git, postgres
git clone https://github.com/nakhll-company/nakhll_backend && cd nakhll_backend
C:/Program Files/python3/bin/python -m venv .venv
.venv/bin/activate.bat
pip install -r requirements.txt
sudo -su postgres
psql
CREATE 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 migrate
python3 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-django
usingpip
. You probably installed them while installing all project dependencies usingpip install -r requirements.txt
- Add this lines to
settings.json
file 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]