If you have customized the forms for the user facing website,
you have to specify the same forms in the class extended by
admin.ModelAdmin.

Below answer is what you are looking for.
https://stackoverflow.com/questions/6321916/different-fields-for-add-and-change-pages-in-admin


Regards,
Chetan Ganji
+91-900-483-4183
ganji.che...@gmail.com
http://ryucoder.in


On Mon, May 27, 2019 at 7:50 PM Harsh Gundecha <harsh.gunde...@gmail.com>
wrote:

> hello,
> i am currently learning django and i have query as following
> is it that we have  to put validators in both the model definition and
> form validation to apply validation to both admin and user site ?
> i tired on reusing a form class assuming that the validator there would
> apply on both user and admin site but it didnt happen.
>
>
> in short,
> i would like to define validation at one place and get them applied on
> both user and admin site
>
> Thank you
> Regards, Harsh
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/8a5280cf-d52b-4a7d-8e21-0d18a741f02a%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/8a5280cf-d52b-4a7d-8e21-0d18a741f02a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMKMUjvNgBa-5vNJkC_D%2BFtABEripi1Zq%2BbE%2B3b0JhE38GC8Vw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to