Showing posts with label django. Show all posts
Showing posts with label django. Show all posts

Friday, January 3, 2020

running simple django application in aws


By default, only SSH has been enabled in the security for the fresh server in AWS


Change the security group








Add another rule for port 8000



Viola


Installing Supervisor
sudo apt-get install -y supervisor

in /etc/supervisor/conf.d create gunicorn.conf file

sudo mkdir /var/log/gunicorn
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl status

in /etc/nginx/sites-available create django-simple.conf file



sudo nginx -t
sudo ln django-simple.conf /etc/nginx/sites-enabled/



static files and image were not loaded properly



add this line



sudo systemctl nginx reload

Wednesday, September 25, 2019

django commands


create new django project
$ django-admin startproject mynewproject

run the server
$ python manage.py runserver

create app
$ python manage.py startapp myapptwo

Friday, May 11, 2018

django

install https://docs.docker.com/compose/django/

startapp
$ docker-compose run web python manage.py startapp map

free online comma separating tool

https://delim.co/#