예제 #1
0
파일: views.py 프로젝트: deepak02/xyz_gpod
    def get(self, request):

        return render(
            request,
            'carousel.html',
            {
                # evaluated lazyly, cached by template
                'topics': Topics(),
            })
예제 #2
0
    def get(self, request):

        return render(request, 'directory.html', {

            # evaluated lazyly, cached by template
            'topics': Topics(),
            'podcastlists': self.get_random_list(),
            'random_podcast': Podcast.objects.all().random().first(),
            })
예제 #3
0
    def get(self, request):

        return render(
            request,
            "carousel.html",
            {
                # evaluated lazyly, cached by template
                "topics": Topics()
            },
        )
예제 #4
0
    def get(self, request):

        return render(
            request,
            "directory.html",
            {
                # evaluated lazyly, cached by template
                "topics": Topics(),
                "podcastlists": self.get_random_list(),
                "random_podcast": Podcast.objects.all().random().first(),
                "podcast_ad": Podcast.objects.get_advertised_podcast(),
            },
        )
예제 #5
0
def top_tags(request, count):
    count = parse_range(count, 1, 100, 100)
    tag_cloud = Topics(count, num_cat=0)
    resp = list(map(category_data, tag_cloud.tagcloud))
    return JsonResponse(resp)