in lines:
2009/2/1 alexander lind <a...@polkabrothers.com>: > > How do I add a custom field to the a model rendered as a form by > django admin site? > Use custom widgets > My model has a 'choices' field with 4 possible choices: png, gif, jpg > and 'none'. As you can guess this describes the format of an image. > What I want to do is get the admin site to display a file upload > widget, and I then want to manually process the uploaded image, save > it in special way, and set the choices field accordingly. http://docs.djangoproject.com/en/dev/topics/http/file-uploads/ > Can someone please tell me how I can accomplish this? > > I have read the django admin site manual, but it has nothing on this > kind of customization, which I must assume is not all that uncommon. > Check out: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#save-model-self-request-obj-form-change > Thanks > Alec > > > > --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---