(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {
# views.py | |
from myproject.myfunctions import upload_profile_picture | |
def profile_picture(request): | |
# setup (checking for post, checking if the | |
# user is authenticated, etc.) | |
user = request.user | |
pic_file = request.FILES['profile_picture'] | |
result_url = upload_profile_picture(pic_file) |
(from Understanding Nginx Server and Location Block Selection Algorithms - https://goo.gl/YyzshP)
server {