Core concepts in Django Do you want free web design template?
Jun 262009

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)

Posted by weboom at 10:42 pm Tagged with: , , ,

Leave a Reply

(required)

(required)

Switch to our mobile site
Top Footer