Best Practices for Django App Packaging

Matthias Runge mrunge at matthias-runge.de
Tue Jan 21 20:38:06 UTC 2014


On 01/21/2014 05:22 PM, John.Florian at dart.biz wrote:

>> [1]
>> http://pkgs.fedoraproject.org/cgit/python-django-horizon.git/tree/
>> openstack-dashboard.conf
>> [2]
>> http://pkgs.fedoraproject.org/cgit/python-django-horizon.git/tree/
>> openstack-dashboard-httpd-2.4.conf
>> [3]
>> http://pkgs.fedoraproject.org/cgit/python-django-horizon.git/tree/
>> python-django-horizon.spec
> 
> Thanks Matthias!  That's quite a complicated example, although I can see
> there's much I can learn from it.  Unfortunately, it's not the ideal
> example because it moves everything that setup.py builds into
> /usr/share/openstack-dashboard.  I need to keep stuff under
> /usr/lib/pythonX.Y/site-packages so that the other, non-Django, parts
> continue to work as expected.  (I suppose I could just relocate the
> Django-parts of the build, but sounds like it will break more things
> that it will help.)

Yes, you're right. It's not the ideal and simple example.

On the other side, it doesn't matter if you put all that stuff to
/usr/share or to %{python_sitelib}

Basically, you just need the two files. Stephen had another, more simple
example. This gets the job done. For most real world deployments you'd
need some more config changes (database, caching, ssl, and more securing).

Matthias


More information about the devel mailing list