summaryrefslogtreecommitdiffstats
path: root/sites/views.py
blob: afb8548a9fb0951b40d0b2b2db8aa82e44009490 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Create your views here.
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponse
from django.contrib.sites.models import *
from django.contrib.sites.models import *
from django.conf import settings
from django.contrib.flatpages.models import FlatPage
from django.contrib.auth.models import User


def all_activity(request):
	post_list= Flatpage.objects.all()

	return render_to_response('sites/directory.html', {'post_list': posts_list, 'a.site': blog})

def index(request):
	return HttpResponse("Hello, world. You're at the sites index.")


def one_flatpage(request, object_id):
	a = get_object_or_404(FlatPage,pk=object_id)
	return render_to_response('flatpages/default.html', {'a': flatpages, })

def flatpages(request, object_id):
	a = get_object_or_404(Flatpage,pk=object_id)
	return render_to_response('flatpages/default.html', {'a': flatpages})

def article_detail(request, object_id):
	a = get_object_or_404(Article,pk=object_id)
	return render_to_response('blog/one_blog.html', {'a': flatpages})