I am setting up the admin page so that I might be able to use it to add data, players in this case. When you go and attempt to register the Players class in admin.py you get the error described in the question title (object 'players' has no attribute 'fields'). Looking through views.py that I pasted a snippet out of below I don't see what it might be referring to.
Sorry if this is a noob question, I'm pretty new to both django and python.
class Players(models.Model):
player_id = models.IntegerField(primary_key=True)
firstname = models.CharField(max_length=50)
lastname = models.CharField(max_length=50)
team = models.ForeignKey(Teams)
Top200rank = models.IntegerField(null=True, blank=True)
position = models.CharField(max_length=25)
roster_status = models.ForeignKey(RosterStatus, null=True, blank=True)
class Meta:
ordering = ('lastname', 'firstname')
verbose_name_plural = 'Players'
def __unicode__(self):
return u"%s %s" % (self.firstname, self.last_name)