title: How to structure my Django web scraping project?
body: <p>I'm fairly new to programming and still have some issues structuring my projects in Django.
  I'm setting up a web scraper application and my goal is to visualize the scraped data and return it in different kinds of diagrams.</p>
  
  <p>At the moment I've the scraping code in the views.py file.</p>
  
  <p>My question is: Is there a preferred directory structure for this kind of applications?</p>
  
  <p>I was thinking about: </p>
  
  <p>-setting up the scraping code in a new scrape.py </p>
  
  <p>-setting up models to feed the data to in models.py</p>
  
  <p>-setting up the visualization code in the views.py </p>
  
  <p>This is my views.py atm :</p>
  
  <pre><code>from django.shortcuts import render
  from django.views.generic import TemplateView
  
  import requests
  from bs4 import BeautifulSoup
  
  
  def PlayerDetailView(request):
  
      first_name = 'Drew'
      last_name = 'Brees'
      last_name_first_letter = last_name[0]
      last_name_first_four = last_name[0:4]
      first_name_first_two = first_name[0:2]
  
  
      page = requests.get('https://www.pro-football-reference.com/players/{}/{}{}00.htm'.format(last_name_first_letter,                                                                                            last_name_first_four,                                                                                                                                first_name_first_two))
  
  
      content = page.content
  
      week_number = 251
      stats = soup.find("tr", {"id": "stats.{}".format(week_number)})
  
      stats_relevant = ['pass_yds', 'pass_td', 'rush_yds']
      stat_list = []
  
  
  for stat in stats_relevant:
      stat_list.append(int(list(stats.find("td", {"data-stat": "{}".format(stat)}).children)[0]))
  
  dic_list = {'tag':stat_list}
      return render(request,'league_app/player.html', context=dic_list)
  </code></pre>
  
  <p>Thank you in advance!</p>