Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MeuModel(Model):
- nome = model.CharField('Nome', max_length=80)
- def _edicao(self):
- return '''<a href="#" onclick="alert('Ok');">Acao</a>''';
- _edicao.short_description = u'Edição'
- _edicao.allow_tags = True
- #O Admin
- class MeuAdmin(admin.ModelAdmin):
- fields = ('nome','_edicao',)
Add Comment
Please, Sign In to add comment