We love designing and developing websites, but what really drives us is solving problems and cultivating strong relationships with our clients
Deploying Django apps on Heroku
By : shabda
Read this first: http://devcenter.heroku.com/articles/django.
This is a great article by the Heroku. I am just filling in some more details and making this step-by-step.
Get your Django project code.
Create a virtualenv with a no-site-packages command
virtualenv vent --no-site-packages
Install Django, psycopg2 (postgres connector), gunicorn and any other required Django libraries.
Confirm that you have all the required libraries and you can run your code locally using manage.py runserver.
- Create a requirement.txt by using
pip freeze > requirements.txt
Make sure you have a requirements.txt at the root of your repo. Heroku uses this to identify that the app is a Python app.
Create a Procfile. Put this entry:
web: python mysite/manage.py run_gunicorn -b "0.0.0.0:$PORT" -w 3shabda
This is what your directory structure will look like
[root-of-heroku-folder] requirements.txt Procfile [Django-project-folder] __init__.py manage.py settings.py [app1] [app2](If you aren't tracking your files with git yet.) Track your files with git.
git init git add . git commit -am "First commit"
Make sure you have the heroku toolbelt installed. If not go to http://toolbelt.herokuapp.com/ and install.
11.You should have these commands available now:
heroku foreman
Authenticate to heroku with
heroku auth:login
Run this command.
heroku create --stack cedar
This will create a new Heroku app and create a new remote in your git repo.
Push your code to heroku.
git push heroku master
Your app should be working on Heroku now. heroku open will show your site.
Comments
- Test Driven Development in Python
- Deploying Django apps on Heroku
- Developing android applications from command line
- Deploy Django App in 5 Easy Steps
- Project Management Tools for Start-Ups
- Generating a pdf from an image using PIL and django
- Dynamically attaching SITE_ID to Django Caching
- Screencast: How to deploy Django on Heroku
- Deploying Django apps on Heroku
- How to use pep8.py to write better Django code
- rails
- django
- linkroundup
- django opinion
- opinion
- business
- API
- appengine
- python
- satire
- startup
- Uncategorized
- marketing
- personal
- rambling
- search
- interviews
- seo-interviews
- 5startupideas
- ideas
- seo
- tips
- forms
- paypal
- utilities
- datetime
- web2.0
- Amazon
- algorithms
- presentations
- products
- pinax
- satchmo
- ecommerce
- microsoft
- yahoo
- book
- tutorial
- models
- aggreagtion
- meta
- India
- apps
- about
- CSS
- Design
- wordpress
- test slug
- vim
- urls
- reviews
- javascript
- xmpp
- emacs
- Typography
- Grid Theory
- Color Theory
- iphone
- android
- titanium
- mobile applications
- CSS3
- Browser Compatibility
- mobile
- jobs
- lamson
- django setup
- files
- upload
- jsTree
- hierarchical view
- web page
- Treeview
- coffeescript
- request
- response
- South
- django south
- django migration
- --fake
- screencasts
- django caching
- SITE_ID prefix
- review
- code hosting
- comparison
- unfuddle
- fogbugz
- assembla
- github
- project management
- ticketing system
- gunicorn
- deploy
- nginx
- ubuntu
- vps
- android terminal
- terminal
- programming
- TDD
- Test Driven
- Development
- May 2012
- April 2012
- March 2012
- February 2012
- January 2012
- December 2011
- October 2011
- September 2011
- July 2011
- June 2011
- April 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- June 2010
- April 2010
- March 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- July 2009
- June 2009
- April 2009
- March 2009
- February 2009
- November 2008
- October 2008
- June 2008
- May 2008
- April 2008
Hi and first of all thanks to you for your sharing this great info – I have definitely picked up anything new from right here. I did however expertise several technical points using your blog, as I experienced to reload the web site very slow and some time it takes a lot of time. This is my friendly suggestion to you to change your service provider as I have also open to http://priceof.in/ and ots really fast as compare to your service provider, Anyway I’m adding this RSS to my e-mail and could look out for a lot more of your respective fascinating content. Ensure that you update this again very soon.