def index(request): objects = Issue.objects.order_by('-updated') if 'tag' in request.GET: for tag in request.GET.getlist('tag'): objects = objects.filter(tags__name=tag) else: return render_to_response('issues/index.html', locals())
def new(request): form = IssueForm(initial={ 'writer': request.user, 'status': 'open', }) return render_to_response('issues/new.html', locals(), RequestContext(request))
def show(request, resource_id): issue = Issue.objects.get(id=resource_id) issue.read_count += 1 issue.save() if request.user.is_anonymous(): user_vote = None else: try: user_vote = issue.vote_set.get(voter=request.user) except ObjectDoesNotExist: user_vote = None action_form = ActionForm(initial={'writer': request.user, 'issue': issue}) comment_form = CommentForm(initial={'writer': request.user, 'issue': issue}) return render_to_response('issues/show.html', locals(), RequestContext(request))
def show(request, resource_id): issue = Issue.objects.get(id=resource_id) issue.read_count += 1 issue.save() if request.user.is_anonymous(): user_vote = None else: try: user_vote = issue.vote_set.get(voter=request.user) except ObjectDoesNotExist: user_vote = None action_form = ActionForm(initial={'writer': request.user, 'issue': issue}) comment_form = CommentForm(initial={ 'writer': request.user, 'issue': issue }) return render_to_response('issues/show.html', locals(), RequestContext(request))
def login(request): return render_to_response('accounts/login.html', locals(), RequestContext(request))
def index(request): return render_to_response('index.html', locals(), RequestContext(request))
def edit(request, resource_id): csrf_token = csrf(request)['csrf_token'] issue = Issue.objects.get(id=resource_id) return render_to_response('issues/edit.html', locals())
def histories(request, resource_id): issue = Issue.objects.get(id=resource_id) return render_to_response('issues/histories.html', locals())
def index(request, resource_id): return render_to_response('historic/index.html', locals())
def index(request, resource_id): return render_to_response('scraper/index.html', locals())
def edit(request, resource_id): issue = Issue.objects.get(id=resource_id) form = IssueForm(instance=issue) return render_to_response('issues/edit.html', locals(), RequestContext(request))
def new(request): form = IssueForm(initial={'writer': request.user, 'status': 'open', }) return render_to_response('issues/new.html', locals(), RequestContext(request))
def history(request, resource_id): history = IssueHistory.objects.get(id=resource_id) return render_to_response('issues/history.html', locals())
def index(request, resource_id): tags = Tag.objects.all() return render_to_response('tags/index.html', locals())
def new(request): form = ActionForm() return render_to_response('actions/new.html', locals(), RequestContext(request))