Skip to content

Commit

Permalink
Merge 58c79cb into 2ef5d6f
Browse files Browse the repository at this point in the history
  • Loading branch information
osherdp committed Jul 10, 2019
2 parents 2ef5d6f + 58c79cb commit e150a4c
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 11 deletions.
33 changes: 27 additions & 6 deletions docs/intro/using_resources.rst
Expand Up @@ -51,12 +51,33 @@ Don't forget to add the new application as well as ``rotest`` to the

.. code-block:: python
from rotest.settings import *
INSTALLED_APPS += ['resources_app'] # Adding your apps to the settings
# You can override other definitions as well (optional),
# like DATABASES, MIDDLEWARE_CLASSES, etc.
DEBUG = True
INSTALLED_APPS += [
# Rotest related applications
'rotest.core',
'rotest.management',
'channels',
# Administrator related applications
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
# My applications
'resources_app']
# You can override other definitions (DATABASES, MIDDLEWARE_CLASSES, etc.)
# or just import them from rotest to use the default.
from rotest.common.django_utils.settings import (DATABASES,
MIDDLEWARE_CLASSES,
CHANNEL_LAYERS,
ASGI_APPLICATION,
TEMPLATES,
STATIC_URL)
We're going to write a simple resource of a calculator. Edit the
:file:`resources_app/models.py` file to have the following content:
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Expand Up @@ -3,7 +3,7 @@
from setuptools import setup, find_packages


__version__ = "7.8.0"
__version__ = "7.8.1"

result_handlers = [
"db = rotest.core.result.handlers.db_handler:DBHandler",
Expand Down Expand Up @@ -49,7 +49,6 @@
'swaggapi>=0.6.7',
'cached_property',
'channels>=1,<2',
'websocket>=0.2',
'websocket-client>=0.56',
'pywin32<224; sys.platform == "win32"'
],
Expand Down
1 change: 0 additions & 1 deletion src/rotest/__init__.py
Expand Up @@ -7,7 +7,6 @@

from .common import config
from .cli.client import main
from .common.django_utils import settings


# Enable color printing on screen.
Expand Down
3 changes: 2 additions & 1 deletion src/rotest/cli/main.py
Expand Up @@ -4,7 +4,8 @@
import sys

import django
django.setup() # noqa
if not hasattr(django, 'apps'): # noqa
django.setup()

from rotest.cli.client import main as run
from rotest.cli.server import start_server
Expand Down
3 changes: 2 additions & 1 deletion src/rotest/core/runners/multiprocess/worker/process.py
Expand Up @@ -8,7 +8,8 @@
import psutil
from six.moves import queue

django.setup() # noqa
if not hasattr(django, 'apps'): # noqa
django.setup()

from rotest.common import core_log
from rotest.core.runners.multiprocess.worker.runner import WorkerRunner
Expand Down

0 comments on commit e150a4c

Please sign in to comment.