开发者

adding a 'add button' next to the 'search button' for the ForeignKeyField in Django

开发者 https://www.devze.com 2023-03-17 03:52 出处:网络
I\'m using raw_id_fields in my ModelAdmin and I\'d like to place an add button next to the \'search button\'.

I'm using raw_id_fields in my ModelAdmin and I'd like to place an add button next to the 'search button'.

My app:

 ## models.py  
 class Student(models.Model):  
    user = models.ForeignKey(User)  
    ...  

## admin.py  
class StudentAdmin(admin.ModelAdmin):  
    raw_id_field开发者_C百科s = ['user']  
    ...

I'm using Django 1.2.5.

Is this possible? Any help will be appreciated.

0

精彩评论

暂无评论...
验证码 换一张
取 消