Skip to content

Instantly share code, notes, and snippets.

@chibiegg
Last active January 3, 2016 15:59
Show Gist options
  • Save chibiegg/8486656 to your computer and use it in GitHub Desktop.
Save chibiegg/8486656 to your computer and use it in GitHub Desktop.
pubkey/models.py
from django.db import models
from django.contrib.auth.models import User
class Server(models.Model):
user = models.ForeignKey(User)
description = models.CharField(u"名称", max_length=255)
hostname = models.CharField(u"ホスト名", max_length=255)
apikey = models.CharField(u"APIKey", max_length=100)
class PublicKey(models.Model):
user = models.ForeignKey(User)
server = models.ForeignKey("Server", null=True)
key = models.TextField(u"公開鍵")
description = models.CharField(u"名称", max_length=255)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment