Reputation: 36227
I am trying to set up a Django 1.7 project to push to openshift. I'm following https://github.com/jfmatth/openshift-django17. I've sucessfully got the initial project going locally, now I'm trying to move a local project into this file structure so I can deploy it.
I can run the project fine locally. After pushing to openshift I see:
remote: Starting Python 2.7 cartridge (Apache+mod_wsgi)
remote: Application directory "wsgi/" selected as DocumentRoot
remote: $OPENSHIFT_PYTHON_WSGI_APPLICATION ENV VAR detected
remote: Application "mysite/wsgi.py" selected as default WSGI entry point
remote: --> ACTION HOOK: post_deploy <--
remote: -------------------------
remote: Git Post-Receive Result: success
remote: Activation status: success
remote: Deployment completed with status: success
To ssh://54***00003f@***-***.rhcloud.com/~/git/**.git/
0a488d3..5af95ee master -> master
mysite.urls.py contains:
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'mysite.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^index/', 'app1.views.index', name='index'),
url(r'^contact/$', 'app1.views.contact', name='contact'),
url(r'^admin/', include(admin.site.urls)),
)
mysite.views contains:
from django.views.generic import View
from django.http import HttpResponse
class Index(View):
def get(self, request, *args, **kwargs):
return HttpResponse('django 1.7 on Openshift')
When I open the openshift url , I get!:
Not Found . The requested URL / was not found on this server.
The templates are all in the templates folder (in the screenshot). I copied it over from under the static root.
How can get the project working on openshift deployment?
Upvotes: 0
Views: 1760
Reputation: 84
Bill, do you have your repo for this hosted on github? if so, paste the link here and i can go over all the files to find your issue.
If not, please post your URLs.py an dViews.py
Did you get the base repo working first, before adding anything you wanted changed? Meaning, follow my instructions to the letter on the repo, get it running locally and then on OS?
I've had several questions / issues when people don't run the base install first, and then add their logic.
Upvotes: 1