Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Django Project Installation Guide

Prerequisites

Ensure you have the following installed on your system:

  • Python (>=3.x)
  • Git
  • pip (comes with Python)
  • Virtual environment (venv)

Installation Steps

1. Clone the Repository

git clone https://github.com/your-username/your-repo.git
cd your-repo

2. Create and Activate Virtual Environment

On macOS/Linux:

python3 -m venv .venv
source .venv/bin/activate

On Windows (CMD):

python -m venv .venv
.venv\Scripts\activate

On Windows (PowerShell):

python -m venv .venv
.venv\Scripts\Activate.ps1

3. Install Dependencies

pip install -r requirements.txt

4. Apply Migrations

python manage.py migrate

5. Run the Development Server

python manage.py runserver

Your Django project will now be running at:

http://127.0.0.1:8000/

6. (Optional) Create a Superuser

If your project has Django Admin, create a superuser:

python manage.py createsuperuser

Follow the prompts to set up login credentials.

Additional Commands

  • Deactivate Virtual Environment:
    deactivate
  • Install Additional Packages:
    pip install package-name
    pip freeze > requirements.txt

Troubleshooting

  • If you get a ModuleNotFoundError, ensure the virtual environment is activated.
  • If the database is not working, run:
    python manage.py makemigrations
    python manage.py migrate

You're all set! 🎉 Happy coding!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages