Skip to content

A simple Django project to manage news, with built-in user authentication and a basic admin panel. Follow the setup guide in the README to get started with the development environment and run the project locally.

Notifications You must be signed in to change notification settings

abdullokhonz/itproger

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation


Django Project Setup Guide 🚀

This guide explains how to set up and run the Django project. Follow the steps below to install dependencies, configure the environment, and start the project.

1. Clone the Repository

git clone https://github.com/abdullokhonz/itproger.git
cd itproger

2. Create a Virtual Environment

Before installing dependencies, create and activate a virtual environment:

  • Windows:

    python -m venv venv
    venv\Scripts\activate
  • Mac/Linux:

    python -m venv venv
    source venv/bin/activate

3. Install Dependencies

Once the virtual environment is activated, install the required packages:

pip install -r requirements.txt

4. Configure Environment Variables

Create a .env file in the project's root directory and add the following variables:

SECRET_KEY=your-secret-key
DEBUG=True
ALLOWED_HOSTS=localhost,127.0.0.1
DATABASE_URL=sqlite:///db.sqlite3

5. Apply Migrations

Before running the project, apply database migrations:

python manage.py migrate

6. Create a Superuser (Optional, for Admin Panel)

If you need access to the Django admin panel, create a superuser:

python manage.py createsuperuser

Follow the prompts to set up a username, email, and password.

7. Run the Development Server

Start the Django development server with:

python manage.py runserver

The project will be available at:
➡️ http://127.0.0.1:8000/

8. Additional Commands

  • Collect static files (for production):

    python manage.py collectstatic
  • Run tests:

    python manage.py test

9. Deactivating the Virtual Environment

When you're done, deactivate the virtual environment:

deactivate

About

A simple Django project to manage news, with built-in user authentication and a basic admin panel. Follow the setup guide in the README to get started with the development environment and run the project locally.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published