Skip to content

Commit

Permalink
Merge pull request #12 from djibon/master
Browse files Browse the repository at this point in the history
Implement #9 Put changes from introduction_es to django-project-template
  • Loading branch information
alexlovelltroy committed Oct 29, 2014
2 parents 5ec6692 + 5e79d2d commit 8a553a0
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 12 deletions.
3 changes: 2 additions & 1 deletion Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
web: gunicorn_django --workers=4 --bind=0.0.0.0:$PORT {{ project_name }}/{{ project_name }}/settings

web: gunicorn --bind=0.0.0.0:$PORT {{ project_name }}.wsgi:application --log-file -
worker: python manage.py celeryd -E -B --loglevel=INFO
7 changes: 6 additions & 1 deletion introductions/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
import string

from django.conf import settings
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.dispatch import receiver

Expand All @@ -10,6 +12,9 @@

from email_reply_parser import EmailReplyParser

from django.contrib.contenttypes.generic import GenericForeignKey
from django.contrib.contenttypes.models import ContentType

from taggit.managers import TaggableManager
#http://alexgaynor.net/2010/may/04/cool-new-django-taggit-api/
from taggit.models import TaggedItemBase
Expand Down Expand Up @@ -248,4 +253,4 @@ def process_message(sender, message, **args):
print "Created an introduction from %s on intro: %s" % (message.from_header, intro.pk)
else:
print "Ignore introduction"
s

22 changes: 14 additions & 8 deletions project_name/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import dj_database_url

import django.conf.global_settings as DEFAULT_SETTINGS

PROJECT_ROOT = os.path.join(os.path.dirname(__file__), '..', '..')
PROJECT_ROOT = os.path.abspath(os.path.dirname(__name__))
#PROJECT_ROOT = os.path.join(os.path.dirname(__file__), '..', '..')

# Modify sys.path to include the lib directory
sys.path.append(os.path.join(PROJECT_ROOT, "lib"))
Expand Down Expand Up @@ -106,7 +106,10 @@
)

# Make this unique, and don't share it with anybody.
SECRET_KEY = os.environ['DJANGO_SECRET_KEY']
try:
SECRET_KEY = os.environ['DJANGO_SECRET_KEY']
except:
SECRET_KEY = "BABABABA"

# List of callables that know how to import templates from various sources.
TEMPLATE_LOADERS = (
Expand All @@ -123,7 +126,7 @@
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',

'debug_toolbar.middleware.DebugToolbarMiddleware',
# 'debug_toolbar.middleware.DebugToolbarMiddleware',
)

ROOT_URLCONF = '{{ project_name }}.urls'
Expand All @@ -148,7 +151,7 @@

'classy_mail',
'compressor',
'debug_toolbar',
# 'debug_toolbar',
'django_mailbox',
'django_ses',
'djcelery',
Expand Down Expand Up @@ -180,9 +183,9 @@
INTERNAL_IPS = ('127.0.0.1', '10.0.2.2')

# django-debug-toolbar settings
DEBUG_TOOLBAR_CONFIG = {
'INTERCEPT_REDIRECTS': False,
}
#DEBUG_TOOLBAR_CONFIG = {
# 'INTERCEPT_REDIRECTS': False,
#}

THUMBS_GENERATE_ANY_SIZE = True

Expand All @@ -197,6 +200,9 @@
PATH_LOG = os.path.join(PATH_DATA, 'logs')


#if not os.path.exists(PATH_LOG):
# os.mkdir(PATH_LOG)

TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + (
'django.core.context_processors.request',
)
Expand Down
3 changes: 2 additions & 1 deletion project_name/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
url(r'^admin/', include(admin.site.urls)),
url(r'^admin/django-ses/', include('django_ses.urls')),
url('', include('social.apps.django_app.urls', namespace='social')),
url('', include('introductions.urls', namespace='introductions'))
url('', include('introductions.urls', namespace='introductions')),
url('', include('eagle_design.urls'))

)

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Django
Django==1.5.0
South
boto
django-avatar
Expand Down

0 comments on commit 8a553a0

Please sign in to comment.