title: Is it necessary to create new app for homepage models in Django?
body: <p>I want to add a slider to my homepage. What is best way to do it? Should I create a new app for slider? Or can I create a class for slider in home(app)/models.py?</p>
  
  <p>I tried to create Slider class in home/models.py. But I couldn't list on homepage.</p>
  
  <p>home/views.py</p>
  
  <pre class="lang-py prettyprint-override"><code>def slider_index(request):
      slides = Slider.objects.all()
      return render(request, 'home.html', {'slides': slides})
  
  
  def slider_detail(request, id):
      slide = get_object_or_404(Slider, id=id)
      context = {
          'slide': slide,
      }
      return render(request, 'home.html', context)
  </code></pre>
  
  <p>home/models.py</p>
  
  <pre class="lang-py prettyprint-override"><code>class Slider(models.Model):
      title = models.CharField(max_length=120, verbose_name='Başlık')
      content = models.TextField(verbose_name='Açıklama')
      publishing_date = models.DateTimeField(verbose_name='Yayınlanma Tarihi', auto_now_add=True)
      image = models.ImageField(null=True, blank=True)
  
      def __str__(self):
          return self.title
  
      def get_absolute_url(self):
          return reverse('slide:detail', kwargs={'id': self.id})
          # return "/slider/{}".format(self.id)
  
      class Meta:
          ordering = ['-publishing_date', '-id']
  </code></pre>
  
  <p>urls.py</p>
  
  <pre class="lang-py prettyprint-override"><code>urlpatterns = [
      path('admin/', admin.site.urls),
      path('', home_view),
      path('slider/', slider_index, name='index'),
      path('slider/&lt;int:id&gt;/', slider_detail, name='detail'),
      path('post/', include('post.urls')),
  
  ]
  </code></pre>
  
  <p>and home.html:</p>
  
  <pre class="lang-py prettyprint-override"><code>{% for slide in slides %}
              &lt;!-- Slide #1 image --&gt;
                  {% if slide.image %}
              &lt;img src="{{ slide.image.url }}" alt="{{ slide.content }}" title="{{ slide.title }}" /&gt;
                  {% endif %}
              {% endfor %}
  </code></pre>
  
  <p>Nothing appears about slider. I'm newbie in django. I want to learn how to list slides in homepage.
  Thanks in advance.</p>