If you follow this step-by-step tutorial (or the video series on YouTube) you should be able to re-create the app which is provided in this repository.
For an optimal tutorial experience I recommend that
- you have mastered the Django Tutorial Polls App
- you know your way around IDEs and editors (this tutorial is not about PyCharm, we only use it; any other editor - e.g. sublime text - should work fine too)
- you have a basic knowledge on how to use Linux Shell
- you know how to install packages on your system
- you are comfortable using virtual environments (you can probably work without them, but it is highly recommended to use them!)
- you know how to debug your web application in a Browser (we are using FireFox here, but any other Browser should work too)
- you can do basic programming tasks in JavaScript and Python (I recommend at least 3 months experience in both)
As a warning: This written tutorial is very superficial. I will however create a YouTube video about it, which I will link within this repository.
In this chapter we are going to set up the development environment and create a basic REST API as well as a frontend for it.
- Step 1: Set Up the Basic Django Project Structure
- Step 2: Create the
UploadedImage
Model and Migrations - Step 3: Create a Basic RESTful Endpoint for
UploadedImage
- Step 4: Uglify/scramble Image names on Upload to Avoid Duplicates
- Step 5: Prepare the Frontend Application
- Step 6: Set up a Basic AngularJS Single Page Application
- Step 7: Uploading Images using AngularJS
- Step 8: Deleting an Uploaded Image
- Step 9: Getting Bootstrap CSS Theme for a nicer Look and Feel
In this chapter we are going to add more fields to our data model and automatically generate thumbnails for the uploaded images.
- Step 1: Automatically Creating the Thumbnail in the Django Model
- Step 2: Extending the Backend and the Frontend to provide the Thumbnail
- Step 3: Adding a Title and Description to each Image
- Step 4: Preview the image before uploading
- Step 5: Fixing the flickering when deleting images
- Step 6: Adding toast notifications
In this chapter we are going to add users and authentication to our project.
Now that we have users, we can let users comment on pictures.