Last active
December 14, 2015 08:18
-
-
Save IlianIliev/5056570 to your computer and use it in GitHub Desktop.
just for testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# views.py | |
from .models import News | |
from django.shortcuts import get_object_or_404 | |
def single_news(request, slug): | |
news = get_object_or_404(News.objects.public(), slug=slug) | |
return render_to_response('news/single_news.html', {'news': news}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment