mirror of
https://github.com/Hopiu/django-notifications.git
synced 2026-03-16 21:30:24 +00:00
Improve code quality on utils.py
This commit is contained in:
parent
09031fc763
commit
9c7953433b
2 changed files with 7 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
''' Django Notifications exemple views '''
|
||||
from distutils.version import StrictVersion # pylint: disable=no-name-in-module,import-error
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue