-
-
Notifications
You must be signed in to change notification settings - Fork 332
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from nitely/future
v0.2.0
- Loading branch information
Showing
164 changed files
with
2,730 additions
and
1,467 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,24 @@ | ||
* text=auto | ||
# Git will handle the files in whatever way it thinks is best | ||
* text=auto | ||
|
||
# Always convert line endings to LF on checkout | ||
*.py text eol=lf | ||
*.coffe text eol=lf | ||
*.js text eol=lf | ||
*.scss text eol=lf | ||
*.css text eol=lf | ||
*.html text eol=lf | ||
*.md text eol=lf | ||
*.txt text eol=lf | ||
*.yml text eol=lf | ||
*.po text eol=lf | ||
|
||
# Files that are truly binary and should not be modified | ||
*.png binary | ||
*.jpg binary | ||
*.ico binary | ||
*.eot binary | ||
*.svg binary | ||
*.ttf binary | ||
*.woff binary | ||
*.mo binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#Running the example application | ||
|
||
Assuming you use virtualenv, follow these steps to download and run the | ||
Spirit example application in this directory: | ||
|
||
|
||
$ git clone https://github.com/nitely/Spirit.git | ||
$ cd Spirit | ||
$ virtualenv venv | ||
$ source ./venv/bin/activate | ||
$ pip install . | ||
$ cd example | ||
$ python manage.py migrate | ||
$ python manage.py createcachetable spirit_cache | ||
$ export SECRET_KEY="My dev box" | ||
$ python manage.py runserver | ||
|
||
> **Note:** | ||
> | ||
> When running on production, remember to set the SECRET_KEY environment | ||
> variable or use your own setting file to set it. | ||
> | ||
> If you want to give it a quick spin, run `$ python manage.py runserver --settings=project.settings.dev` | ||
You should then be able to open your browser on http://127.0.0.1:8000 and | ||
see the Spirit homepage. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/usr/bin/env python | ||
import os | ||
import sys | ||
|
||
if __name__ == "__main__": | ||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project.settings.prod") | ||
|
||
from django.core.management import execute_from_command_line | ||
|
||
execute_from_command_line(sys.argv) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__author__ = 'Admin' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# THIS IS FOR DEVELOPMENT ENVIRONMENT | ||
# DO NOT USE IT IN PRODUCTION | ||
|
||
# Create your own dev_local.py | ||
# import * this module there and use it like this: | ||
# python manage.py runserver --settings=project.settings.dev_local | ||
|
||
from __future__ import unicode_literals | ||
|
||
from .base import * | ||
|
||
|
||
DEBUG = True | ||
|
||
TEMPLATE_DEBUG = True | ||
|
||
SECRET_KEY = "DEV" | ||
|
||
ALLOWED_HOSTS = ['127.0.0.1', ] | ||
|
||
INSTALLED_APPS += ( | ||
'debug_toolbar', | ||
) | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), | ||
} | ||
} | ||
|
||
CACHES.update({ | ||
'default': { | ||
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', | ||
}, | ||
}) | ||
|
||
PASSWORD_HASHERS = ( | ||
'django.contrib.auth.hashers.MD5PasswordHasher', | ||
) | ||
|
||
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,15 @@ | |
|
||
# MINIMAL CONFIGURATION FOR PRODUCTION ENV | ||
|
||
# Create your own prod_local.py | ||
# import * this module there and use it like this: | ||
# python manage.py runserver --settings=project.settings.prod_local | ||
|
||
from __future__ import unicode_literals | ||
|
||
from .base import * | ||
|
||
|
||
DEBUG = False | ||
|
||
TEMPLATE_DEBUG = False | ||
|
@@ -12,11 +19,18 @@ | |
ADMINS = (('John', '[email protected]'), ) | ||
|
||
# Secret key generator: https://djskgen.herokuapp.com/ | ||
SECRET_KEY = '' | ||
# You should set your key as an environ variable | ||
SECRET_KEY = os.environ.get("SECRET_KEY", "") | ||
|
||
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts | ||
ALLOWED_HOSTS = ['.example.com', ] | ||
|
||
# Extend the Spirit installed apps (notice the plus sign) | ||
# Check out the .base.py file for more examples | ||
INSTALLED_APPS += ( | ||
# 'my_app1', | ||
) | ||
|
||
# https://docs.djangoproject.com/en/dev/ref/settings/#databases | ||
DATABASES = { | ||
'default': { | ||
|
@@ -41,3 +55,11 @@ | |
|
||
# Default language | ||
LANGUAGE_CODE = 'en' | ||
|
||
# Keep templates in memory | ||
TEMPLATE_LOADERS = ( | ||
('django.template.loaders.cached.Loader', ( | ||
'django.template.loaders.filesystem.Loader', | ||
'django.template.loaders.app_directories.Loader', | ||
)), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# THIS IS FOR DEVELOPMENT ENVIRONMENT | ||
# DO NOT USE IT IN PRODUCTION | ||
|
||
# This is used to test settings and urls from example directory | ||
# with `./runtests.py example` | ||
|
||
from __future__ import unicode_literals | ||
|
||
from .base import * | ||
|
||
SECRET_KEY = "TEST" | ||
|
||
INSTALLED_APPS += ( | ||
'tests', | ||
) | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': os.path.join(BASE_DIR, 'db_test.sqlite3'), | ||
} | ||
} | ||
|
||
ROOT_URLCONF = 'example.project.urls' | ||
|
||
PASSWORD_HASHERS = ( | ||
'django.contrib.auth.hashers.MD5PasswordHasher', | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.