You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
555 B
20 lines
555 B
4 years ago
|
from django.contrib import admin
|
||
|
from .models import Ad
|
||
|
from django.utils.safestring import mark_safe
|
||
|
from .models import Resume
|
||
|
# Register your models here.
|
||
|
|
||
|
|
||
|
class ResumeAdmin(admin.ModelAdmin):
|
||
|
list_display = ('name', 'status', 'personID', 'birth', 'edu', 'school',
|
||
|
'major', 'position', 'image_data')
|
||
|
|
||
|
def image_data(self, obj):
|
||
|
return mark_safe(u'<img src="%s" width="120px" />' % obj.photo.url)
|
||
|
|
||
|
image_data.short_description = u'个人照片'
|
||
|
|
||
|
|
||
|
admin.site.register(Resume, ResumeAdmin)
|
||
|
admin.site.register(Ad)
|