This is a Django app that can be cloned into a Django 1.3 project.
To start from scratch:
- Make sure Django 1.3 is installed
- django-admin.py startproject
- cd
- git clone git@github.com:jarv/wordconfuse.git
After you make your local changes to settings.py and urls.py (see below) do the following to launch the local webserver:
$ python manage.py syncdb $ python manage.py collectstatic $ python manage.py runserver
Syncdb will take awhile to run since it is creating a large table with all the words for the game.
For more info see the detailed tutorial @ http://jarv.org
Database:
You will need to let Django know about your database,
if you are running a local instance the simplest thing
to do is use sqlite.
Staticfiles:
You will need to let Django know where you want to put
static files. Make sure STATIC_ROOT and STATIC_URL are
set in settings.py
URLs:
Here is the setup for URL patterns:
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import TemplateView
...
urlpatterns += patterns('wordconfuse.views',
(r'^$', TemplateView.as_view(template_name="index.html")),
url(r'^get_words$', 'get_words', name='get_words'),
url(r'^gameover$', 'gameover', name='gameover'),
url(r'^new_hs$', 'new_hs', name='new_hs'),
url(r'^hs$', 'hs', name='hs'),
)
urlpatterns += staticfiles_urlpatterns()