These are chat archives for django/django

15th
Apr 2017
Kaushal Kumar
@kaushal087
Apr 15 2017 07:52
Hi, I have my website ready and I want to deploy it to EC2 free tier instance. I will store Media files on S3. At first I was trying to deploy the project on my local computer having Linux mint 18 (based on Ubuntu 16). I have tried many tutorial for deployment on nginx server with gunicorn/uWsgi. But there was always some error. Could anyone please give
me a link to the tutorial to deploy django application having media files, static files on nginx. Thanks
Kaushal Kumar
@kaushal087
Apr 15 2017 08:14
thanks @MBijman I have tried this one also. But still I will try it again.
MBijman
@MBijman
Apr 15 2017 08:14
let me walk you through some steps then
step one is that you look into your setting file where your static files are located
step two is use that path name in your nginx config for static location /static/ { root /home/user/myproject; }
step three run python manage.py collectstatic
????
step five profit
Kaushal Kumar
@kaushal087
Apr 15 2017 08:26
you should have a fresh Ubuntu 14.04 server instance with a non-root user with sudo privileges configured.
I don't have ubuntu server. Is it required?
How it is different from ubuntu distro?
My nginx server runs for other project written in laravel/php
MBijman
@MBijman
Apr 15 2017 14:43
nginx can run mutliple websites from the same server
glad that worked for you
Easwar Moorthy
@easwarmoorthy
Apr 15 2017 15:34
I have deployed my app to heroku. But it appears Application Error. While running heroku logs it says
"Couldn't import Django. Are you sure it's installed and "
2017-04-15T15:24:50.092568+00:00 app[web.1]: ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment?
how to solve this
MBijman
@MBijman
Apr 15 2017 16:24
@easwarmoorthy can you show your requirements.txt file
Easwar Moorthy
@easwarmoorthy
Apr 15 2017 16:29
appdirs==1.4.3
Django==1.10.5
packaging==16.8
pyparsing==2.2.0
six==1.10.0
@MBijman
Easwar Moorthy
@easwarmoorthy
Apr 15 2017 16:40
I ran pip freeze > requirements.txt and then it worked fine... thank you
MBijman
@MBijman
Apr 15 2017 16:48
no problem