After you generate a model, if you register the model at admin site,

admin can create data based on your model design (even if you haven’t built the input page yet.)

————

e.g.,

from django.contrib import admin
from yourapp.models import Post

class PostAdmin(admin.ModelAdmin):
prepopulated_fields = {‘slug’: (‘title’,)}

admin.site.register(Post, PostAdmin)

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 2011 Web Oom Suffusion theme by Sayontan Sinha
Switch to our mobile site
Top Footer