diff options
author | Akshen | 2019-05-14 11:52:21 +0530 |
---|---|---|
committer | Akshen | 2019-05-14 11:52:21 +0530 |
commit | df1bca4647a456291851c596c39dc96a438913de (patch) | |
tree | fd8fe45f02917aeeb6331bfeb8e1fce7b50721a7 /fossee_manim | |
parent | 8543fed00c912877375b0835b63c765baed654e2 (diff) | |
download | FOSSEE_animations-df1bca4647a456291851c596c39dc96a438913de.tar.gz FOSSEE_animations-df1bca4647a456291851c596c39dc96a438913de.tar.bz2 FOSSEE_animations-df1bca4647a456291851c596c39dc96a438913de.zip |
Proposal Updates
- Testcases changed
- send_proposal function changed
- models changed
Diffstat (limited to 'fossee_manim')
-rw-r--r-- | fossee_manim/models.py | 2 | ||||
-rw-r--r-- | fossee_manim/tests/test_models.py | 8 | ||||
-rw-r--r-- | fossee_manim/tests/test_views.py | 2 | ||||
-rw-r--r-- | fossee_manim/views.py | 10 |
4 files changed, 9 insertions, 13 deletions
diff --git a/fossee_manim/models.py b/fossee_manim/models.py index c689f66..dbd089b 100644 --- a/fossee_manim/models.py +++ b/fossee_manim/models.py @@ -167,7 +167,7 @@ class Animation(models.Model): outline = models.TextField() status = models.CharField(max_length=255, choices=status) category = models.ForeignKey(Category, on_delete=models.CASCADE) - subcategory = models.CharField(max_length=255) + subcategory = models.CharField(max_length=255, blank=True) created = models.DateTimeField(default=timezone.now) tags = TaggableManager() history = HistoricalRecords() diff --git a/fossee_manim/tests/test_models.py b/fossee_manim/tests/test_models.py index 8b2162c..ab74123 100644 --- a/fossee_manim/tests/test_models.py +++ b/fossee_manim/tests/test_models.py @@ -26,7 +26,7 @@ def setUpModule(): category1 = Category.objects.create(name='Math', description='Mathematics') reviewer_profile = Profile.objects.create(user=testUser2, position='reviewer', - department='computer engineering', institute='ace', phone_number='1122334456', + department='computer science', institute='ace', phone_number='1122334456', title='Doctor', how_did_you_hear_about_us='Google', location='powai', state='IN-MH', is_email_verified=1) @@ -55,7 +55,7 @@ class ProfileModelTest(TestCase): self.demouser1 = User.objects.get(username='demouser1') self.reviewer_profile1 = Profile.objects.create(user=self.testuser1, - position='reviewer', department='computer engineering', + position='reviewer', department='computer science', institute='ace', phone_number='1123323344', title='Doctor', how_did_you_hear_about_us='Google', location='powai', state='IN-MH', is_email_verified=1) @@ -98,7 +98,7 @@ class AnimationModelTest(TestCase): email='test.user@gmail.com', password='pass@123') self.category1 = Category.objects.create(name='Biology', description='study of nature') self.animation1 = Animation.objects.create(title='Testing Anime', contributor=self.demoUser2, - reviewer=self.testUser2, description='This is test animation upload', github='https://github.come/FOSSEE', + reviewer=self.testUser2, outline='This is test animation upload', category=self.category1) def test_animation_model(self): @@ -114,7 +114,7 @@ class CommentModelTest(TestCase): email='test.user@gmail.com', password='pass@123') self.category1 = Category.objects.create(name='Biology', description='study of nature') self.animation1 = Animation.objects.create(title='Testing Anime', contributor=self.demoUser2, - reviewer=self.testUser2, description='This is test animation upload', github='https://github.come/FOSSEE', + reviewer=self.testUser2, outline='This is test animation upload', category=self.category1) self.comment1 = Comment.objects.create(comment='This is a comment', commentor=self.testUser2, animation=self.animation1, animation_status='changes') diff --git a/fossee_manim/tests/test_views.py b/fossee_manim/tests/test_views.py index 4d77bfe..525bd30 100644 --- a/fossee_manim/tests/test_views.py +++ b/fossee_manim/tests/test_views.py @@ -28,7 +28,7 @@ class TestProfile(TestCase): self.user2_profile = Profile.objects.create( user=self.user2, - department='Computer Engineering', + department='Computer Science', institute='ace', title='Doctor', position='instructor', diff --git a/fossee_manim/views.py b/fossee_manim/views.py index feaad67..feb23de 100644 --- a/fossee_manim/views.py +++ b/fossee_manim/views.py @@ -282,13 +282,9 @@ def send_proposal(request): form_data = form.save(commit=False) form_data.contributor = user form_data.status = "pending" - if check_repo(form_data.github): - form_data.save() - form.save_m2m() - # makepath(form_data) - else: - messages.warning(request, 'Please enter valid github details') - return render(request, 'fossee_manim/send_proposal.html', + form.save() + else: + return render(request, 'fossee_manim/send_proposal.html', {'form': form, 'categories': categories}) return redirect('/proposal_status/') else: |