Ticket #8150: 8150.overview-doc.diff
File 8150.overview-doc.diff, 1.2 KB (added by , 16 years ago) |
---|
-
django/django/docs/intro/overview.txt
132 132 133 133 Once your models are defined, Django can automatically create a professional, 134 134 production ready :ref:`administrative interface <ref-contrib-admin>` -- a Web 135 site that lets authenticated users add, change and delete objects. It's as easy136 as adding a line of code to your model classes::135 site that lets authenticated users add, change and delete objects. It's as 136 easy as registering your model in the admin site:: 137 137 138 from django.contrib import admin 139 138 140 class Article(models.Model): 139 141 pub_date = models.DateTimeField() 140 142 headline = models.CharField(max_length=200) 141 143 content = models.TextField() 142 144 reporter = models.ForeignKey(Reporter) 143 145 144 class Admin: pass146 admin.site.register(Article) 145 147 146 148 The philosophy here is that your site is edited by a staff, or a client, or 147 149 maybe just you -- and you don't want to have to deal with creating backend