Last active
March 9, 2017 10:29
-
-
Save rightx2/6a04fcd897f1d70a1431223decae27f9 to your computer and use it in GitHub Desktop.
Revisions
-
rightx2 revised this gist
Mar 9, 2017 . 1 changed file with 7 additions and 13 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -16,14 +16,8 @@ import os from django.core.files import File image1 = File(open('/Users/Chois/Desktop/1555555.jpeg', 'rb')) image2 = File(open('/Users/Chois/Desktop/1666666.jpeg', 'rb')) single_option = Option.objects.last() black_option = Option.objects.filter(name="black").first() @@ -32,11 +26,11 @@ name = 'namasasdfdfe' + str(i) product = Product.objects.create( name=name, ) product.tag_set.add( Tag.objects.first() ) product.variation_set.create( option=black_option, draft_image=image1, @@ -46,4 +40,4 @@ option=single_option, draft_image=image2, applied_image=image1 ) -
rightx2 revised this gist
Dec 5, 2016 . 1 changed file with 38 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,4 +9,41 @@ ) a.portfolioimage_set.create( image=p ) import os from django.core.files import File image1 = File(open('/home/ubuntu/1555555.jpeg', 'rb')) image2 = File(open('/home/ubuntu/1666666.jpeg', 'rb')) place_category = PlaceCategory.objects.first() sale = Sale.objects.first() subject_category1 = SubjectCategory.objects.first() subject_category2 = SubjectCategory.objects.last() single_option = Option.objects.last() black_option = Option.objects.filter(name="black").first() for i in range(8): name = 'namasasdfdfe' + str(i) product = Product.objects.create( name=name, place_category=place_category, sale=sale, ) product.subject_category_set.add(subject_category1) product.subject_category_set.add(subject_category2) product.variation_set.create( option=black_option, draft_image=image1, applied_image=image2 ) product.variation_set.create( option=single_option, draft_image=image2, applied_image=image1 ) -
rightx2 revised this gist
Dec 2, 2016 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ import os from django.core.files import File p = File(open('/Users/Chois/Desktop/1555555.jpeg', 'rb')) PortfolioImage.objects.create(portfolio=Portfolio.objects.first(), image=p) for i in range(49): a = Portfolio.objects.create( name=str(i) ) -
rightx2 revised this gist
Nov 30, 2016 . 1 changed file with 9 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,12 @@ >> import os >> from django.core.files import File >> p = File(open('/Users/Chois/Desktop/1555555.jpeg', 'rb')) >> PortfolioImage.objects.create(portfolio=Portfolio.objects.first(), image=p) for i in range(20): a = Portfolio.objects.create( name=str(i) ) a.portfolioimage_set.create( image=p ) -
rightx2 created this gist
Nov 28, 2016 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ >> import os >> from django.core.files import File >> p = File(open('/Users/Chois/Desktop/1555555.jpeg', 'rb')) >> PortfolioImage.objects.create(portfolio=Portfolio.objects.first(), image=p)