Beispiel #1
0
def Create(request):

    wdbitem = hmod.WardrobeItem()
    wdbitem.name = ''
    wdbitem.note = ''
    wdbitem.start_year = None
    wdbitem.pattern = ''
    wdbitem.gender = ''
    wdbitem.color = ''
    wdbitem.end_year = None
    wdbitem.size = ''
    wdbitem.size_modifier = ''
    wdbitem.value = None
    wdbitem.standard_rental_value = None
    wdbitem.is_rentable = True
    wdbitem.save()

    return HttpResponseRedirect('/Store/WardrobeItem.edit/{}/'.format(wdbitem.id))
Beispiel #2
0
u.is_superuser = False
u.email = '*****@*****.**'
u.save()

g = Group.objects.get(name="GuestGroup")
g.user_set.add(u)

for data in [
    ['Colonial Breeches', 25.50, 'Standard colonial pants for the time period', 12.50, True, 'Runs large', 'LG', 'M',
     'Blue', 'checkered', 'This item is extremely valuable', 1875, 1890, True],
    ['Colonial Shirt', 10.00, 'Standard colonial shirt for the time period', 4.00, True, 'Runs small', 'M', 'F',
     'Green', '', '', 1875, 1890, True],
    ['Colonial Stockings', 5.00, '', 1.00, True, 'Gove wore these so now they run HUGE', 'LG', 'M',
     'Red and White', '', '', 1600, 2015, False],
]:
    wdbItem = hmod.WardrobeItem()
    wdbItem.name = data[0]
    wdbItem.value = data[1]
    wdbItem.description = data[2]
    wdbItem.standard_rental_value = data[3]
    wdbItem.is_rentable = data[4]
    wdbItem.size_modifier = data[5]
    wdbItem.size = data[6]
    wdbItem.gender = data[7]
    wdbItem.color = data[8]
    wdbItem.pattern = data[9]
    wdbItem.note = data[10]
    wdbItem.start_year = data[11]
    wdbItem.end_year = data[12]
    wdbItem.is_available_for_rental = data[13]
    wdbItem.save()
Beispiel #3
0
    ["coat", "brown, long coat", "50", "25"],
    ["skit", "full length", "75", "60"],
]:
    r = hmod.Item()
    r.name = data[0]
    r.description = data[1]
    r.value = data[2]
    r.standardPrice = data[3]
    r.save()

# create Wardrobe items
for data in [
    ["34", "none", "M", "Brown", "None", "1830", "1850"],
    ["6", "none", "F", "Brown", "None", "1830", "1850"],
]:
    r = hmod.WardrobeItem()
    r.size = data[0]
    r.sizeMod = data[1]
    r.gender = data[2]
    r.color = data[3]
    r.pattern = data[4]
    r.startYear = data[5]
    r.endYear = data[6]
    r.save()

# create Event
for data in [
    ["2016-03-14", "2016-03-16", "Kiwana", "Party"],
    ["2016-04-06", "2016-04-09", "Park", "Colonial"],
]:
    r = hmod.Event()