Re: how Upload image in django and how to read file dimensions

2018-05-10 Thread pradam
data = request.FILES.get('file') from django.core.files.images import get_image_dimensions from PIL import Image im = Image.open(data) ---> No Quotes just pass the data here. On Thu, May 10, 2018 at 7:31 PM, arvind yadav < developer.arvind2...@gmail.com> wrote: > my views.py in admin.py fil

how Upload image in django and how to read file dimensions

2018-05-10 Thread arvind yadav
my views.py in admin.py file def changelist_view(self, request, extra_context=None,): extra_context = extra_context or {} if request.method == 'POST': #extra_context['form'] ='form' form = HomePageBannerForm(request.POST, request.FILES) if form.is_valid():