I have written a simple article publishing site in Django 1.8. Here is the model that I'd like to slide:
class Article(models.Model):
nid = models.IntegerField(default=0)
headimage = ImageWithThumbsField(upload_to='images', blank=True, sizes=((200,200),(400,400)))
title = models.CharField(max_length=100)
author = models.CharField(max_length=100, blank=True)
body = models.TextField()
teaser = models.TextField('teaser', blank=True)
created=models.DateTimeField(default=datetime.datetime.now)
pub_date=models.DateTimeField(default=datetime.datetime.now)
categories = models.ManyToManyField(Category, blank=True)
tags = TaggableManager()
Now I want to slide the article teasers on front page. I am new to both Django and JS so wondering how best to make such slider?
I have googled and looked at Django packages but could not find anything that can kick me to start. So appreciate your hints.
Update: here is the view that I'd like to connect it to the carousel slider:
def main(request):
"""Main listing."""
posts = Article.objects.all().order_by("-pub_date")[:5]
return render_to_response("article/list-articles.html",
dict(posts=posts, user=request.user))