X-Git-Url: https://git.mdrn.pl/django-cas-provider.git/blobdiff_plain/326dd0284afd231c8c536b523bc26808a75eca1b..3cbcd5e5abc9765cd329b09de514f2b5c47b7723:/cas_provider/utils.py?ds=sidebyside diff --git a/cas_provider/utils.py b/cas_provider/utils.py index 04a5c12..fcff8a6 100644 --- a/cas_provider/utils.py +++ b/cas_provider/utils.py @@ -1,7 +1,7 @@ +from models import ServiceTicket, LoginTicket from random import Random import string -from 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. """ @@ -21,4 +21,4 @@ def create_login_ticket(): ticket_string = 'LT-' + _generate_string(29) ticket = LoginTicket(ticket=ticket_string) ticket.save() - return ticket_string \ No newline at end of file + return ticket_string