To Create an Application in Django to resize an image.
Page to upload a file, specify new dimensions Store the record (image/dimensions) in database Create a result image based on the dimensions and store it Show result page with the newly resized image
To RUN/DEPLOY:
- Create a new virtual environment and activate it.
- Open file path where manage.py exists.
- Install all the requirements from requirements.py file using cmd: pip install -r requirements.txt
- Run cmd: python manage.py runserver and visit the localhost link.
Description:
- I have create 2 pages (index page and list page).
- Index.html page allows you to upload 2 images(one for retaining the original and the other for resizing).
- specify the dimensions and click on upload. Later we can visit list link to view all the uploaded images in the table.
- Uploaded images are stored as name.dateofupload format.
- 127.0.0.1:8000/admin gives you the admin panel. ID: admin Pass: admin.
- The admin module show you the models and the objects that are been uploaded.