Django: Accessing Logged in User when specifying Generic View in urlpatterns
问题 I have a model that looks like this: from django.db import models from django.contrib.auth.models import User class Application(models.Model): STATUS_CHOICES = ( (u'IP',u'In Progress'), (u'C',u'Completed')) status = models.CharField(max_length=2 ,choices=STATUS_CHOICES, default='IP') title = models.CharField(max_length = 512) description = models.CharField(max_length = 5120) principle_investigator = models.ForeignKey(User, related_name='pi') And I want to use a generic ListView that lists the