from .models import Place
from django.contrib.gis.geos import Point
import random

min_x = -74.8
max_x = -75.2
min_y = 39.7
max_y = 40.2

objects = [
    "CD",
    "Christmas ornament",
    "acorn",
    "apple",
    "bag",
    "bag of cotton balls",
    "bag of popcorn",
    "bag of rubber bands",
    "ball of yarn",
    "balloon",
    "banana",
    "bananas",
    "bandana",
    "bangle bracelet",
    "bar of soap",
    "baseball",
    "baseball bat",
    "baseball hat",
    "basketball",
    "beaded bracelet",
    "beaded necklace",
    "bed",
    "beef",
    "bell",
    "belt",
    "blouse",
    "blowdryer",
    "bonesaw",
    "book",
    "book of jokes",
    "book of matches",
    "bookmark",
    "boom box",
    "bottle",
    "bottle cap",
    "bottle of glue",
    "bottle of honey",
    "bottle of ink",
    "bottle of lotion",
    "bottle of nail polish",
    "bottle of oil",
    "bottle of paint",
    "bottle of perfume",
    "bottle of pills",
    "bottle of soda",
    "bottle of sunscreen",
    "bottle of syrup",
    "bottle of water",
    "bouquet of flowers",
    "bow",
    "bow tie",
    "bowl",
    "box",
    "box of Q-tips",
    "box of baking soda",
    "box of chalk",
    "box of chocolates",
    "box of crayons",
    "box of markers",
    "box of tissues",
    "bracelet",
    "bread",
    "broccoli",
    "brush",
    "buckle",
    "butter knife",
    "button",
    "camera",
    "can of beans",
    "can of chili",
    "can of peas",
    "can of whipped cream",
    "candle",
    "candlestick",
    "candy bar",
    "candy cane",
    "candy wrapper",
    "canteen",
    "canvas",
    "car",
    "card",
    "carrot",
    "carrots",
    "cars",
    "carton of ice cream",
    "cat",
    "catalogue",
    "cell phone",
    "cellphone",
    "cement stone",
    "chain",
    "chair",
    "chalk",
    "chapter book",
    "check book",
    "chenille stick",
    "chicken",
    "children's book",
    "chocolate",
    "class ring",
    "clay pot",
    "clock",
    "clothes",
    "clothes pin",
    "coffee mug",
    "coffee pot",
    "comb",
    "comic book",
    "computer",
    "conditioner",
    "container of pudding",
    "cookie jar",
    "cookie tin",
    "cork",
    "couch",
    "cow",
    "cowboy hat",
    "craft book",
    "credit card",
    "crow",
    "crowbar",
    "cucumber",
    "cup",
    "dagger",
    "deodorant",
    "desk",
    "dictionary",
    "dog",
    "dolphin",
    "domino set",
    "door",
    "dove",
    "drawer",
    "drill press",
    "egg",
    "egg beater",
    "egg timer",
    "empty bottle",
    "empty jar",
    "empty tin can",
    "eraser",
    "extension cord",
    "eye liner",
    "face wash",
    "fake flowers",
    "feather",
    "feather duster",
    "few batteries",
    "fish",
    "fishing hook",
    "flag",
    "flashlight",
    "floor",
    "flowers",
    "flyswatter",
    "food",
    "football",
    "fork",
    "fridge",
    "frying pan",
    "game CD",
    "game cartridge",
    "garden spade",
    "giraffe",
    "glass",
    "glasses",
    "glow stick",
    "grid paper",
    "grocery list",
    "hair brush",
    "hair clip",
    "hair pin",
    "hair ribbon",
    "hair tie",
    "hammer",
    "hamster",
    "hand bag",
    "hand fan",
    "hand mirror",
    "handbasket",
    "handful of change",
    "handheld game system",
    "hanger",
    "harmonica",
    "helmet",
    "house",
    "ice cream stick",
    "ice cube",
    "ice pick",
    "incense holder",
    "ipod",
    "ipod charger",
    "jar of jam",
    "jar of peanut butter",
    "jar of pickles",
    "jigsaw puzzle",
    "key",
    "key chain",
    "keyboard",
    "keychain",
    "keys",
    "kitchen knife",
    "knife",
    "lace",
    "ladle",
    "lamp",
    "lamp shade",
    "laser pointer",
    "leg warmers",
    "lemon",
    "letter opener",
    "light",
    "light bulb",
    "lighter",
    "lime",
    "lion",
    "lip gloss",
    "locket",
    "lotion",
    "magazine",
    "magnet",
    "magnifying glass",
    "map",
    "marble",
    "martini glass",
    "matchbook",
    "microphone",
    "milk",
    "miniature portrait",
    "mirror",
    "mobile phone",
    "model car",
    "money",
    "monitor",
    "mop",
    "mouse pad",
    "mp3 player",
    "multitool",
    "music CD",
    "nail",
    "nail clippers",
    "nail filer",
    "necktie",
    "needle",
    "notebook",
    "notepad",
    "novel",
    "ocarina",
    "orange",
    "outlet",
    "pack of cards",
    "package of crisp and crunchy edibles",
    "package of glitter",
    "packet of seeds",
    "pail",
    "paint brush",
    "paintbrush",
    "pair of binoculars",
    "pair of dice",
    "pair of earrings",
    "pair of glasses",
    "pair of handcuffs",
    "pair of knitting needles",
    "pair of rubber gloves",
    "pair of safety goggles",
    "pair of scissors",
    "pair of socks",
    "pair of sunglasses",
    "pair of tongs",
    "pair of water goggles",
    "panda",
    "pants",
    "paper",
    "paperclip",
    "pasta strainer",
    "pearl necklace",
    "pen",
    "pencil",
    "pencil holder",
    "pepper shaker",
    "perfume",
    "phone",
    "photo album",
    "picture frame",
    "piece of gum",
    "pillow",
    "pinecone",
    "plastic fork",
    "plate",
    "plush bear",
    "plush cat",
    "plush dinosaur",
    "plush dog",
    "plush frog",
    "plush octopus",
    "plush pony",
    "plush rabbit",
    "plush unicorn",
    "pocketknife",
    "pocketwatch",
    "pool stick",
    "pop can",
    "postage stamp",
    "puddle",
    "purse",
    "purse/bag",
    "quartz crystal",
    "quilt",
    "rabbit",
    "radio",
    "rat",
    "remote",
    "rhino",
    "ring",
    "rock",
    "roll of duct tape",
    "roll of gauze",
    "roll of masking tape",
    "roll of stickers",
    "roll of toilet paper",
    "rolling pin",
    "rope",
    "rubber band",
    "rubber duck",
    "rubber stamp",
    "rug",
    "rusty nail",
    "safety pin",
    "sailboat",
    "salt shaker",
    "sand paper",
    "sandal",
    "sandglass",
    "scallop shell",
    "scarf",
    "scotch tape",
    "screw",
    "screwdriver",
    "seat belt",
    "shampoo",
    "shark",
    "sharpie",
    "shawl",
    "sheep",
    "sheet of paper",
    "shirt",
    "shirt button",
    "shoe lace",
    "shoes",
    "shopping bag",
    "shovel",
    "sidewalk",
    "sketch pad",
    "slipper",
    "small pouch",
    "snail shell",
    "snowglobe",
    "soap",
    "soccer ball",
    "socks",
    "sofa",
    "spatula",
    "speakers",
    "spectacles",
    "spice bottle",
    "sponge",
    "spool of ribbon",
    "spool of string",
    "spool of thread",
    "spool of wire",
    "spoon",
    "spring",
    "squirrel",
    "squirt gun",
    "statuette",
    "steak knife",
    "stick",
    "stick of incense",
    "sticker book",
    "sticky note",
    "stockings",
    "stop sign",
    "straw",
    "street lights",
    "sun glasses",
    "sword",
    "table",
    "tea cup",
    "tea pot",
    "teddies",
    "television",
    "tennis ball",
    "tennis racket",
    "thermometer",
    "thimble",
    "thread",
    "tiger",
    "tire swing",
    "tissue box",
    "toe ring",
    "toilet",
    "toilet paper tube",
    "tomato",
    "tooth pick",
    "toothbrush",
    "toothpaste",
    "toothpick",
    "towel",
    "toy boat",
    "toy car",
    "toy plane",
    "toy robot",
    "toy soldier",
    "toy top",
    "trash bag",
    "tree",
    "trucks",
    "tube of lip balm",
    "tube of lipstick",
    "turtle",
    "tv",
    "tweezers",
    "twister",
    "umbrella",
    "vase",
    "video games",
    "wallet",
    "washcloth",
    "washing machine",
    "watch",
    "water",
    "water bottle",
    "wedding ring",
    "whale",
    "whip",
    "whistle",
    "white out",
    "window",
    "wine glass",
    "wireless control",
    "wishbone",
    "wooden spoon",
    "word search",
    "wrench",
    "wristwatch",
    "zebra",
    "zipper"
  ]

objects_len = len(objects) - 1

def generate(n=10):
    for __ in range(n):
        first_name = objects[random.randint(0, objects_len)].capitalize()
        second_name = objects[random.randint(0, objects_len)].capitalize()
        name = f"{first_name} and the {second_name}"
        x = random.uniform(min_x, max_x)
        y = random.uniform(min_y, max_y)
        print(name, x, y)
        Place.objects.create(title=name, location=Point(x, y))