Sunday, April 1, 2012

Re: Preprocess data before showing it on Admin

On Sun, Apr 1, 2012 at 9:25 PM, Pedro Vasconcelos <ptronico@gmail.com> wrote:
> Hello!
>
> Anyone knows how preprocess data before showing it on Admin (change page)?
>
>  ______      ______________      _______
> /      \    /              \    /       \
> |  DB  | -> | PREPROCESSOR | -> | ADMIN |
> \______/    \______________/    \_______/
>
>
> I want to edit data (in Admin) in a human-friendly-format (my custom format)
> and store it in XML. So, when a user comes to edit data on Admin, it cant be
> the raw data from DB. It need to be converted (preprocessed) before and then
> showed.
>
> Anyone can help me? Thanks!

HI pedro,
you can do it creating a custom modelform
https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.ModelAdmin.form
--
Marc

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment