Hello, I am having trouble writing a view to upload images. I am creating a bookmarks application with Django 1.02 that would have a screenshot for each bookmark. I extended the model in this way to include the images:
class Photo(models.Model): title = models.CharField(max_length=50) photo = models.ImageField(upload_to="photos/") bookmarks = models.OneToOneField(Bookmark, primary_key=True) The forms.py file has the following code related to images: class BookmarkSaveForm(forms.Form): photo = forms.ImageField( label='Upload screenshot', required=False ) I am not quite sure how to write views.py code for the saving the images to the specified directories. Any suggestions on how to get started with this is appreciated. Thank you, Tonu --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---