Skip to content

GaganDureja/twitter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About Project

This project is a basic clone of Twitter.

How to Run/Setup

Follow the below steps to run the project on your local computer:

  1. Open Command Prompt/Terminal.
  2. Check if Python is installed on your system by typing python --version or python3 --version.
  3. If Python is not installed, download it from here.
  4. Check if PostgreSQL is installed. If not, download it from here.
  5. Clone the project repository by typing the following command in the terminal: git clone git@github.com:GaganDureja/twitter.git
  6. Navigate to the project directory. cd twitter
  7. Create a virtual environment to manage project dependencies Install and Run:
sudo apt install python3-venv
python3 -m venv twitterEnv
  1. Activate the virtual environment: source twitterEnv/bin/activate
  2. Install the project requirements by running: pip install -r requirements.txt
  3. Open pgAdmin either in the browser pgAdmin or using the application.
  4. Register a server with the following details:
  • Name: localhost
  • Address: 127.0.0.1
  • Password: 123
  • Username: postgres
  1. In the server, create a database named twitter using the same credentials as mentioned in settings.py file.
  2. Once the database setup is complete, apply migrations by running: python3 manage.py migrate
  3. After all installations are done, start the server by running: python3 manage.py runserver
  4. Access the application at localhost.

Admin Panel

  1. To log in as an admin, you need a superuser account. Stop the server by Ctrl+C.
  2. Create a superuser by running: python3 manage.py createsuperuser
  3. Provide the required information (username, email, password) as prompted.
Username: admin
Email: admin@mail.com
Password: admin@123
Password (again): admin@123
  1. You can use the above credentials for testing/development purpose but for production I recommend to use strong credentials.
  2. Once the superuser is created, start the server again by running: python3 manage.py runserver
  3. Access the Django admin panel here and log in using the superuser credentials.

About

Twitter clone

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published