summaryrefslogtreecommitdiff
path: root/fossee_manim
diff options
context:
space:
mode:
Diffstat (limited to 'fossee_manim')
-rw-r--r--fossee_manim/forms.py2
-rw-r--r--fossee_manim/templates/fossee_manim/base.html1
-rw-r--r--fossee_manim/templates/fossee_manim/how_to.html21
-rw-r--r--fossee_manim/templates/fossee_manim/video.html22
-rw-r--r--fossee_manim/urls.py1
-rw-r--r--fossee_manim/views.py15
6 files changed, 55 insertions, 7 deletions
diff --git a/fossee_manim/forms.py b/fossee_manim/forms.py
index 72e5c83..7543935 100644
--- a/fossee_manim/forms.py
+++ b/fossee_manim/forms.py
@@ -258,8 +258,6 @@ class CommentForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(CommentForm, self).__init__(*args, **kwargs)
self.fields['comment'].label = ""
- self.fields['comment'].widget.attrs['rows'] = 5
- self.fields['comment'].widget.attrs['cols'] = 95
class Meta:
model = Comment
diff --git a/fossee_manim/templates/fossee_manim/base.html b/fossee_manim/templates/fossee_manim/base.html
index 3fdd977..1a4945d 100644
--- a/fossee_manim/templates/fossee_manim/base.html
+++ b/fossee_manim/templates/fossee_manim/base.html
@@ -60,6 +60,7 @@
</a>
{% if request.user.profile.position == 'contributor' %}
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
+ <a class="dropdown-item" href="{% url 'how_to' %}">How To</a>
<a class="dropdown-item" href="{% url 'send_proposal' %}">Send Proposal</a>
<a class="dropdown-item" href="{% url 'proposal_status' %}">Proposal Status</a>
<a class="dropdown-item" href="{% url 'view_profile' %}">View Profile</a>
diff --git a/fossee_manim/templates/fossee_manim/how_to.html b/fossee_manim/templates/fossee_manim/how_to.html
new file mode 100644
index 0000000..830bdff
--- /dev/null
+++ b/fossee_manim/templates/fossee_manim/how_to.html
@@ -0,0 +1,21 @@
+{% extends 'fossee_manim/base.html' %}
+
+ {% block title %}
+ FOSSEE Animation
+ {% endblock %}
+
+{% block content %}
+ <div class="container-fluid">
+ <br>
+ <h1>How to contribute</h1>
+ <ul>
+ <li><a class="nav-link" href="{% url 'register' %}">Register</a></li>
+ <li><a class="nav-link" href="https://purusharthsaxena.wordpress.com/getting-started-with-manim/" target="_blank">Visit here to know about manim(python based animation library)</a></li>
+ <li>Send proposal for a topic</li>
+ <li>Wait for the reviewer to respond</li>
+ <li>Upload animation video</li>
+ <li>Once approved, video will be released</li>
+ <li>Get Honorarium</li>
+ </ul>
+ </div>
+{% endblock %} \ No newline at end of file
diff --git a/fossee_manim/templates/fossee_manim/video.html b/fossee_manim/templates/fossee_manim/video.html
index fa09010..b94a34e 100644
--- a/fossee_manim/templates/fossee_manim/video.html
+++ b/fossee_manim/templates/fossee_manim/video.html
@@ -34,8 +34,28 @@
<br>
</div>
</div>
+ <hr>
+ <div class="row">
+ <div class="col-md-4">
+ <a href="{% url 'video' reco.0.id %}" >
+ <span class="fa fa-play fa-4x" id="play-btn"></span>
+ <img height="95%" width="95%" src="{{ reco.0.thumbnail.url }}">
+ </a>
+ </div>
+ <div class="col-md-4">
+ <a href="{% url 'video' reco.1.id %}" >
+ <span class="fa fa-play fa-4x" id="play-btn"></span>
+ <img height="95%" width="95%" src="{{ reco.1.thumbnail.url }}">
+ </a>
+ </div>
+ <div class="col-md-4">
+ <a href="{% url 'video' reco.2.id %}" >
+ <span class="fa fa-play fa-4x" id="play-btn"></span>
+ <img height="95%" width="95%" src="{{ reco.2.thumbnail.url }}">
+ </a>
+ </div>
+ </div>
<div>
- <hr>
<br> <br>
<h2>Comments</h2>
<div>
diff --git a/fossee_manim/urls.py b/fossee_manim/urls.py
index 278dee2..6181b67 100644
--- a/fossee_manim/urls.py
+++ b/fossee_manim/urls.py
@@ -18,6 +18,7 @@ urlpatterns = [
name='upload_animation'),
url(r'^proposal_status/$', views.proposal_status, name='proposal_status'),
url(r'^search/$', views.search, name='search'),
+ url(r'^how_to/$', views.how_to, name='how_to'),
url(r'^view_profile/$', views.view_profile, name='view_profile'),
url(r'^edit_profile/$', views.edit_profile, name='edit_profile'),
url(r'^video/([1-9][0-9]*)$', views.video, name='video'),
diff --git a/fossee_manim/views.py b/fossee_manim/views.py
index 93a1763..44f20c1 100644
--- a/fossee_manim/views.py
+++ b/fossee_manim/views.py
@@ -23,6 +23,7 @@ from django.db.models import F, Subquery, OuterRef, Q
from zipfile import ZipFile
from textwrap import dedent
from requests import get
+from random import sample
from .send_mails import send_email
import datetime as dt
import shutil
@@ -112,7 +113,7 @@ def user_login(request):
login(request, user)
if user.groups.filter(name='reviewer').count() > 0:
return redirect('/view_profile/')
- return redirect('/view_profile/')
+ return redirect('/how_to/')
else:
return render(request, 'fossee_manim/login.html', {"form": form})
else:
@@ -460,12 +461,14 @@ def video(request, aid=None):
else:
return redirect('/view_profile/')
-
-
+ if len(suggestion_list)>3:
+ suggestion_list = sample(suggestion_list, 3)
+ else:
+ suggestion_list = [x for x in anim_list if x.id != int(aid)][:3]
categories = Category.objects.all()
return render(request, 'fossee_manim/video.html',
{'video': video, 'categories': categories,
- 'suggestion_list': suggestion_list,
+ 'reco': suggestion_list,
"comment_form": comment_form,
'comments': comments})
@@ -478,3 +481,7 @@ def search_category(request, cat=None):
return render(request, 'fossee_manim/categorical_list.html',
{'categorial_list': cat_video_list, 'categories': categories
})
+
+
+def how_to(request):
+ return render(request, 'fossee_manim/how_to.html') \ No newline at end of file