Beispiel #1
0
 def get_form(self, *args, **kwargs):
     fusion = Fusion()
     fusion.then = Image.objects.get(id=self.kwargs.get('thenid'))
     #pylint: disable-msg=E1101
     flickrid = self.kwargs.get('flickrid')
     now = imagefromflickrid(flickrid, self.request.user)
     fusion.now = now
     fusion.user = self.request.user
     self.object = fusion
     form = super(FusionCreateView, self).get_form(*args, **kwargs)
     return form
Beispiel #2
0
 def get_form(self, *args, **kwargs):
     fusion = Fusion()
     fusion.then = Image.objects.get(id=self.kwargs.get('thenid'))
     #pylint: disable-msg=E1101
     flickrid = self.kwargs.get('flickrid')
     now = imagefromflickrid(flickrid, self.request.user)
     fusion.now = now
     fusion.user = self.request.user
     self.object = fusion
     form = super(FusionCreateView, self).get_form(*args, **kwargs)
     return form
Beispiel #3
0
 def test_empty_point_list(self):
     """Tests that point_list returns a valid list of lists"""
     fusion = Fusion()
     fusion.points = ""
     self.failUnlessEqual(fusion.point_list(), [])
Beispiel #4
0
 def test_point_list(self):
     """Tests that point_list returns a valid list of lists"""
     fusion = Fusion()
     fusion.points = "1,2,3,4,5,6,7,8"
     self.failUnlessEqual(fusion.point_list(), [[1,2,3,4],[5,6,7,8]])
Beispiel #5
0
 def test_empty_point_list(self):
     """Tests that point_list returns a valid list of lists"""
     fusion = Fusion()
     fusion.points = ""
     self.failUnlessEqual(fusion.point_list(), [])
Beispiel #6
0
 def test_point_list(self):
     """Tests that point_list returns a valid list of lists"""
     fusion = Fusion()
     fusion.points = "1,2,3,4,5,6,7,8"
     self.failUnlessEqual(fusion.point_list(), [[1, 2, 3, 4], [5, 6, 7, 8]])