https://github.com/abdullokhonz/itproger
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.
https://github.com/abdullokhonz/itproger
css django github html itproger news python sqlite3 youtube
Last synced: 3 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/abdullokhonz/itproger
- Owner: abdullokhonz
- Created: 2025-02-12T10:11:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-20T14:17:56.000Z (over 1 year ago)
- Last Synced: 2025-06-01T23:34:30.815Z (about 1 year ago)
- Topics: css, django, github, html, itproger, news, python, sqlite3, youtube
- Language: Python
- Homepage: https://github.com/abdullokhonz
- Size: 22.5 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
---
# **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**
```bash
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:**
```bash
python -m venv venv
venv\Scripts\activate
```
- **Mac/Linux:**
```bash
python -m venv venv
source venv/bin/activate
```
## **3. Install Dependencies**
Once the virtual environment is activated, install the required packages:
```bash
pip install -r requirements.txt
```
## **4. Configure Environment Variables**
Create a `.env` file in the project's root directory and add the following variables:
```ini
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:
```bash
python manage.py migrate
```
## **6. Create a Superuser (Optional, for Admin Panel)**
If you need access to the Django admin panel, create a superuser:
```bash
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:
```bash
python manage.py runserver
```
The project will be available at:
➡️ **http://127.0.0.1:8000/**
## **8. Additional Commands**
- **Collect static files (for production):**
```bash
python manage.py collectstatic
```
- **Run tests:**
```bash
python manage.py test
```
## **9. Deactivating the Virtual Environment**
When you're done, deactivate the virtual environment:
```bash
deactivate
```
---