1. Installing the Admin
Open the settings file and make sure that the following item is added to the INSTALLED_APPS set.
INSTALLED_APPS = ( 'django.contrib.admin', )
2. Enable Admin URL’s in the project’s urls.py file
After importing the admin module, enable/add the following pattern in the list of urlpatterns:
from django.contrib import admin urlpatterns = [ url(r'^admin/', include(admin.site.urls)), ]
3. Register the App’s models that need to be shown in Admin
Open the admin.py file created under the articles directory and register the models in this file.
from django.contrib import admin from article.models import Article # Register your models here. admin.site.register(Article)
Now you should be able to add/edit/delete your articles from the admin panel. How cool is that!