Merge branch 'release/v1.0.5'
This commit is contained in:
commit
e035678ff0
5
Pipfile
5
Pipfile
@ -6,10 +6,11 @@ verify_ssl = true
|
||||
[dev-packages]
|
||||
|
||||
[packages]
|
||||
django = "==3.2.7"
|
||||
django = "==3.2.8"
|
||||
django-crispy-forms = "==1.13.0"
|
||||
django-debug-toolbar = "==3.2.2"
|
||||
django-extensions = "==3.1.3"
|
||||
django-tables2 = "==2.4.0"
|
||||
django-tables2 = "==2.4.1"
|
||||
djangorestframework = "==3.12.4"
|
||||
requests = "==2.26.0"
|
||||
django-simple-task = "==0.1.2"
|
||||
|
@ -0,0 +1 @@
|
||||
default_app_config = 'billard.apps.BillardConfig'
|
@ -2,4 +2,8 @@ from django.apps import AppConfig
|
||||
|
||||
|
||||
class BillardConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'billard'
|
||||
|
||||
def ready(self):
|
||||
import billard.signals #noqa
|
||||
|
43
billard/migrations/0028_auto_20211024_1106.py
Normal file
43
billard/migrations/0028_auto_20211024_1106.py
Normal file
@ -0,0 +1,43 @@
|
||||
# Generated by Django 3.2.8 on 2021-10-24 11:06
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('billard', '0027_clientdata'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='accounting',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='client',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='clientdata',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='desk',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='location',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='locationdata',
|
||||
name='id',
|
||||
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
|
||||
),
|
||||
]
|
11
billard/signals.py
Normal file
11
billard/signals.py
Normal file
@ -0,0 +1,11 @@
|
||||
from django.db.models.signals import post_save
|
||||
from django.dispatch import receiver
|
||||
from django_simple_task import defer
|
||||
|
||||
from billard.models import LocationData
|
||||
from billard.tasks import process_location_data
|
||||
|
||||
|
||||
@receiver(post_save, sender=LocationData)
|
||||
def update_location_data(sender, instance, **kwargs):
|
||||
defer(process_location_data(sender=sender, kwargs=kwargs))
|
18
caromserver/asgi.py
Normal file
18
caromserver/asgi.py
Normal file
@ -0,0 +1,18 @@
|
||||
"""
|
||||
ASGI config for caromserver project.
|
||||
|
||||
It exposes the ASGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.asgi import get_asgi_application
|
||||
from django_simple_task import django_simple_task_middlware
|
||||
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'caromserver.settings')
|
||||
|
||||
application = get_asgi_application()
|
||||
application = django_simple_task_middlware(application)
|
@ -38,6 +38,7 @@ INSTALLED_APPS = [
|
||||
# third party apps
|
||||
'crispy_forms',
|
||||
'debug_toolbar',
|
||||
'django_simple_task',
|
||||
'django_tables2',
|
||||
'rest_framework',
|
||||
'rest_framework.authtoken',
|
||||
@ -163,7 +164,7 @@ EMAIL_PORT = 25
|
||||
URL_LOCATION_PROCESSOR = 'http://127.0.0.1:8000/billard/process_locationdata'
|
||||
|
||||
PRODUCT_INFO = 'CAROM'
|
||||
PRODUCT_VERSION = 'v 1.0.4'
|
||||
PRODUCT_VERSION = 'v 1.0.5'
|
||||
|
||||
INTERNAL_IPS = ['127.0.0.1']
|
||||
|
||||
|
@ -4,13 +4,13 @@ WSGI config for caromserver project.
|
||||
It exposes the WSGI callable as a module-level variable named ``application``.
|
||||
|
||||
For more information on this file, see
|
||||
https://docs.djangoproject.com/en/1.10/howto/deployment/wsgi/
|
||||
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "caromserver.settings")
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'caromserver.settings')
|
||||
|
||||
application = get_wsgi_application()
|
||||
|
24
manage.py
24
manage.py
@ -1,22 +1,22 @@
|
||||
#!/usr/bin/env python3
|
||||
#!/usr/bin/env python
|
||||
"""Django's command-line utility for administrative tasks."""
|
||||
import os
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "caromserver.settings")
|
||||
|
||||
def main():
|
||||
"""Run administrative tasks."""
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'caromserver.settings')
|
||||
try:
|
||||
from django.core.management import execute_from_command_line
|
||||
except ImportError:
|
||||
# The above import may fail for some other reason. Ensure that the
|
||||
# issue is really that Django is missing to avoid masking other
|
||||
# exceptions on Python 2.
|
||||
try:
|
||||
import django
|
||||
except ImportError:
|
||||
except ImportError as exc:
|
||||
raise ImportError(
|
||||
"Couldn't import Django. Are you sure it's installed and "
|
||||
"available on your PYTHONPATH environment variable? Did you "
|
||||
"forget to activate a virtual environment?"
|
||||
)
|
||||
raise
|
||||
) from exc
|
||||
execute_from_command_line(sys.argv)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
Loading…
Reference in New Issue
Block a user