database contains Managing acquired data insert, modify and delete database records Managing users define who can access your application ✓ All of these should be accessible for non technical users
from WebDirectory.models import Entry, Image!! ! ! ! ! ! ! admin.site.register(Entry)! admin.site.register(Image) WebDirectory/admin.py makes Entry and Image data models available on the admin interface
an administrator for the WebDirectory application only • A dedicated user admin named John Doe - login: jdoe • With the administrative privileges to create, modify and delete records in WebDirectory only
admin.py • The class ModelAdmin is the representation of the models in the admin interface • Changing the admin options 1.create a new model admin object class EntryAdmin(admin.ModelAdmin): ...! 2.register this new admin object admin.site.register(Entry,EntryAdmin)
import django! >> django.__file__! '/usr/local/lib/python2.7/site-packages/django/__init__.pyc' • Find your Django installation path my django_path • Copy the template base_site.html from django_path/contrib/admin/templates/admin/ to project_path/tsans/templates/admin/