compat.py 357 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
# coding=utf-8
import django
from django.conf.urls import include
from django.contrib import admin

if django.VERSION < (1, 9):
    admin_urls = include(admin.site.urls)
    base_url = 'http://testserver'
else:
    admin_urls = admin.site.urls
    base_url = ''

if django.VERSION < (1, 10):
    username_max_length = 30
else:
    username_max_length = 150