I'm working with a friend on a web application we'd like to distribute and we're working in Django.
I'd like to make sure deployment is as easy as possible for potential users. It seems that Django uses shared installed libraries alot and I'd like for folks to just need to download our latest version, unzip, edit a config file or two and get started, like wordpress etc.
I'm used to the ruby on rails style deployment where you pistonize your gems and plugins into a vendor directory and that's all you need to rely on.
What's the analogous django way to deploy an application with all of the dependencies bundled? I'd prefer not to have to use something like easy_install to pull down dependencies after install.
This Python Stack Overflow Answer seems like it is on the right track, but is there a django specific way to go? Is this a solved problem?
Your best bet here is to make use of pip. pip is a utility for installing python packages. it allows you to create requirements files that list dependencies for a project. pip is quite common and widely used by the Django community, and I would highly recommend using it.
As T. Stone mentioned Pinax, a Django-based project has many dependencies and they make use of pip requirements files quite sucessfully.
This is one of the big limitations with the Django "Reusable app". On the "This Week in Django" podcast a week or two ago they were talking about this exact problem. It seems the consensus, and I agree, is that there really isn't a solution.
If you look at Pynax, which is probably the largest distributed Django project, you'll see they are bundling the apps with the whole system.
Python itself has a few package distributions. I know ActiveState is working on starting up another. But even then not all of the django apps are packaged. Many are only found in bitbucket, github, or google source. And even then, to get a copy of all those requires one to have mercurial, git, and svn installed. (blah @ that)
You basically have 2 options here:
It's a sad list, I know. It sucks actually, especially after using the ruby gem system, but at the moment I'm not sure what better you're going to find.
If it's of any interest, I wrote a short blog post about keeping dependencies in your project's folder (or in SVN) and then adding that path to Python's search path at the start of django. ( Managing Django Dependencies via SVN ) It screws up Komodo Edit's intellisense, but it does make things easier otherwise.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With