Skip to content

sporteasy/sporteasy_breaking_mvc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SportEasy breaking Django mvc

Breaking Django MVC for a better scalability

Please refer to presentation available on speakerdeck

License

This code is distributed under the terms of the MIT license. See the LICENSE.txt file.

Installation

Let’s create a virtual environment called se_b_mvc:

mkvirtualenv se_b_mvc
workon se_b_mvc
pip install --requirement=requirements.txt
python manage.py syncdb --noinput

Usage

Via local import

In project settings.py:

SERVICES = {
    'championship': {
        'PROXY': {
            'CLASS': 'LocalServiceProxy',
            'OPTIONS': {}
        }
    }
}

Then, run python manage.py runserver

Via RPyC lib

In project settings.py:

SERVICES = {
    'championship': {
        'CLASS': 'RpycServiceProxy',
        'OPTIONS': {
            'url': '127.0.0.1:4444'
        }
    }
}

Open 2 terminals:

  • In the first one, run python manage.py serviced
  • In the second one, run python manage.py runsever

About

Breaking Django MVC for a better scalability

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published