def contents_rikeripsumBuild(self, **kwargs): """ Populate the contents with default noise. :return: """ paragraphs = 1 for key, val in kwargs.iteritems(): if key == 'paragraphs': paragraphs = int(val) str_p = '' for loop in range(0, paragraphs): str_p += rikeripsum.generate_paragraph() str_p += "\n" c = self.contents c.cd('/') c.touch('body', str_p) c.touch('REST', self.d_REST)
def contents_rikeripsumBuild(self, **kwargs): """ Populate the contents with default noise. :return: """ paragraphs = 1 for key,val in kwargs.iteritems(): if key == 'paragraphs': paragraphs = int(val) str_p = '' for loop in range(0, paragraphs): str_p += rikeripsum.generate_paragraph() str_p += "\n" c = self.contents c.cd('/') c.touch('body', str_p) c.touch('REST', self.d_REST)
def contents_rikeripsumBuild(self, **kwargs): """ Populate the contents with default noise. :return: """ conversations = 1 for key,val in kwargs.iteritems(): if key == 'conversations': conversations = int(val) c = self.contents c.cd('/') for loop in range(0, conversations): now = datetime.datetime.today() timeStamp = now.strftime('%Y-%m-%d_%H:%M') c.mkcd(str(loop)) c.touch('timestamp', timeStamp) c.touch('fullname', names.get_full_name()) c.touch('comment', rikeripsum.generate_paragraph()) c.touch('REST', self.d_REST) c.cd('../')
def contents_rikeripsumBuild(self, **kwargs): """ Populate the contents with default noise. :return: """ conversations = 1 for key, val in kwargs.iteritems(): if key == 'conversations': conversations = int(val) c = self.contents c.cd('/') for loop in range(0, conversations): now = datetime.datetime.today() timeStamp = now.strftime('%Y-%m-%d_%H:%M') c.mkcd(str(loop)) c.touch('timestamp', timeStamp) c.touch('fullname', names.get_full_name()) c.touch('comment', rikeripsum.generate_paragraph()) c.touch('REST', self.d_REST) c.cd('../')
def create_index(request): ipsum = rikeripsum.generate_paragraph() if request.is_ajax(): return HttpResponse(ipsum) context = {"ipsum": ipsum} return render(request, "index.html", context)
def create_ipsum(request): ipsum = rikeripsum.generate_paragraph() if request.is_ajax(): return HttpResponse(ipsum) return HttpResponse(ipsum)
def riker(request): ret = rikeripsum.generate_paragraph() response = HttpResponse(ret, content_type='text/plain') response['Access-Control-Allow-Origin'] = '*' return response