Django app for qfusion authentication server
Install using pip, please use a virtualenv...
$ pip install django-warmamaAn example project is provided and is sufficient for testing with QFusion. Just get the server started.
cd example-project
python manage.py migrate
python manage.py createsuperuser
python manage.py runserverTo use it with QFusion, you need to add some User, Server and Player models; so navigate over to the admin page at http://localhost:8000/admin/ and create some.
- Create some normal django users first, qf clients will use these username password combinations to connect.
- Create warmama Player models. The
loginfield must be the username of a previously created User. - Create warmama Server models. The
loginfield here will be the server's authtoken. Eitherregiporregipv6must be set to the server's ipaddress, for local testing127.0.0.1is allowed.
Finally configure the QFusion server and clients to use warmama for matchmaking.
For the server, set sv_mm_enable to 1 and sv_mm_authtoken to the login
value of the Server created above. For both the server and client set mm_url
to http://127.0.0.1:8000 (without a trailing slash).
Then configure your django project to use the app, you can override any of the warmama settings (found in warmama/settings.py) in your project's settings.py file.
# project/settings.py
INSTALLED_APPS = (
...
'warmama',
)
# project/urls.py
urlpatterns = [
...
url(r'^warmama/', include('warmama.urls', namespace='warmama', app_name='warmama')),
]Finally, run the migrations and (optionally) load the fixtures
python manage.py migrate
python manage.py loaddata --app warmama gametypes
python manage.py loaddata --app warmama weaponsInstall testing requirements.
$ pip install -r requirements.txtRun with runtests.
$ ./runtests.pyYou can also use the excellent tox testing tool to run the tests against all supported versions of Python and Django. Install tox globally, and then simply run:
$ toxTo build the documentation, you'll need to install mkdocs.
$ pip install mkdocsTo preview the documentation:
$ mkdocs serve
Running at: http://127.0.0.1:8000/To build the documentation:
$ mkdocs build