This is a Django-based Content Management System (CMS) project that allows users to create, view, update, and delete content items along with feature to add multiple categories in content item.
- Installation
- Usage
- Test Coverage
- Clone the repository:
git clone https://github.com/althafMuhammedUmer/ContentManagementSystem.git
cd ContentManagementSystem
- Create a virtual environment and activate it:
python3 -m venv venv
source venv/bin/activate
- Install project dependencies:
pip install -r requirements.txt
- Create the database and apply migrations:
python manage.py migrate
- Create a superuser for admin access:
python manage.py createsuperuser
- Start the development server:
python manage.py runserver
-
Access the admin panel by visiting http://localhost:8000/admin/ and logging in with the superuser credentials.
-
Explore the API endpoints to manage content items:
- Create Content: http://localhost:8000/api/create/ (POST)
- Get Content List: http://localhost:8000/api/content/ (GET)
- Get Content by ID: http://localhost:8000/api/content/int:id/ (GET)
- Update or Delete Content: http://localhost:8000/api/content_action/int:id/ (PUT, DELETE)
This project includes unit tests to ensure its functionality. You can generate test coverage reports by running the following command:
coverage run --source='.' manage.py test
To see the test report:
coverage report