Django
-
Django ajax 좋아요 구현Django 2021. 1. 22. 14:13
models.py from django.db import models from django.urls import reverse from taggit.managers import TaggableManager from django.contrib.auth.models import User from django.utils.text import slugify from tinymce.models import HTMLField from django.conf import settings from user.models import Profile class RecipeContent(models.Model): Rec_conId = models.AutoField(primary_key = True) # 글번호 Rec_conNa..
-
youtube API를 통해 동영상 검색하고, 검색 결과 TinyMCE 삽입하기Django 2021. 1. 22. 14:03
youtube API TinyMCE insert, upload youtubecontent_form.html tinymce.init({ selector: 'textarea', height: 320, theme: 'modern', plugins: [ 'advlist autolink lists link image charmap print preview hr anchor pagebreak', 'searchreplace wordcount visualblocks visualchars code fullscreen', 'insertdatetime media nonbreaking save table contextmenu directionality', 'emoticons template paste te..
-
한 뷰 안에 여러개의 페이지네이션 구현Django 2021. 1. 22. 13:57
참고 http://www.shanegibney.com/shanegibney/django-multiple-pagination-in-a-single-template/ view.py class RecipeLV(ListView): context_object_name = 'recipe_list' def get(self, request, *args, **kwargs): queryset = RecipeContent.objects.all() queryset2 = YoutubeContent.objects.all() paginator = Paginator(queryset, 3) page = request.GET.get('page1', 1) try: rooms = paginator.page(page) except PageN..
-
TinyMCE 사진 넣기/업로드Django 2021. 1. 21. 19:16
TinyMCE photo upload recipecontent_form.html tinymce.init({ selector: "textarea", theme: "modern", height: 500, paste_data_images: true, plugins: [ "advlist autolink lists link image charmap print preview hr anchor pagebreak", "searchreplace wordcount visualblocks visualchars code fullscreen", "insertdatetime media nonbreaking save table contextmenu directionality", "emoticons templat..