added favicon plus func, unpub posts only visible to admin
This commit is contained in:
parent
4195802ace
commit
83b28f4475
|
@ -2,6 +2,7 @@ from blogapp.models import blogentry, blogcomment, blogcategory
|
|||
from django.shortcuts import render, get_object_or_404
|
||||
# from django.template import RequestContext
|
||||
from django import forms
|
||||
from django.http import Http404
|
||||
from polysite.globals import CustomRenderer
|
||||
import datetime
|
||||
import mistune
|
||||
|
@ -28,6 +29,10 @@ def list_category(request, category_id):
|
|||
def detail(request, blogentry_id):
|
||||
|
||||
blogdetail = get_object_or_404(blogentry, pk=blogentry_id)
|
||||
|
||||
if not blogdetail.published and not request.user.is_authenticated():
|
||||
raise Http404("")
|
||||
|
||||
if request.method == 'POST':
|
||||
fml = BlogCommentForm(request.POST)
|
||||
if fml.is_valid():
|
||||
|
|
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
Binary file not shown.
After Width: | Height: | Size: 4.2 KiB |
|
@ -3,6 +3,7 @@
|
|||
<head>
|
||||
{% load static %}
|
||||
<link rel="stylesheet" type="text/css" href="{% static "general.css" %}" />
|
||||
<link rel="shortcut icon" href="{% static "favicon.ico" %}" />
|
||||
{% block head %}{% endblock %}
|
||||
<meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"/>
|
||||
<title>polylux</title>
|
||||
|
|
Loading…
Reference in New Issue