A robust, scalable, and feature-rich Content Management System built with Django, designed to streamline content creation and user engagement. This CMS project offers an intuitive and responsive interface, ideal for managing blogs, articles, user roles, and social media interactions.
- Custom roles: Writer and Reader, assigned during registration.
- Role-based views and permissions using custom mixins.
- Separate apps for managing different roles:
- Writer App: For article creation, management, and analytics.
- Reader App: For browsing, liking, and commenting on articles.
- Admin App: Custom admin panel for advanced content and user management.
- Unified registration form with dynamic fields based on role selection.
- Profile editing with current user data pre-filled and a separate password change feature.
- Social media link formatting for easy redirection.
- Articles categorized using Many-to-Many relationship with
Category
model. - View tracking: Each article tracks the number of views and can be sorted by popularity.
- Like and unlike functionality using a Many-to-Many field for user engagement.
- Nested comments with the ability to update and reply to existing comments.
- Comment form reuse for updating comments, enhancing user interactivity.
- A customized admin panel to provide better control over content and user management.
- Unique styling and additional features for enhanced usability.
- Site-wide contact information display via the
base.html
template. - Customized pagination for articles.
- Django messages integrated into views for better user feedback.
- Role-based access control using a custom mixin to restrict access to specific views.
- Redirect unauthorized users to the login page with a
next
URL parameter.
- Optional fields for social media links during registration, automatically formatted for redirection.
- Meta tags and social sharing features integrated into article views.
- Frontend: HTML, CSS, Bootstrap, JavaScript
- Backend: Python Django
- Database: SQLite (can be easily configured for other databases)
git clone https://github.com/PeterOlayemi/content_management_system.git
python -m venv env
source env/bin/activate # On Windows use `env\Scripts\activate`
pip install -r requirements.txt
Create environment variables (.env) file containing these variables (all vars are set to an empty string for testing purpose only):
SECRET_KEY = '{{your_django_project_secret_key}}'
my_email = '{{your_email_address}}'
appsPassword = '{{your_appspassword_for_email}}'
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
Visit http://localhost:8000 in your browser to see the CMS in action. In the django admin panel, add groups - 'Reader', 'Writer', 'Admin' and add the superuser to the 'Admin' so you can access the custom admin panel.
content_management_system/ ├── account/ ├── administrator/ ├── blog_site/ ├── main/ ├── media/ ├── reader/ ├── static/ ├── writer/ ├── .gitignore ├── LICENSE ├── manage.py ├── README.md └── requirements.txt
Contributions are welcome! Please follow these steps:
-
Fork the project.
-
Create your feature branch (git checkout -b feature/YourFeature).
-
Commit your changes (git commit -m 'Add some feature').
-
Push to the branch (git push origin feature/YourFeature).
-
Open a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or feedback, please reach out:
Email: olayemipeter177@gmail.com
LinkedIn: Visit My Profile
Portfolio: Visit My Website