title: Not able to save data in Database using for loop
body: <p>my proposal:</p>
  <p>I want add network IP range with prefix in web UI and need to process using command
  ipaddress.IPv4Network(subnet).hosts())
  then after IP range will crate and save all range of IP into DATABASE.</p>
  <p>I have tried deferent methods still not able to complete my requirement.
  some one could help about.</p>
  <p>below the code which I made.</p>
  <p>def Indexping(request):
  form = IpModelForm
  Ipform = {'form':form}</p>
  <pre><code>if request.method=='POST':
      subnet = IpModelForm(request.POST)
      if subnet.is_valid:
          data= list(ipaddress.IPv4Network(subnet).hosts())
          for f in data:
          #f = [x for x in subnet]
              f.save()
  </code></pre>
  <p>Exception Value:<br />
  Only one '/' permitted in </p>
  <p>Getting Below Error:</p>
  <p>AddressValueError at /cbv/ind/
  Only one '/' permitted in 
  Request Method: POST
  Request URL:    <a href="http://127.0.0.1:8000/cbv/ind/" rel="nofollow noreferrer">http://127.0.0.1:8000/cbv/ind/</a>
  Django Version: 4.0.2
  Exception Type: AddressValueError
  Exception Value:<br />
  Only one '/' permitted in 
  Exception Location: D:\Program Files\Python\Python39\lib\ipaddress.py, line 162, in _split_optional_netmask
  Python Executable:  E:\Django_Projects\Portal-env\Scripts\python.exe
  Python Version: 3.9.10
  Python Path:<br />
  ['E:\Django_Projects\Portal-env\portal',
  'D:\Program Files\Python\Python39\python39.zip',
  'D:\Program Files\Python\Python39\DLLs',
  'D:\Program Files\Python\Python39\lib',
  'D:\Program Files\Python\Python39',
  'E:\Django_Projects\Portal-env',
  'E:\Django_Projects\Portal-env\lib\site-packages']
  Server time:    Sat, 19 Feb 2022 09:35:57 +0000</p>