def details(request, year, month, day, slug): post_date = datetime.date(int(year), int(month), int(day)) post = shortcuts.get_object_or_404(models.Post, publish_date=post_date, slug=slug) return template.render(request, "detail.html", { 'post': post, 'comments': "", })
def port(self): self.user = users.get_current_user() if not self.user: return self.redirect(users.create_login_url(self.request.uri)) self.url = users.create_logout_url(self.request.uri) self.url_linktext = 'Logout' template_dict, template_name = self.post_handler() return self.response.out.write(template.render(template_name, template_dict))
def tasks(request, tasklist_id=None): tasklist = shortcuts.get_object_or_404(models.TaskList, pk=tasklist_id) return template.render(request, "tasklist/tasks.html", { 'tasklist': tasklist, 'tasks': models.Task.get_tasks(tasklist), })
def index(request): return template.render(request, "tasklist/index.html", { 'tasklists': models.TaskList.get_tasklists(request.user), })
def index(request): return template.render(request, "index.html", { 'recent_posts': models.Post.get_recent_posts(), })