Skip to Main Content
Hands-On Application Development with PyCharm
book

Hands-On Application Development with PyCharm

by Quan Nguyen
September 2019
Beginner to intermediate content levelBeginner to intermediate
494 pages
13h
English
Packt Publishing
Content preview from Hands-On Application Development with PyCharm

Using the admin interface

To be able to create and edit different blog posts in our application, the easiest way is to make ourselves a superuser and create those posts via Django's admin interface. Let's walk through that process with the following steps:

  1. In the manage.py panel, enter the following command:
manage.py@mysite > createsuperuser
  1. Django will then ask for the login credentials for this superuser. Simply input your information to finalize this process. Next, we have to register our Post model with the admin interface. To do this, go to blog/admin.py and enter the following code:
from django.contrib import adminfrom .models import Post# Register your models here.admin.site.register(Post)

This script basically lets Django know ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

MASTERING PYCHARM

MASTERING PYCHARM

Nafiul Islam

Publisher Resources

ISBN: 9781789348262Supplemental Content