Medium wrote:
> 
> hi,
> 
> i'm very new to django (basically a few days) and have read almost all
> the docs, wikis and mailing list archives (well the topics which
> interest me at least). I have a few questions I was hoping anyone on the
> list could help me with concerning customizing the behaviour of the
> admin interface.
> 
> 1. Are there hooks to manipulate the data before its sent to the
> template for rendering (on both list and edit screens) ?

You can override the urlconf for that page with a wrapped or replaced
version of the appropriate function. There is a ticket for a postload
tag somewhere as well, but it doesn't exist atm.

> 2. Are there hooks to manipulate the data after its submitted before
> saving to the database.

Ditto, or use pre_save.

> 3. I know that you can customize most of the admin templates but can you
> customize the admin templatetag templates (apologies for the double post
> regarding this point in my other thread).

The templates are all loaded in the same way, you can override them all.

> 4. Can we change the template {{ variable }} to something like
> ${variable} I don't mind the {% %} but  {%starttag%}{{var}}{%endtag%}......

You can assume this is not going to change, it would break too much for
very little benefit. I guess you could monkey patch
django.core.template.VARIABLE_TAG_START and
django.core.template.VARIABLE_TAG_END if you wanted to. It would be kind
of silly though.

> 5. Can we assume that thirdy party template libraries will never be able
> to reuse any of the admin templates unless someone re codes them in the
> third part template.

Yes. Although you could make a bit of functionality for another language
which used a django template embedded in it. It would probably be
confusing in use, however.

Reply via email to