django app on Ubuntu OS 22.04
For Local Ubuntu OS 22.04 use the below steps
### Setup ## Setup Virtual environment only for local machin:
python3 -m venv env
## Activate virtual environment only for local machin:
source env/bin/activate
## To get this repository, run the following command inside your git enabled terminal
$ git clone github.com/shreys7/django-todo.git cd django-todo/
## Install django
pip install django
You will need django to be installed in you computer to run this app.
Head over to djangoproject.com/download for the download guide Once you have downloaded django, go to the cloned repo directory and run the following command
$ python manage.py makemigrations
This will create all the migrations file (database migrations) required to run this App. Now, to apply this migrations run the following command
$ python manage.py migrate One last step and then our todo App will be live. We need to create an admin user to run this App. On the terminal, type the following command and provide username, password and email for the admin user
$ python manage.py createsuperuser
##Enter the username, email and password. That was pretty simple, right? Now let's make the App live. We just need to start the server now and then we can start using our simple todo App. Start the server by following command
$ python manage.py runserver Once the server is hosted, head over to 127.0.0.1:8000/todos for the App.
##To create requirements.txt file use below command>> pip freeze > requirements.txt
Cheers and Happy Coding :)