Skip to content

Commit

Permalink
Upgrade to Django 3
Browse files Browse the repository at this point in the history
  • Loading branch information
clavay committed May 5, 2022
1 parent ecfdb29 commit 0df82ec
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.pyc
/pyscada_gpio.egg-info/*
/pyscada_*.egg-info/*
/.idea/*
/dist/*
/build/*
2 changes: 1 addition & 1 deletion pyscada/gpio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import pyscada

__version__ = '0.7.0rc18'
__version__ = '0.7.1rc1'
__author__ = 'Martin Schröder'

default_app_config = 'pyscada.gpio.apps.PyScadaGPIOConfig'
Expand Down
1 change: 1 addition & 0 deletions pyscada/gpio/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class PyScadaGPIOConfig(AppConfig):
name = 'pyscada.gpio'
verbose_name = _("PyScada GPIO")
path = os.path.dirname(os.path.realpath(__file__))
default_auto_field = 'django.db.models.AutoField'

def ready(self):
import pyscada.gpio.signals
3 changes: 0 additions & 3 deletions pyscada/gpio/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@
from pyscada.models import Variable

from django.db import models
from django.utils.encoding import python_2_unicode_compatible
import logging

logger = logging.getLogger(__name__)


@python_2_unicode_compatible
class GPIODevice(models.Model):
gpio_device = models.OneToOneField(Device, null=True, blank=True, on_delete=models.CASCADE)
board_choices = (('rpi', 'Raspberry Pi'),)
Expand All @@ -30,7 +28,6 @@ def __str__(self):
return self.gpio_device.short_name


@python_2_unicode_compatible
class GPIOVariable(models.Model):
gpio_variable = models.OneToOneField(Variable, null=True, blank=True, on_delete=models.CASCADE)
gpio_mode_choices = (
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
platforms=['OS Independent'],
classifiers=CLASSIFIERS,
install_requires=[
'pyscada>=0.7.0rc18',
'pyscada>=0.7.1rc1',
'rpi.gpio',
],
packages=find_packages(exclude=["project", "project.*"]),
Expand Down

0 comments on commit 0df82ec

Please sign in to comment.