https://github.com/cansugunn/django-personal-web
Django Blog With Dockerization, External Storage And Administration Panel
blogapp is the Django project (settings, URL configuration, WSGI/ASGI entrypoints), while blog is the primary application containing models, URLs, views, and app-scoped templates/static assets.blog/urls.py to function-based views in blog/views.py, which query ORM models (Blog, Category) and render templates under blog/templates/blog/. Templates extend a shared base layout in templates/base.html, and partials under templates/partials/ keep shared UI fragments (navbar, category list) DRY.static/ directory configured in STATICFILES_DIRS, while uploaded media (e.g., blog images) are stored under upload/ and exposed through MEDIA_URL via django.conf.urls.static.static in development.slugify). Categories are linked to blogs through a many-to-many relation, allowing each post to appear in multiple categories.RichTextField) plus publication toggles (is_active, is_home). Slugs are generated from titles, giving each blog a canonical, human-readable URL.blog/urls.py map semantic paths (/, /blogs, /blogs/<slug>, /category/<slug>) to dedicated view functions.blog/views.py use the QuerySet API to fetch only active/home posts where appropriate and pass context dictionaries to templates, separating data retrieval from presentation.base.html to inherit common head, scripts, and navbar content, illustrating the Template Method pattern within Django's templating engine. Partials (blog/partials/_blog.html, templates/partials/_navbar.html, templates/partials/_categories.html) demonstrate composition and DRY principles.{% url %} tags so navigation remains stable if URL patterns change.templates/base.html defines the document head, shared styles (Bootstrap + custom CSS), navbar include, and blocks for page-specific CSS/JS. This enforces consistent styling and behavior.blog/templates/blog/index.html lists featured posts (is_home=True) alongside the category sidebar partial.blog/templates/blog/blogs.html renders all active posts and highlights the selected category when filtered.blog/templates/blog/blog-details.html shows a single post with its image and rich description.blogapp/settings.py registers the blog app and ckeditor for rich text editing, configures template discovery (including the project-level templates/ directory), and sets up static/media paths for local development.blogapp/urls.py mounts the blog URLs at the site root and exposes media files in debug mode, simplifying local previews of uploaded images.blog/views.py, register a URL pattern in blog/urls.py, and design a template that extends base.html to automatically inherit site styling.Blog or Category with new fields (e.g., tags, publish dates); Django migrations will handle schema evolution.static/ or override block sections (css_files, js_files) within templates to add page-specific resources.pip install -r requirements.txt (or add the required packages manually: Django 5, Pillow for images, django-ckeditor).python manage.py migrate python manage.py runserver
http://127.0.0.1:8000/ to browse the blog. Media uploads will be served from the upload/ directory during development.