Skip to content

Commit

Permalink
Change to Andrew's project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Juan Pablo Santos committed Aug 26, 2015
1 parent bee036b commit 67b09f7
Show file tree
Hide file tree
Showing 17 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"DJANGO_SETTINGS_MODULE": {
"description": "Instructs our app to use the production settings module",
"value": "automated_survey.settings.production",
"value": "twilio_sample_project.settings.production",
"required": true
}
},
Expand Down
3 changes: 2 additions & 1 deletion automated_survey/management/commands/load_survey.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import os
from django.core.management import BaseCommand
from automated_survey.settings.env import root
from automated_survey.util.survey_loader import SurveyLoader

root = os.path.abspath(os.path.dirname(__name__))


class Command(BaseCommand):
COMMAND = 'load_surveys'
Expand Down
4 changes: 2 additions & 2 deletions automated_survey/tests/surveys_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def test_entry_point_redirection(self):
survey = Survey(title='A testing survey')
survey.save()

response = self.client.post('/first_survey/')
response = self.client.post(reverse('first-survey'))
expected_url = reverse('survey', kwargs={'survey_id': survey.id})

assert expected_url in response.url
Expand Down Expand Up @@ -54,7 +54,7 @@ def test_render_context(self):

question_response.save()

redirect = self.client.get('/')
redirect = self.client.get(reverse('app-root'))
survey_results_url = reverse('survey-results', kwargs={'survey_id': survey.id})

assert survey_results_url in redirect.url
Expand Down
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", "automated_survey.settings.local")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "twilio_sample_project.settings.local")

from django.core.management import execute_from_command_line

Expand Down
2 changes: 1 addition & 1 deletion pytest.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[pytest]
DJANGO_SETTINGS_MODULE=automated_survey.settings.test
DJANGO_SETTINGS_MODULE=twilio_sample_project.settings.test
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
'django.middleware.security.SecurityMiddleware',
)

ROOT_URLCONF = 'automated_survey.urls'
ROOT_URLCONF = 'twilio_sample_project.urls'

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

WSGI_APPLICATION = 'automated_survey.wsgi.application'
WSGI_APPLICATION = 'twilio_sample_project.wsgi.application'


# Database
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
5 changes: 5 additions & 0 deletions twilio_sample_project/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.conf.urls import include, url

urlpatterns = [
url(r'^automated_survey/', include('automated_survey.urls'))
]
2 changes: 1 addition & 1 deletion automated_survey/wsgi.py → twilio_sample_project/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "automated_survey.settings.production")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "twilio_sample_project.settings.production")

application = get_wsgi_application()
application = DjangoWhiteNoise(application)

0 comments on commit 67b09f7

Please sign in to comment.