Initial import

This commit is contained in:
2010-02-23 10:16:25 +00:00
committed by dreddit
commit b8e5647148
26 changed files with 957 additions and 0 deletions

0
sso/__init__.py Normal file
View File

18
sso/models.py Normal file
View File

@@ -0,0 +1,18 @@
from django.db import models
from django.contrib.auth.models import User
from eve_api.models.api_player import EVEAccount
class UserProfile(User):
eveaccount = models.ForeignKey(EVEAccount)
class Site(models.Model):
url = models.CharField(max_length=200)
active = models.BooleanField()
api = models.CharField(max_length=200)
class SiteAccount(models.Model):
user = models.ForeignKey(UserProfile)
site = models.ForeignKey(Site)
username = models.CharField(max_length=200)
active = models.BooleanField()

23
sso/tests.py Normal file
View File

@@ -0,0 +1,23 @@
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.failUnlessEqual(1 + 1, 2)
__test__ = {"doctest": """
Another way to test that 1 + 1 is equal to 2.
>>> 1 + 1 == 2
True
"""}

1
sso/views.py Normal file
View File

@@ -0,0 +1 @@
# Create your views here.