summaryrefslogtreecommitdiff
path: root/fossee_manim
diff options
context:
space:
mode:
Diffstat (limited to 'fossee_manim')
-rw-r--r--fossee_manim/forms.py13
-rw-r--r--fossee_manim/models.py5
-rw-r--r--fossee_manim/urls.py3
-rw-r--r--fossee_manim/views.py17
4 files changed, 24 insertions, 14 deletions
diff --git a/fossee_manim/forms.py b/fossee_manim/forms.py
index 7dfdc77..69f8458 100644
--- a/fossee_manim/forms.py
+++ b/fossee_manim/forms.py
@@ -250,9 +250,16 @@ class AnimationProposal(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(AnimationProposal, self).__init__(*args, **kwargs)
self.fields['subcategory'].widget.attrs['placeholder'] = 'Eg: Quantum Mechanics, Topology'
- self.fields['outline'].widget.attrs['placeholder'] = 'NOTE:-Do\
- add info about prerequisites (if any), possible textbooks and \
- any other related information'
+ # self.fields['outline'].widget.attrs['placeholder'] = 'NOTE: Do\
+ # add info about prerequisites (if any), possible textbooks and \
+ # any other related information'
+ self.fields['outline'].widget.attrs={
+ 'id': 'custom_editor',
+ 'rows': 10,
+ 'cols': 50,
+ 'placeholder': ('NOTE: Do add info about prerequisites (if any), possible textbooks and '
+ 'any other related information')
+ }
class Meta:
model = Animation
diff --git a/fossee_manim/models.py b/fossee_manim/models.py
index e2ff72c..273ebe6 100644
--- a/fossee_manim/models.py
+++ b/fossee_manim/models.py
@@ -10,7 +10,6 @@ from os import path, sep
import tempfile
import subprocess
-
position_choices = (
("contributor", "Contributor"),
("reviewer", "Reviewer")
@@ -220,7 +219,7 @@ class AnimationStats(models.Model):
# some Django-specific additions
django_file = File(que_file)
self.thumbnail.save(file_name, django_file, save=True)
-
+
def _create_ogv(self):
video_input = self.video_path.path
vid_output = path.join(
@@ -233,4 +232,4 @@ class AnimationStats(models.Model):
# Converting to Python file object with
# some Django-specific additions
django_file = File(que_file)
- self.video_path.save(file_name, django_file, save=True) \ No newline at end of file
+ self.video_path.save(file_name, django_file, save=True)
diff --git a/fossee_manim/urls.py b/fossee_manim/urls.py
index 6d24111..c41dd11 100644
--- a/fossee_manim/urls.py
+++ b/fossee_manim/urls.py
@@ -25,7 +25,8 @@ urlpatterns = [
url(r'^honorarium/$', views.honorarium, name='honorarium'),
url(r'^faqs/$', views.faqs, name='faqs'),
url(r'^search_category/(?P<cat>.+)$', views.search_category,
- name='search_category')
+ name='search_category'),
+ url(r'^about/$',views.about, name='about'),
]
urlpatterns += static(
diff --git a/fossee_manim/views.py b/fossee_manim/views.py
index a0d0c22..06c7b3b 100644
--- a/fossee_manim/views.py
+++ b/fossee_manim/views.py
@@ -35,7 +35,7 @@ except ImportError:
__author__ = "Akshen Doke"
__credits__ = ["Prabhu Ramachandran", "Aditya P.", "KhushalSingh Rajput",
- "Prathamesh Salunke", "Purusharth Saxsena", "Sharanya Achut"
+ "Prathamesh Salunke", "Purusharth Saxsena", "Sharanya Achut", "Ankit Javalkar"
]
def makepath(proposal_data, reject=None):
@@ -88,7 +88,7 @@ def index(request):
def is_reviewer(user):
- '''Check if the user is having reviewer rights'''
+ '''Check if the user has reviewer rights'''
return user.groups.filter(name='reviewer').exists()
@@ -304,7 +304,7 @@ def proposal_status(request):
anime = Animation.objects.filter(contributor_id=user).order_by('-created')
else:
anime_list = Animation.objects.order_by('-created')
-
+
# Show upto 9 proposals per page
paginator_c = Paginator(list(anime), 9)
paginator_r = Paginator(list(anime_list), 9)
@@ -429,7 +429,7 @@ def search(request):
Q(animation__title__contains=word) | Q(animation__outline__contains=word)
| Q(animation__category__name__contains=word) | Q(animation__subcategory__contains=word),
animation__status='released')
-
+
return render(request, 'fossee_manim/search_results.html',
{'s_result': anime_list, 'categories': categories})
@@ -499,7 +499,7 @@ def video(request, aid=None):
return redirect('/login/')
else:
return redirect('/view_profile/')
-
+
if len(suggestion_list)>3:
suggestion_list = sample(suggestion_list, 3)
else:
@@ -525,7 +525,10 @@ def search_category(request, cat=None):
def guidelines(request):
categories = Category.objects.all()
return render(request, 'fossee_manim/guidelines.html', {'categories': categories})
-
+
+def about(request):
+ categories = Category.objects.all()
+ return render(request, 'fossee_manim/about.html', {'categories': categories})
def honorarium(request):
categories = Category.objects.all()
@@ -533,4 +536,4 @@ def honorarium(request):
def faqs(request):
categories = Category.objects.all()
- return render(request, 'fossee_manim/faqs.html', {'categories': categories}) \ No newline at end of file
+ return render(request, 'fossee_manim/faqs.html', {'categories': categories})