Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Python Tools for Visual Studio

You're reading from  Python Tools for Visual Studio

Product type Book
Published in Apr 2014
Publisher
ISBN-13 9781783288687
Pages 122 pages
Edition 1st Edition
Languages

Setting up the admin interface


Now that a database is attached to the project, we can activate the administration interface of Django in it. The process is really simple at this point; you just need to uncomment a couple of lines of code in the project settings file and the main URL manager.

First, activate the Django application django.contrib.admin in the Installed_Apps section of the settings file:

Second, go to the urls.py file and uncomment the section that imports the admin class and that enables the admin's discovery of the models inside the project. Besides this, it is also necessary that we uncomment the last line of the URL pattern that manages the /admin/ path:

Now the Django administration application is activated in the project. If the operation is successful, you will be presented with the admin login page. After launching the application, navigate to the /admin/ page:

Insert the credentials created during the database setup to access the administration section:

Now we have a fully...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}