Improve code quality on utils.py

This commit is contained in:
Alvaro Leonel 2018-05-30 23:59:07 -03:00
parent 09031fc763
commit 9c7953433b
2 changed files with 7 additions and 4 deletions

View file

@ -1,13 +1,15 @@
'''' Django notifications utils file '''
# -*- coding: utf-8 -*-
import sys
if sys.version > '3':
long = int
long = int # pylint: disable=invalid-name
def slug2id(slug):
return long(slug) - 110909
def id2slug(id):
return id + 110909
def id2slug(notification_id):
return notification_id + 110909

View file

@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
''' Django Notifications exemple views '''
from distutils.version import StrictVersion # pylint: disable=no-name-in-module,import-error