Skip to content

Commit

Permalink
add related name to key-user relation
Browse files Browse the repository at this point in the history
  • Loading branch information
Diogo Laginha authored and laginha committed Mar 11, 2015
1 parent 08fcdc1 commit d92fa5e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/yard/apps/keyauth/models.py
Expand Up @@ -21,7 +21,7 @@ class Key(models.Model):
"""
API key for resource access and authentication
"""
user = models.ForeignKey(User)
user = models.ForeignKey(User, related_name='keys')
apikey = models.CharField(default=generate_apikey, max_length=100, unique=True)
activation_date = models.DateField(default=datetime.date.today)
expiration_date = models.DateField(default=years_from_now)
Expand Down

0 comments on commit d92fa5e

Please sign in to comment.