Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jbradberry/django-turn-generation

Timed generation of turns in turn-based game apps
https://github.com/jbradberry/django-turn-generation

Last synced: 20 days ago
JSON representation

Timed generation of turns in turn-based game apps

Awesome Lists containing this project

README

        

======================
django-turn-generation
======================

.. image:: https://travis-ci.com/jbradberry/django-turn-generation.svg?branch=master
:target: https://travis-ci.com/jbradberry/django-turn-generation

A Django app for specifying the timing of and triggering turn
generation for turn-based strategy games.

Requirements
------------

- Python 2.7, 3.5+
- Django >= 1.10, < 2.3
- `djangorestframework `_ >= 3.7
- Celery >= 3.1
- python-dateutil
- pytz

Configuration
-------------

Add ``'turngeneration'`` to the ``INSTALLED_APPS`` in your settings
file, and the custom permissions plugin to ``AUTHENTICATION_BACKENDS``
::

INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',

# Added.
'rest_framework',
'turngeneration',
]

AUTHENTICATION_BACKENDS = [
'turngeneration.backends.TurnGenerationBackend',
'django.contrib.auth.backends.ModelBackend',
]

Also, be sure to include ``turngeneration.urls`` in your root urlconf.

Example::

from django.conf.urls import include, url

urlpatterns = [
url(r'^', include('turngeneration.urls')),
url(r'^admin/', include('admin.site.urls')),
url(r'^accounts/', include('django.contrib.auth.urls'),
]