Skip to content

bahrom04/kedi.uz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

417e0fc · Feb 18, 2025
Jan 26, 2025
Feb 8, 2025
Jun 17, 2024
Feb 4, 2025
Feb 8, 2025
Nov 3, 2024
Feb 18, 2025
Nov 3, 2024
Jan 16, 2025
Feb 5, 2025
Nov 24, 2024
Jan 16, 2025
Mar 11, 2024
Nov 2, 2024
Jan 16, 2025
Jan 16, 2025
Apr 27, 2024
Nov 24, 2024
Nov 24, 2024

Repository files navigation

Ekologiya

Cmd venv activation:

python -m venv venv
call venv/Scripts/activate

Clone, create venv and run:

pip install -r requirements/develop.txt
python manage.py migrate
python manage.py createsuperuser

In Deployment or Develop don't forget that!

https://stackoverflow.com/questions/35101850/cant-find-msguniq-make-sure-you-have-gnu-gettext-tools-0-15-or-newer-installed

For windows run this command in cmd .Othervise In Vscode will not work

sudo apt-get install -y gettext
django-admin makemessages -l en
python manage.py compilemessages
python manage.py compilemessages -l uz                                                                                               

Incase permission denied to upload images

sudo chown -R your_username:your_groupname /home/bahrom04/workplace/django/ekologiya/media
sudo chmod -R 755 /home/bahrom04/workplace/django/ekologiya/media

Nginx

sudo systemctl status nginx

ufw configurations

Clear Docker Containers in development (django & postgres) Don't run it on production server

docker-compose down --volumes --remove-orphans

If you run this command it will also delete postgres database and their volumes. So run this when you want to test new containers. See conversation below: https://chat.openai.com/share/f1c8d760-6062-4613-8a5b-2f88cfcfecc2

TailwindCss

python -m pip install django-tailwind
python -m pip install 'django-tailwind[reload]'
sudo npm install -g cross-env
python manage.py tailwind install
python manage.py tailwind start

Ownership issues with git

git config --global --add safe.directory /home/web/kedi.uz

Redis

redis-server

# mac 
brew services start redis  # start
brew services stop redis  # stop

sudo systemctl start redis
sudo systemctl enable redis

sudo systemctl status redis-server

keys '*'
get <key_name>