Beispiel #1
0
	def import_outline_feed( self, data, parent = None ):
		try:
			feed = Feed.objects.get( xmlUrl = data['xmlUrl'] )
		except Feed.DoesNotExist:
			feed = Feed( title = data['title'], xmlUrl = data['xmlUrl'], htmlUrl = data['htmlUrl'] )
			feed.save()
			self.feeds += 1
		try:
			outline = Outline.objects.get( feed = feed, user = self.user )
		except Outline.DoesNotExist:		
			outline = Outline( user = self.user, parent = parent, title = data['title'], feed = feed )
			outline.save()
			self.outlines += 1
Beispiel #2
0
 def addNewFeed(uId, pFeedName, pFeedUrl):
     newFeed = Feed(userId=uId, name=pFeedName, url=pFeedUrl)
     newFeed.save()