Reputation: 13553
I would like to deplay a django application/project, which i have created within Aptana. It is a simple hello world. I can run the application locally and everything works fine, but how to deploy it to a webserver. The deploy button is grey and not working in the PyDev Perspective. If i switch to perspective "Web Perspective" i can download(check out from a specific path with password) django applications from a webserver, edit files, and upload again. I would like to use the functionality from the web perspective in my pydev perspective where i write my django code.
But when i create my own django project, the button deploy is grey.
Upvotes: 2
Views: 1861
Reputation: 13553
This is now my solution to deploy django 1.3 with aptana to Apache Server:
https://i.sstatic.net/wHiME.jpg
def index(request): return HttpResponse("Hello world")
http://127.0.0.1:8000/index
or http://127.0.0.1:8000
If this worked, now lets deploy to apache:
import os
import sys
path = "/home/username/"
if path not in sys.path: sys.path.append(path)
path = "/home/username/somedirectory/test1/test1/"
if path not in sys.path: sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
import django.core.handlers.wsgi application = django.core.handlers.wsgi.WSGIHandler()
WSGIScriptAlias /rofltest /home/username/wsgi/test1.wsgi
/home/username/wsgi/test1.wsgi means where to look for a file which will tell where to look for your django app on the server
restart apache (/etc/init.d/apache2 restart) and browse to www.youraddress.org//rofltest/index
Try it, if it fails, write a comment and maybe i read it and help. If this helped, upvote it.
Upvotes: 3
Reputation: 11
It doesnt work for me. Even when I extra care about not selecting the project in the App Explorer, the small "publish" icon is enabled, but the dropdown beside it is empty and nothing happens when I click it.
Actually there is a known bug when the Project root is a source folder, see https://jira.appcelerator.org/browse/APSTUD-2543
Upvotes: 1