|
2 | 2 | from nlpFiles.getTextFromWeb import polarityRating, highRatedSent
|
3 | 3 | from .forms import SubmitLinkForm
|
4 | 4 |
|
5 |
| -def submitLink(request): |
6 |
| - if request.method == 'POST': |
7 |
| - form = SubmitLinkForm(request.POST) |
8 |
| - if form.is_valid(): |
9 |
| - link_object = form.save() # This saves the link to the database |
10 |
| - thisVar = link_object.link # Access the link and store it in thisVar |
11 |
| - # You can now use thisVar for other Python code |
12 |
| - paragraph = [] |
13 |
| - polarityRating(paragraph, thisVar) |
14 |
| - highValuedList = highRatedSent(paragraph) |
15 |
| - # Redirect or render a success page |
16 |
| - return render(request, 'successPage.html', {'thisVar': paragraph, "highValuedList": highValuedList}) |
17 |
| - else: |
18 |
| - form = SubmitLinkForm() |
| 5 | +# def submitLink(request): |
| 6 | +# if request.method == 'POST': |
| 7 | +# form = SubmitLinkForm(request.POST) |
| 8 | +# if form.is_valid(): |
| 9 | +# link_object = form.save() # This saves the link to the database |
| 10 | +# thisVar = link_object.link # Access the link and store it in thisVar |
| 11 | +# # You can now use thisVar for other Python code |
| 12 | +# paragraph = [] |
| 13 | +# polarityRating(paragraph, thisVar) |
| 14 | +# highValuedList = highRatedSent(paragraph) |
| 15 | +# # Redirect or render a success page |
| 16 | +# return render(request, 'successPage.html', {'thisVar': paragraph, "highValuedList": highValuedList}) |
| 17 | +# else: |
| 18 | +# form = SubmitLinkForm() |
19 | 19 |
|
20 |
| - return render(request, 'submitLink.html', {'form': form}) |
| 20 | +# return render(request, 'submitLink.html', {'form': form}) |
21 | 21 |
|
22 | 22 | def aboutus(request):
|
23 | 23 | return render(request, 'aboutus.html')
|
|
0 commit comments