This is a simple blog application built with Django. It allows users to register, log in, create, update, and delete blog posts.
- User registration and authentication
- Create, read, update, and delete posts
- User profile management
- Python 3.11
- Django 5.0.6
-
Clone the repository:
git clone https://github.com/yourusername/yourrepository.git
cd yourrepository
-
Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required packages:
pip install -r requirements.txt
-
Apply the migrations:
python manage.py migrate
-
Create a superuser:
python manage.py createsuperuser
-
Start the development server:
python manage.py runserver
- Visit
http://127.0.0.1:8000/
to see the blog home page. - Use the admin panel at
http://127.0.0.1:8000/admin/
to manage users and posts.
blog/
: Contains the blog application code.users/
: Contains the user management application code.templates/
: Contains the HTML templates.static/
: Contains the static files (CSS, JavaScript, images).app/
: Main project settings and URLs.
-
Build the Docker image:
docker build -t django-blog .
-
Run the Docker container:
docker run -d -p 8000:8000 django-blog
- 404 Errors for URLs: Ensure your URL patterns are correct and that the names match in the templates.
- Form Errors: Make sure all required fields are present in your forms and models.
For any questions or issues, please open an issue on the repository or contact the maintainer at [email protected].