Created
January 18, 2021 18:58
-
-
Save godfather68/3ff6df4fda5f6db7019ff6b954e1cf97 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.shortcuts import render | |
from django.http import JsonResponse | |
from django.views.generic import FormView | |
from .forms import * | |
# Create your views here. | |
class HomeView(FormView): | |
form_class = UploadForm | |
template_name = 'index.html' | |
success_url = '/' | |
def form_valid(self, form): | |
upload = self.request.FILES['file'] | |
return super().form_valid(form) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment