Django Python Link Dropdown Element to Database

I am working on creating a web application that will generate a report for visiting different office locations. I have implemented the choices option in a model and placed all the different offices within the choices. One of the things we have to do is take inventory of the equipment in the office ex. computers in use, computers not in user, monitors in use, monitors not in use, etc. I am wanting to make it so that essentially each inventory report is linked to the correct location based on what the user has selected so that these reports can be called later. I currently do not have a ton of code as I decided to focus on the inventory portion first. But is it even possible to link whatever the user selects as the location as the way to call previous reports? Also, would I need to create a model for each location they would be the same as the below model?

Below is what I have like a said not much

from django.db import models

    ('Akron, OH', 'AKRON'),
    ('Atlanta, GA', 'ATLANTA'),
    ('Austin, TX', 'AUSTIN'),
    ('Birmingham, AL', 'BIRGMINGHAM'),
    ('Boston, MA', 'BOSTON'),
    ('Charleston, SC', 'CHARLESTON_SC'),
    ('Charleston, WV', 'CHARLESTON_WV'),
    ('Charlotte, NC', 'CHARLOTTE'),
    ('Chicago West, IL', 'CHICAGO_WEST'),
    ('Chicago, IL', 'CHICAGO'),
    ('Cleveland, OH', 'CLEVELAND'),
    ('Denver, CO', 'DENVER'),
    ('Dallas, TX', 'DALLAS'),
    ('Evansville, IN', 'EVANSVILLE'),
    ('Fayetteville, AR', 'FAYETTEVILLE'),
    ('Ft Lauderdale, FL', 'FT LAUDERDALE'),
    ('Ft Wayne, IN', 'FT WAYNE'),
    ('Grand Rapids, MI', 'GRAND RAPIDS'),
    ('Greensboro, NC', 'GREENSBORO'),
    ('Greenville, SC', 'GREENVILLE'),
    ('Houston, TX', 'HOUSTON'),
    ('Indianapolis, IN', 'INDIANAPOLIS'),
    ('Jacksonville, FL', 'JACKSONVILLE'),
    ('Kansas City, MO', 'KANSAS CITY'),
    ('Knoxville, TN', 'KNOXVILLE'),
    ('Las Vegas, NV', 'LAS VEGAS'),
    ('Lexington, KY', 'LEXINGTON'),
    ('Louisville, KY', 'LOUISVILLE'),
    ('Memphis, TN', 'MEMPHIS'),
    ('Milwaukee, WI', 'MILWAUKEE'),
    ('Minneapolis, MN', 'MINNEAPOLIS'),
    ('Mobile, AL', 'MOBILE'),
    ('Nashville, TN', 'NASHVILLE'),
    ('New Orleans, LA', 'NEW ORLEANS'),
    ('Orlando, FL', 'ORLANDO'),
    ('Phoenix, AZ', 'PHOENIX'),
    ('Pittsburgh, PA', 'PITTSBURGH'),
    ('Portland, OR', 'PORTLAND'),
    ('Raleigh, NC', 'RALEIGH'),
    ('Richmond, VA', 'RICHMOND'),
    ('Salt Lake City, UT', 'SALT LAKE CITY'),
    ('San Antonio, TX', 'SAN ANTONIO'),
    ('Savannah, GA', 'SAVANNAH'),
    ('St Louis, MO', 'ST LOUIS'),
    ('Tampa, FL', 'TAMPA'),
    ('Toledo, OH', 'TOLEDO'),    

# class Inventory(models.Model):
#     pcs = models.PositiveIntegerField()
#     laptop = models.PositiveIntegerField()
#     monitors = models.PositiveIntegerField()
#     webcams = models.PositiveIntegerField()
#     phones = models.PositiveIntegerField()
#     headsets = models.PositiveIntegerField()
#     directconnect = models.PositiveIntegerField()
#     workstations = models.PositiveIntegerField()
#     deskchair = models.PositiveIntegerField()
#     wireless_headset = models.PositiveIntegerField()
#     vpn_phone = models.PositiveIntegerField()
#     three_monitor = models.PositiveIntegerField()
#     visitor_station = models.PositiveIntegerField()
#     applicant_station = models.PositiveIntegerField()

class Akron_Inv(models.Model):
    location = models.CharField(max_length=20, choices=OFFICE_CHOICES, default='Select the office')
    description = models.CharField(max_length=30)
    in_use = models.PositiveIntegerField()
    training_room = models.PositiveIntegerField()
    conference_room = models.PositiveIntegerField()
    gsm_office = models.PositiveIntegerField()
    prospecting_station = models.PositiveIntegerField()
    applicant_station = models.PositiveIntegerField()
    visitor_station = models.PositiveIntegerField()
    other = models.PositiveIntegerField()
    spare_on_floor = models.PositiveIntegerField()
    spare_storage = models.PositiveIntegerField()
    total_spare = models.PositiveIntegerField()
    broken = models.PositiveIntegerField()
    total = models.PositiveIntegerField()

Hoping to get some guidance on the best way to start this project.

Back to Top