Commit a0125d89 authored by lizonr1's avatar lizonr1

Change name of sample places

parent 77925c32
...@@ -10,11 +10,10 @@ class Command(BaseCommand): ...@@ -10,11 +10,10 @@ class Command(BaseCommand):
places = [ places = [
#['name', 'type', 'screen_img', 'logo_img', 'description', 'offer', 'promotions'], #['name', 'type', 'screen_img', 'logo_img', 'description', 'offer', 'promotions'],
['Kocia Kawiarnia', 'Cafeteria', '/static/media/img/photo_1.jpg', '/static/media/img/photo_1.jpg', 'description', None, None], ['Kocia Kawiarnia', 'Cafeteria', '/static/media/img/photo_1.jpg', '/static/media/img/photo_1.jpg', 'description', None, None],
['Kocia Kawiarnia2', 'Cafeteria', '/static/media/img/photo_1.jpg', '/static/media/img/photo_1.jpg', 'description', None, None], ['Kafcia u Olczaka', 'Cafeteria', '/static/media/img/photo_1.jpg', '/static/media/img/photo_1.jpg', 'description', None, None],
] ]
print("Creating Places") print("Creating Places")
for place in places: for place in places:
print('Create {0}'.format(place[0])) print('Create {0}'.format(place[0]))
print(place)
new_place = Place.objects.create(name=place[0], type=place[1], screen_img=place[2], logo_img=place[3], description=place[4], offer=place[5], promotions = place[6]) new_place = Place.objects.create(name=place[0], type=place[1], screen_img=place[2], logo_img=place[3], description=place[4], offer=place[5], promotions = place[6])
new_place.save() new_place.save()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment