Thanks for replying. Unfortunately I cant realised how to get the current value, change it and populate the form using a ModelForm. I've tried it actually.
I appreciate if you send me tips on that direction!
Thanks a lot!
--
Pedro Vasconcelos
85 8767.1843
ptronico (skype)
-- On Sun, Apr 1, 2012 at 4:36 PM, Marc Aymerich <glicerinu@gmail.com> wrote:
HI pedro,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!
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.
Pedro Vasconcelos
85 8767.1843
ptronico (skype)
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