how do I show a non-editable field in the admin site

2009-06-18 Thread Eernst Bunders
Hello I am new to django, and am in the process of discovering what it can and can not do (out of the box). We are primarily interested in jango as a content generation tool, so I am focusing on modeling and using the admin site. One thing I can't realy figure out is how to show fields in admin f

Re: how do I show a non-editable field in the admin site

2009-06-18 Thread ankit rai
use readonlyadmin in your admin.py.U can easily get it on search On Thu, Jun 18, 2009 at 7:17 PM, Eernst Bunders wrote: > > Hello > > I am new to django, and am in the process of discovering what it can > and can not do (out of the box). We are primarily interested in jango > as a content genera

Re: how do I show a non-editable field in the admin site

2009-06-19 Thread Ernst Bunders
hello thanks for your reply, but it is a bit to brief for me. I looked reedonlyadmin up in google and the only thing i find is http://code.djangoproject.com/wiki/ReadOnlyAdmin, which is a proposal. So: i guess this has been implemented, but it is not documented in the online documentation. So wha

Re: how do I show a non-editable field in the admin site

2009-06-19 Thread ankit rai
hello, save this code in a file (python file) in your project and import this in admin.py were u want the readonly field.modify class Mymodel(admin.ModelAdmin): to class Mymodel(ReadOnlyAdminFields,admin.ModelAdmin). and inside ur admin.py below fields wirte readonly =('field','field1','field2'

Re: how do I show a non-editable field in the admin site

2009-06-19 Thread Ernst Bunders
Thank you, Ankit This is exactly what i need. I'll try it out. regards, Ernst On Fri, Jun 19, 2009 at 1:45 PM, ankit rai wrote: > hello, > > save this code in a file (python file) in your project and import this in > admin.py were u want the readonly field.modify > class Mymodel(admin.ModelAdm