from django.contrib import admin
-from models import ServiceTicket, LoginTicket
+from cas_provider.models import ServiceTicket, LoginTicket
class ServiceTicketAdmin(admin.ModelAdmin):
pass
from django.contrib.auth.forms import AuthenticationForm
from django.contrib.auth import authenticate
-from utils import create_login_ticket
+from cas_provider.utils import create_login_ticket
class LoginForm(forms.Form):
username = forms.CharField(max_length=30)
from django.conf.urls.defaults import *
-from views import *
+from cas_provider.views import *
urlpatterns = patterns('',
url(r'^login/$', login),
from random import Random
import string
-from models import ServiceTicket, LoginTicket
+from cas_provider.models import ServiceTicket, LoginTicket
def _generate_string(length=8, chars=string.ascii_letters + string.digits):
""" Generates a random string of the requested length. Used for creation of tickets. """
from django.contrib.auth import authenticate
from django.contrib.auth import login as auth_login, logout as auth_logout
-from forms import LoginForm
-from models import ServiceTicket, LoginTicket
-from utils import create_service_ticket
+from cas_provider.forms import LoginForm
+from cas_provider.models import ServiceTicket, LoginTicket
+from cas_provider.utils import create_service_ticket
__all__ = ['login', 'validate', 'service_validate', 'logout']