[ELI5] how to deploy django

2014-03-03 Thread Walter Wang
 I tried my best to follow the various guides out there, but the official 
documentation here 
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/modwsgi/ has 
different instructions than the instructions here, 
https://www.digitalocean.com/community/articles/using-mod_wsgi-to-serve-applications-on-ubuntu-12-04
 


I have been at this for over a week now, and I can't figure out how to 
deploy django with mod_wsgi and apache on a linux web server. 

Can someone give or point to me a step to step instruction on how to deploy 
django?

Specifically,
1. what do I do with the httpd.conf file? 
2. wsgi file? what's the difference between "making a wsgi file" and a 
wsgi.py file? For example


"wsgi file"

import os
import sys  
sys.path.append('~/public_html/domain1.com/')
os.environ['DJANGO_SETTINGS_MODULE'] = 'MyTestProject.settings'
import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()



"wsgi.py"

import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mywebsite.settings")

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

Thank you for any help. 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/54c378a2-4212-4e7f-b5bb-2c816ed7655a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ELI5] how to deploy django

2014-03-04 Thread Walter Wang
Thanks alot for all your answers, I really appreciate it.

I am using ubuntu 12.04 lts hosted on digitalocean. Apache version is 2.2.2 
and django is 1.6, I created a virtualenv in the home directory, named 
myproject, I am using python3.2 as the interpreter in the virtualenv. 

All your answers has given renewed energy. 

So from reading all your answers, based on having django 1.6. I should edit 
the wsgi.py file and I don't have to make a "wsgi file" according to the 
digital ocean instructions.

What about the httpd.conf file? According to sam I should not touch it, but 
the official documentation for 1.6 says otherwise.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2728636a-1b69-4836-b5f4-bb95c89f39ea%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.