# Path: countylimits/models.py
# class CountyLimit(models.Model):
#     """County limit object."""
# 
#     fha_limit = models.DecimalField(
#         max_digits=12,
#         decimal_places=2,
#         help_text="Federal Housing Administration "
#         "loan lending limit for the county",
#     )
#     gse_limit = models.DecimalField(
#         max_digits=12,
#         decimal_places=2,
#         help_text="Loan limit for mortgages acquired "
#         "by the Government-Sponsored Enterprises",
#     )
#     va_limit = models.DecimalField(
#         max_digits=12,
#         decimal_places=2,
#         help_text="The Department of Veterans Affairs "
#         "loan guaranty program limit",
#     )
#     county = models.OneToOneField(County, on_delete=models.CASCADE)
# 
#     def __str__(self):
#         return "CountyLimit %s" % self.id
# 
#     @staticmethod
#     def county_limits_by_state(state):
#         """Get a list of state counties with limits."""
#         data = []
#         # state value can be a State FIPS or a state abbr.
#         state_obj = State.objects.filter(
#             models.Q(state_fips=state) | models.Q(state_abbr=state)
#         ).first()
#         limits = CountyLimit.objects.filter(county__state=state_obj)
#         for countylimit in limits:
#             data.append(
#                 {
#                     "state": str(abbr_to_name[state_obj.state_abbr]),
#                     "county": countylimit.county.county_name,
#                     "complete_fips": "{}{}".format(
#                         state_obj.state_fips, countylimit.county.county_fips
#                     ),
#                     "gse_limit": str(countylimit.gse_limit),
#                     "fha_limit": str(countylimit.fha_limit),
#                     "va_limit": str(countylimit.va_limit),
#                 }
#             )
#         return data


from countylimits.models import CountyLimit
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.response import Response
    "KS",
    "KY",
    "LA",
    "ME",
    "MD",
    "MA",
    "MI",
    "MN",
    "MS",
    "MO",
    "MT",
    "NE",
    "NV",
    "NH",
    "NJ",
    "NM",
    "NY",
    "NC",
    "ND",
    "OH",
    "OK",
    "OR",
    "PA",
    "RI",
    "SC",
    "SD",
    "TN",
    "TX",
    "UT",
    "VT",

# Path: countylimits/models.py
# class CountyLimit(models.Model):
#     """County limit object."""
# 
#     fha_limit = models.DecimalField(
#         max_digits=12,
#         decimal_places=2,
#         help_text="Federal Housing Administration "
#         "loan lending limit for the county",
#     )
#     gse_limit = models.DecimalField(
#         max_digits=12,
#         decimal_places=2,
#         help_text="Loan limit for mortgages acquired "
#         "by the Government-Sponsored Enterprises",
#     )
#     va_limit = models.DecimalField(
#         max_digits=12,
#         decimal_places=2,
#         help_text="The Department of Veterans Affairs "
#         "loan guaranty program limit",
#     )
#     county = models.OneToOneField(County, on_delete=models.CASCADE)
# 
#     def __str__(self):
#         return "CountyLimit %s" % self.id
# 
#     @staticmethod
#     def county_limits_by_state(state):
#         """Get a list of state counties with limits."""
#         data = []
#         # state value can be a State FIPS or a state abbr.
#         state_obj = State.objects.filter(
#             models.Q(state_fips=state) | models.Q(state_abbr=state)
#         ).first()
#         limits = CountyLimit.objects.filter(county__state=state_obj)
#         for countylimit in limits:
#             data.append(
#                 {
#                     "state": str(abbr_to_name[state_obj.state_abbr]),
#                     "county": countylimit.county.county_name,
#                     "complete_fips": "{}{}".format(
#                         state_obj.state_fips, countylimit.county.county_fips
#                     ),
#                     "gse_limit": str(countylimit.gse_limit),
#                     "fha_limit": str(countylimit.fha_limit),
#                     "va_limit": str(countylimit.va_limit),
#                 }
#             )
#         return data


# Path: countylimits/views.py
from countylimits.models import CountyLimit
from rest_framework import status
from rest_framework.decorators import api_view
from rest_framework.response import Response

    "KS",
    "KY",
    "LA",
    "ME",
    "MD",
    "MA",
    "MI",
    "MN",
    "MS",
    "MO",
    "MT",
    "NE",
    "NV",
    "NH",
    "NJ",
    "NM",
    "NY",
    "NC",
    "ND",
    "OH",
    "OK",
    "OR",
    "PA",
    "RI",
    "SC",
    "SD",
    "TN",
    "TX",
    "UT",
    "VT",

    "VA",