Complete Python Developer In 2020: Zero To Mastery Herunterladen Jun 2026
Open blog/views.py :
# Create the blog app python manage.py startapp blog
ZTM occasionally releases specific sections of the course for free, such as the "Password Hack Checker" project . Open blog/views
% for post in posts % <article> <h2> post.title </h2> <small>Written by post.author on post.published_date</small> <p>truncatewords:30 </p> <hr> </article> % endfor % </body> </html>
INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', # Our custom app 'blog', ] We need to register our Post model so
# 4. Install Django pip install django
# config/settings.py
Django comes with a built-in admin panel. We need to register our Post model so we can write blog posts through the UI.
# config/urls.py from django.contrib import admin from django.urls import path, include Written by post.author on post.published_date<
# blog/admin.py from django.contrib import admin from .models import Post
You are now ready to launch.