1. (r'^admin/', admin.site.root)2. (r'^admin/(.*)', admin.site.root)If you type in browser
/admin/xx/ with 1, you will get the below error:root() takes exactly 3 arguments (2 given)So, use 2.
Jun 272009
Jun 272009
In admin interface,
search_fields
indicates the area for search.
------------
e.g.,
search_fields = ('title', 'slug', 'body')
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)
Jun 262009
from django.contrib import admin
otherwise,
django can’t understand
(r’^admin/(.*)’, admin.site.root),
