random shuffle
This commit is contained in:
parent
424ce56ac6
commit
af72b86197
@ -5,6 +5,7 @@ from datetime import date, datetime
|
|||||||
import json
|
import json
|
||||||
import glob
|
import glob
|
||||||
import PIL.Image
|
import PIL.Image
|
||||||
|
import random
|
||||||
|
|
||||||
from .models import User, ALKATOR_CHOICES_DICT
|
from .models import User, ALKATOR_CHOICES_DICT
|
||||||
|
|
||||||
@ -66,6 +67,7 @@ def results(request):
|
|||||||
def photos(request):
|
def photos(request):
|
||||||
files = glob.glob("photos/*.jpg")
|
files = glob.glob("photos/*.jpg")
|
||||||
rtn = []
|
rtn = []
|
||||||
|
random.shuffle(files)
|
||||||
for file in files:
|
for file in files:
|
||||||
img = PIL.Image.open(file)
|
img = PIL.Image.open(file)
|
||||||
rtn.append({
|
rtn.append({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user