I use Django's built-in development server all the time, but get tired of typing out the command to run it, and if I'm testing some custom admin css/js, I *really* get tired of typing out the command that correctly directs the middleware to use my admin media dir.
So I added this alias to my .bashrc and when I'm in a project's root, I just type 'pyserver' and the development server fires up, automatically passing an --adminmedia arg if I have some custom admin media for the project (otherwise it's 'runserver' as always).
Note: This relies on the convention that my custom admin media will be in a folder called admin_media that resides at the project's base. Of course, change it to whatever convention you use.
I'm not a bash expert or anything, but this works for me ;)
Subclass of the ModelForm which allows to make fields 'display_only'.
This means no formfield will be displayed, but a suitable representation. You can make all fields display_only or just a few (or you can use the form as a normal modelform).
There are also some extra's to easily set attrs on fields or set help_texts on widgets when using this form.
Why ?
I made my own set of generic crud views based on newforms, but added a 'display' view to simply display objects, in the same table layout as the editing is done, but without the fields. I wanted to avoid having to redefine my forms twice and I wanted to reuse some generic templates as much as possible.
Obviously this is not good for performance, but I use it for an intranet app with a lot of objects, but not that big a load.
Their is definitely still a lot of room for improvement, and maybe all this could have been done much easier.
How to use?
See the docstring.