Example #1
0
    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)
Example #2
0
    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)
Example #3
0
    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('../')
Example #4
0
    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('../')
Example #5
0
def create_index(request):
    ipsum = rikeripsum.generate_paragraph()
    if request.is_ajax():
        return HttpResponse(ipsum)
    context = {"ipsum": ipsum}
    return render(request, "index.html", context)
Example #6
0
def create_ipsum(request):
    ipsum = rikeripsum.generate_paragraph()
    if request.is_ajax():
        return HttpResponse(ipsum)
    return HttpResponse(ipsum)
Example #7
0
def riker(request):
    ret = rikeripsum.generate_paragraph()
    response = HttpResponse(ret, content_type='text/plain')
    response['Access-Control-Allow-Origin'] = '*'
    return response