Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)

src/p/g/pgBoardUnchained-HEAD/board/views.py   pgBoardUnchained(Download)
def reply(request, pk):
	""" Reply to a thread """
	p = request.POST
	if p["body"]:
		thread = Thread.objects.get(pk=pk)
 
		# Create post, I was getting thread because I've yet to figure out how to pass it in to this
		thread = Thread.objects.get(pk=request.POST.get('thread'))
		post = Post.objects.create(thread=thread, body=request.POST.get('comment'), creator=user)
		thread.last_post_at = post.created

src/c/h/chieftain-HEAD/api1/views.py   chieftain(Download)
        thread_o = models.Thread(section=section, bump=post.date)
    else:
        thread_o = models.Thread.objects.get(id=thread)
        section = thread_o.section
        if thread_o.is_closed and not user:
    def get(self, request, *args, **kwargs):
        slug = kwargs.get("section__slug")
        try:
            if not slug:
                instance = models.Thread.objects.get(**kwargs)

src/c/h/chieftain-HEAD/converter/models.py   chieftain(Download)
            tid = self.thread_map.get((slug, wpost.parent))
            try:
                thread = Thread.objects.get(id=tid)
            except Thread.DoesNotExist:
                raise ConvertError("Thread does not exist")