Posts

Showing posts with the label Upload Images In Django

Let's go Django

Image
Django File (and Image) Uploads Tutorial This tutorial shows how to implement file and then image uploading with Django. We’ll build a basic Instagram clone. Setup If you’re on a Mac the  Desktop  is a convenient place to put our code. The location doesn’t matter; it just needs to be easily available. On the command line, navigate there and create a directory  insta  for our files. We will use  Pipenv  to install both Django and  pillow  which is a Python image process library Django relies on for image files. For non-image file uploads  pillow  is not needed. Finally activate our new virtual environment with the  shell  command. $ cd ~/Desktop $ mkdir insta && cd insta $ pipenv install django==2.1.5 pillow==5.4.1 $ pipenv shell (insta) $ You should see  (insta)  going forward to indicate we’re in an active virtual environment. You can type  exit  at any time to leave it and  pipenv shell  to re-enter. Project and App Now create our new Django project cal