initial project layout
This commit is contained in:
parent
64b23881de
commit
82c77fc031
7 changed files with 158 additions and 1 deletions
10
Makefile
Normal file
10
Makefile
Normal file
|
@ -0,0 +1,10 @@
|
|||
MANAGEPY=foreman run env/bin/python manage.py
|
||||
|
||||
update:
|
||||
virtualenv env
|
||||
env/bin/pip install -r requirements.txt
|
||||
$(MANAGEPY) syncdb
|
||||
$(MANAGEPY) migrate
|
||||
|
||||
run: update
|
||||
$(MANAGEPY) runserver 0.0.0.0:8000
|
1
Procfile
Normal file
1
Procfile
Normal file
|
@ -0,0 +1 @@
|
|||
web: python manage.py run_gunicorn -w4 -b 0.0.0.0:$PORT
|
28
README.md
28
README.md
|
@ -1,4 +1,30 @@
|
|||
rogueojiiofwales
|
||||
================
|
||||
|
||||
DjangoDash Awesomesauce
|
||||
DjangoDash Awesomesauce
|
||||
|
||||
|
||||
How-To
|
||||
------
|
||||
|
||||
* Clone the repo.
|
||||
* Add a git remote called ``heroku`` pointing at ``git@heroku.com:insertcreativenamehere.git``.
|
||||
* Run ``make run``.
|
||||
* Open http://localhost:8000
|
||||
* Hack.
|
||||
|
||||
|
||||
Run local commands
|
||||
------------------
|
||||
|
||||
``foreman run env/bin/python manage.py ...``
|
||||
|
||||
Run remote commands
|
||||
-------------------
|
||||
|
||||
``heroku run python manage.py ...``
|
||||
|
||||
Deploy
|
||||
------
|
||||
|
||||
``git push heroku master``
|
||||
|
|
8
manage.py
Normal file
8
manage.py
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env python
|
||||
from django.core.management import ManagementUtility
|
||||
import os
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
|
||||
utility = ManagementUtility(None)
|
||||
utility.execute()
|
17
requirements.txt
Normal file
17
requirements.txt
Normal file
|
@ -0,0 +1,17 @@
|
|||
Django==1.4.1
|
||||
South==0.7.6
|
||||
argparse==1.2.1
|
||||
dj-database-url==0.2.1
|
||||
django-heroku-memcacheify==0.3
|
||||
django-pylibmc-sasl==0.2.4
|
||||
django-social-auth==0.7.4
|
||||
gunicorn==0.14.6
|
||||
httplib2==0.7.4
|
||||
oauth2==1.5.211
|
||||
psycopg2==2.4.5
|
||||
pylibmc==1.2.3
|
||||
python-openid==2.2.5
|
||||
raven==2.0.3
|
||||
requests==0.13.6
|
||||
simplejson==2.4.0
|
||||
wsgiref==0.1.2
|
83
settings.py
Normal file
83
settings.py
Normal file
|
@ -0,0 +1,83 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
|
||||
TEMPLATE_DEBUG = DEBUG = os.environ.get('DEBUG', False)
|
||||
|
||||
MANAGERS = ADMINS = ()
|
||||
|
||||
LANGUAGES = [('en', 'en')]
|
||||
DEFAULT_LANGUAGE = 0
|
||||
LANGUAGE_CODE = 'en'
|
||||
|
||||
SITE_ID = 1
|
||||
|
||||
USE_L10N = USE_I18N = False
|
||||
|
||||
MEDIA_ROOT = os.path.join(PROJECT_DIR, 'media')
|
||||
MEDIA_URL = '/media/'
|
||||
|
||||
STATIC_ROOT = os.path.join(PROJECT_DIR, 'compiled-static')
|
||||
STATIC_URL = '/static/'
|
||||
|
||||
ADMIN_MEDIA_PREFIX = '/static/admin/'
|
||||
|
||||
STATICFILES_DIRS = [
|
||||
os.path.join(PROJECT_DIR, 'static'),
|
||||
]
|
||||
|
||||
TEMPLATE_LOADERS = (
|
||||
'django.template.loaders.filesystem.Loader',
|
||||
'django.template.loaders.app_directories.Loader',
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = [
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
]
|
||||
|
||||
TEMPLATE_CONTEXT_PROCESSORS = [
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.core.context_processors.i18n',
|
||||
'django.core.context_processors.request',
|
||||
'django.core.context_processors.media',
|
||||
'django.core.context_processors.static',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
]
|
||||
|
||||
ROOT_URLCONF = 'urls'
|
||||
|
||||
TEMPLATE_DIRS = [
|
||||
os.path.join(PROJECT_DIR, 'templates'),
|
||||
]
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
'django.contrib.sessions',
|
||||
'django.contrib.sites',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.staticfiles',
|
||||
'gunicorn',
|
||||
'south',
|
||||
'raven.contrib.django',
|
||||
]
|
||||
|
||||
from memcacheify import memcacheify
|
||||
|
||||
CACHES = memcacheify()
|
||||
|
||||
import dj_database_url
|
||||
|
||||
DATABASES = {'default': dj_database_url.config()}
|
||||
|
||||
RAVEN_CONFIG = {
|
||||
'dsn': os.environ.get("SENTRY_DSN", None),
|
||||
}
|
||||
|
||||
SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
|
12
urls.py
Normal file
12
urls.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from django.conf import settings
|
||||
from django.conf.urls import patterns, url, include
|
||||
from django.contrib import admin
|
||||
import re
|
||||
|
||||
admin.autodiscover()
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^%s(?P<path>.*)$' % re.escape(settings.STATIC_URL.lstrip('/')), 'django.contrib.staticfiles.views.serve', {'insecure': True}),
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue