Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
Change namespace to csp
Browse files Browse the repository at this point in the history
  • Loading branch information
ksetyadi committed Apr 15, 2015
1 parent a3e5c31 commit 8399dde
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 12 deletions.
99 changes: 99 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,102 @@ venv
*.pyc
staticfiles
local_settings.py

# Created by https://www.gitignore.io

### Python ###
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/


### Django ###
*.log
*.pot
*.pyc
__pycache__/
local_settings.py


### VirtualEnv ###
# Virtualenv
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
.Python
[Bb]in
[Ii]nclude
[Ll]ib
[Ss]cripts
pyvenv.cfg
pip-selfcheck.json


### SublimeText ###
# cache files for sublime text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache

# workspace files are user-specific
*.sublime-workspace

# project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using SublimeText
# *.sublime-project

# sftp configuration file
sftp-config.json

2 changes: 1 addition & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web: gunicorn turingmachine.wsgi --log-file -
web: gunicorn csp.wsgi --log-file -
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Turing Machine
# Crowdsource Platform - Crowdresearch HCI Stanford

This is a Django 1.8 app using a Postgres database that can be deployed to Heroku.
This is a Django 1.8 app using a MySQL database that can be deployed to Heroku.

### Setup

Install [Postgres](http://postgresapp.com/) and create a new database:

bash> psql
psql> CREATE DATABASE turingmachine_dev;
psql> CREATE DATABASE crowdsource_dev ENCODING 'UTF8';

Create a `local_settings.py` file and configure it to connect to the Postgres database:

DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql_psycopg2",
"NAME": "turingmachine_dev"
"NAME": "crowdsource_dev"
}
}

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions turingmachine/settings.py → csp/settings.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Django settings for turingmachine project.
Django settings for csp project.
Generated by 'django-admin startproject' using Django 1.8.
Expand Down Expand Up @@ -51,7 +51,7 @@
'django.middleware.security.SecurityMiddleware',
)

ROOT_URLCONF = 'turingmachine.urls'
ROOT_URLCONF = 'csp.urls'

TEMPLATES = [
{
Expand All @@ -69,7 +69,7 @@
},
]

WSGI_APPLICATION = 'turingmachine.wsgi.application'
WSGI_APPLICATION = 'csp.wsgi.application'


# Database
Expand Down
2 changes: 1 addition & 1 deletion turingmachine/urls.py → csp/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

urlpatterns = [
# Examples:
# url(r'^$', 'turingmachine.views.home', name='home'),
# url(r'^$', 'csp.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),

url(r'^admin/', include(admin.site.urls)),
Expand Down
4 changes: 2 additions & 2 deletions turingmachine/wsgi.py → csp/wsgi.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
WSGI config for turingmachine project.
WSGI config for csp project.
It exposes the WSGI callable as a module-level variable named ``application``.
Expand All @@ -12,7 +12,7 @@
from django.core.wsgi import get_wsgi_application
from dj_static import Cling

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "turingmachine.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "csp.settings")

# application = get_wsgi_application()
application = Cling(get_wsgi_application())
2 changes: 1 addition & 1 deletion manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import sys

if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "turingmachine.settings")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "csp.settings")

from django.core.management import execute_from_command_line

Expand Down

0 comments on commit 8399dde

Please sign in to comment.