PRE-REQUISITES:
- Visual Studio cocde
- Python3(pip)
- git bash(to clone repository)
Open Visual Studio code and open 'New terminal' and navigate to the folder/directory where you want to clone this repository.
After this run the following commands on the terminal.
git clone https://github.com/Rahuldj2/ChatApp-with-django/
(All folders/files in this repository will be cloned into your system).
python -m venv newvirtualenv
Then press ctrl
+shift
+p
on your keyboard to open command palette and navigate to "Python: select interpreter".
Choose the root folder(where you are cloning repository) and choose "Python 3.9.7('newvirtualenv':venv) .\newvirtualenv\bin\python.exe".
Restart VScode and open new terminal. Your terminal should look like this now(the path will vary of course):
The basic setup is done. Now follow these instructions to run the django project:
Type this command on the terminal
cd ChatApp-with-django
Now you need to install django in the virtual environment. You can do this by running the command:
pip install django
then to run and view the webpage type:
python manage.py runserver
You will get this output on the terminal:
Copy and paste the server link starting with https on google chrome to view the web page. A preview is shown below:
Now you can enter the chat room of your choice! To test the real time chat updates you can open the same link on a different tab and enter the
same chat room with different username:
That is it! Hope you enjoy chatting in this app!
I am a novice to the field of web development and this is the first project that I have created. I built this website with the aim to hone my web development skills and to get a first hand experience of building a website using HTML,CSS and DJANGO. I have followed various tutorials to learn web development and I would like to thank freeCodeCamp.org who have guided me to build this website through their tutorials on youtube. (https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ).
An intermediate understanding of HTML(Hyper text Markup Language), CSS(Cascading style sheets) and Django is the pre-requisite for building this chat app. Some javascript is also used in this project to provide real-time chat messaging updates. HTML and CSS are required to build the front end i.e the structure and styles of the web page, and Django(alongwith sqlLite) is used for the backend i.e for url routing,storing chat data etc.