Now uses Auth API keys for API access

This commit is contained in:
2010-06-15 15:45:10 +01:00
parent dd69956a7c
commit 93eae51933
3 changed files with 52 additions and 2 deletions

19
api/models.py Normal file
View File

@@ -0,0 +1,19 @@
import re
import unicodedata
import logging
import types
from django.db import models
class AuthAPIKey(models.Model):
name = models.CharField("Service Name", max_length=200)
url = models.CharField("Service URL", max_length=200, blank=True)
active = models.BooleanField(default=True)
key = models.CharField("API Key", max_length=200)
class AuthAPILog(models.Model):
access_datetime = models.DateTimeField()
key = models.ForeignKey(AuthAPIKey)
url = models.CharField("Accessed URL", max_length=200)