-
Notifications
You must be signed in to change notification settings - Fork 4
/
README
60 lines (40 loc) · 1.61 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Wordconfusion A tutorial project for DJango 1.3 and JQuery
----------------------------------------------------------
This is a Django app that can be cloned into a Django 1.3 project.
To start from scratch:
1) Make sure Django 1.3 is installed
2) django-admin.py startproject <proj>
3) cd <proj>
4) git clone [email protected]: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
Django Setup notes
-------------------
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()