Py2 compatible
This commit is contained in:
parent
e927ad5801
commit
ba0a5d0d27
|
@ -1,3 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
|
||||
from django.shortcuts import render
|
||||
from django.http import Http404
|
||||
from django.db.models import Q
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
|
||||
import hashlib
|
||||
|
||||
from django.contrib.auth.models import User, Permission
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
|
||||
from channels import Group
|
||||
from channels.generic.websockets import JsonWebsocketConsumer
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
|
||||
from django.contrib.auth.context_processors import PermWrapper
|
||||
|
||||
def auth(request):
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
|
||||
from django_cas_ng.decorators import user_passes_test
|
||||
|
||||
def kfet_is_team(user):
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
|
||||
from decimal import Decimal
|
||||
from django import forms
|
||||
from django.core.exceptions import ValidationError
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
|
||||
from kfet.backends import KFetBackend
|
||||
|
||||
class KFetAuthenticationMiddleware(object):
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
|
||||
from django.db import models
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.core.exceptions import PermissionDenied, ValidationError
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
|
||||
from channels.routing import route, route_class
|
||||
from kfet import consumers
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
|
||||
from django import template
|
||||
from django.utils.html import escape
|
||||
from django.utils.safestring import mark_safe
|
||||
|
@ -31,4 +37,5 @@ def highlight_clipper(clipper, q):
|
|||
@register.filter()
|
||||
def ukf(balance, is_cof):
|
||||
grant = is_cof and (1 + Settings.SUBVENTION_COF() / 100) or 1
|
||||
return round(balance * 10 * grant)
|
||||
# float nécessaire car sinon problème avec le round de future.builtins
|
||||
return round(float(balance * 10 * grant))
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.contrib.auth.decorators import permission_required
|
||||
from kfet import views
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import (absolute_import, division,
|
||||
print_function, unicode_literals)
|
||||
from builtins import *
|
||||
|
||||
from django.shortcuts import render, get_object_or_404, redirect
|
||||
from django.core.exceptions import PermissionDenied, ValidationError
|
||||
from django.core.cache import cache
|
||||
|
|
Loading…
Reference in a new issue