Skip to content

Commit 1f49d65

Browse files
author
Alex Schmelkin
committed
first commit to get ready to push to github
0 parents  commit 1f49d65

22 files changed

+464
-0
lines changed

.gitignore

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Logs and databases
2+
*.log
3+
*.db
4+
*.sqlite3
5+
6+
# OS generated files
7+
.DS_Store
8+
.DS_Store?
9+
._*
10+
.Spotlight-V100
11+
.Trashes
12+
ehthumbs.db
13+
Thumbs.db
14+
15+
# Emacs backups
16+
*~
17+
.*~
18+
19+
# django
20+
*.pot
21+
*.pyc
22+
local_settings.py
23+
24+
# production files
25+
django.wsgi
26+
27+
# collected static files via collectstatic and uploaded media assets
28+
namegame/static
29+
namegame/media

REAMDE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
TODO
2+
====
3+
* fix 0 correct bug the first time you play...andy.title() suggests "Good Luck!"
4+
* on a word by word basis, if there is ANY capitalization, do not .title() correct
5+
* Andy feature: entered X of Y names on the entry screen
6+
* Andy feature: lock OUT ability to add more names after exceeding maximum (downvote)
7+
* Ben feature: add timer on website
8+
* Andy feature: fonts stink, and the brick house name game doesn't look styled enough
9+

manage.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env python
2+
import os
3+
import sys
4+
5+
if __name__ == "__main__":
6+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "namegame.settings")
7+
8+
from django.core.management import execute_from_command_line
9+
10+
execute_from_command_line(sys.argv)

namegame/__init__.py

Whitespace-only changes.

namegame/settings.py

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
"""
2+
Django settings for namegame project.
3+
4+
For more information on this file, see
5+
https://docs.djangoproject.com/en/1.7/topics/settings/
6+
7+
For the full list of settings and their values, see
8+
https://docs.djangoproject.com/en/1.7/ref/settings/
9+
"""
10+
11+
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
12+
import os
13+
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
14+
15+
16+
# Quick-start development settings - unsuitable for production
17+
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
18+
19+
# SECURITY WARNING: keep the secret key used in production secret!
20+
SECRET_KEY = '9zh2s5dk6ao3k)r1lw)&x#3r3oe-8((b$#2uvm_ddkp1sf(bbg'
21+
22+
# SECURITY WARNING: don't run with debug turned on in production!
23+
DEBUG = True
24+
25+
TEMPLATE_DEBUG = True
26+
27+
ALLOWED_HOSTS = []
28+
29+
30+
# Application definition
31+
32+
INSTALLED_APPS = (
33+
'django.contrib.admin',
34+
'django.contrib.auth',
35+
'django.contrib.contenttypes',
36+
'django.contrib.sessions',
37+
'django.contrib.messages',
38+
'django.contrib.staticfiles',
39+
'rest_framework',
40+
'names',
41+
)
42+
43+
MIDDLEWARE_CLASSES = (
44+
'django.contrib.sessions.middleware.SessionMiddleware',
45+
'django.middleware.common.CommonMiddleware',
46+
'django.middleware.csrf.CsrfViewMiddleware',
47+
'django.contrib.auth.middleware.AuthenticationMiddleware',
48+
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
49+
'django.contrib.messages.middleware.MessageMiddleware',
50+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
51+
)
52+
53+
ROOT_URLCONF = 'namegame.urls'
54+
55+
WSGI_APPLICATION = 'namegame.wsgi.application'
56+
57+
58+
# Database
59+
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
60+
61+
DATABASES = {
62+
'default': {
63+
'ENGINE': 'django.db.backends.sqlite3',
64+
'NAME': os.path.join(BASE_DIR, 'namegame/db', 'db.sqlite3'),
65+
}
66+
}
67+
68+
# Internationalization
69+
# https://docs.djangoproject.com/en/1.7/topics/i18n/
70+
71+
LANGUAGE_CODE = 'en-us'
72+
73+
TIME_ZONE = 'UTC'
74+
75+
USE_I18N = True
76+
77+
USE_L10N = True
78+
79+
USE_TZ = True
80+
81+
82+
# Static files (CSS, JavaScript, Images)
83+
# https://docs.djangoproject.com/en/1.7/howto/static-files/
84+
85+
STATIC_URL = '/static/'
86+
87+
MAX_NAMES = 10

namegame/urls.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from django.conf.urls import patterns, include, url
2+
from django.contrib import admin
3+
4+
urlpatterns = patterns('',
5+
url(r'^', include('names.urls')),
6+
url(r'^admin/', include(admin.site.urls)),
7+
)

namegame/wsgi.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
WSGI config for namegame project.
3+
4+
It exposes the WSGI callable as a module-level variable named ``application``.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/
8+
"""
9+
10+
import os
11+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "namegame.settings")
12+
13+
from django.core.wsgi import get_wsgi_application
14+
application = get_wsgi_application()

names/__init__.py

Whitespace-only changes.

names/admin.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from django.contrib import admin
2+
from names.models import Name
3+
4+
class NameAdmin(admin.ModelAdmin):
5+
list_display = ('name', 'used',)
6+
list_filter = ('used',)
7+
admin.site.register(Name, NameAdmin)

names/forms.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from django import forms
2+
from names.models import Name
3+
4+
class NameForm(forms.ModelForm):
5+
6+
class Meta:
7+
model = Name
8+
fields = ['name', 'used',]
9+
widgets = {
10+
'name': forms.TextInput(attrs={"autofocus": True, "autocorrect": "off", "autocapitalize": "off"}),
11+
}

0 commit comments

Comments
 (0)