A simple Chat App with user registration and a chat window
Follow these steps to set up a basic Django project using the requirements.txt
file:
-
Install Python: Ensure Python is installed on your system. Download it from python.org.
-
Create a Virtual Environment: Open your terminal or command prompt, navigate to your project directory, and run the following command to create a virtual environment named myenv.
python -m venv myenv
-
Activate the Virtual Environment:
- For Windows:
myenv\Scripts\activate
- For macOS/Linux:
source myenv/bin/activate
- For Windows:
-
Install Required Packages: Install the packages specified in the
requirements.txt
file by running:pip install -r requirement.txt?
This will install all the necessary packages and dependencies specified in the requirement.txt file. -
Create a Django Project: Create a new Django project named
myproject
by running:django-admin startproject myproject
. This will create a new Django project named myproject. -
Navigate to the Project Directory: Change into your project directory by running:
cd myproject
-
Run the Django Development Server: Start the development server by executing:
python manage.py runserver
You should see output indicating that the server is running.
-
Verify Installation: Open your web browser and visit
http://localhost:8000
. You should see the default Django welcome page, confirming a successful installation.
On the homepage http://127.0.0.1:8000/
click "Register" to register a user in the Django DB. Then click "back to login" to login.
Now you can start chatting.