Skip to content

moro23/blog_app_project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Django Blog Project

A simple blog application built with Django. This project provides basic functionalities for creating, viewing, and managing blog posts.

Features

  • List View: A homepage that displays a list of all blog posts.
  • Detail View: A dedicated page for viewing the full content of a single blog post.
  • Admin Integration: Manage blog posts directly through the Django admin interface.

Project Structure

The project is organized into two main parts:

  • blog_project/: The main Django project directory, which contains project-level settings and configurations.
  • blog_app/: The Django app that encapsulates the core blogging functionality, including models, views, and templates for blog posts.
  • templates/: Contains the base HTML templates used across the application.
  • static/: Contains static files, such as CSS and JavaScript.

Setup and Installation

Follow these steps to get the project up and running on your local machine.

1. Prerequisites

  • Python 3.x
  • pip (Python package installer)

2. Clone the Repository

First, clone this repository to your local machine:

git clone <your-repository-url>
cd blog_app_project

3. Create and Activate a Virtual Environment

It is highly recommended to use a virtual environment to manage project dependencies.

  • For macOS/Linux:

    python3 -m venv venv
    source venv/bin/activate
  • For Windows:

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

4. Install Dependencies

The project's dependencies are listed in a requirements.txt file. You can create this file by running:

pip freeze > requirements.txt

Then, install the required packages:

pip install -r requirements.txt

(Note: If you don't have a requirements.txt file yet, you can install Django directly: pip install django)

5. Apply Migrations

Apply the database migrations to create the necessary tables:

python manage.py migrate

6. Create a Superuser

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

python manage.py createsuperuser

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

7. Run the Development Server

Start the local development server:

python manage.py runserver

The application will be available at http://127.0.0.1:8000/.

Running Tests

To ensure everything is working correctly, you can run the project's test suite:

python manage.py test

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published