Created
August 11, 2016 20:02
-
-
Save klebercode/e8301125fd4bd321ca5f3c3f63a55bd1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def project(request, cat, sub, pro): | |
| """docstring for project""" | |
| context = {} | |
| project = get_object_or_404(Project, slug=pro) | |
| context['project'] = project | |
| context['prev_project'] = Project.objects.filter(pk__lt=project.pk).order_by('pk')[0:1] | |
| context['next_project'] = Project.objects.filter(pk__gt=project.pk).order_by('pk')[0:1] | |
| # prev_issue = Project.objects.filter(title=title).filter(number__lt=issue.number)[0:1] | |
| # next_issue = Project.objects.filter(title=title).filter(number__gt=issue.number)[0:1] | |
| return render( | |
| request, 'projects/project.html', context, | |
| context_instance=RequestContext( | |
| request, processors=[enterprise_proc])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment