<tt><font size=2>&gt; From: mrunge@matthias-runge.de</font></tt>
<br><tt><font size=2>&gt; To: &lt;devel@lists.fedoraproject.org&gt;</font></tt>
<br><tt><font size=2>&gt; Date: 01/21/2014 15:38</font></tt>
<br><tt><font size=2>&gt; Subject: Re: Best Practices for Django App Packaging</font></tt>
<br><tt><font size=2>&gt; Sent by: devel-bounces@lists.fedoraproject.org</font></tt>
<br><tt><font size=2>&gt; <br>
&gt; On 01/21/2014 05:22 PM, John.Florian@dart.biz wrote:<br>
&gt; <br>
&gt; &gt;&gt; [1]<br>
&gt; &gt;&gt; </font></tt><a href="http://pkgs.fedoraproject.org/cgit/python-django-horizon.git/tree/"><tt><font size=2>http://pkgs.fedoraproject.org/cgit/python-django-horizon.git/tree/</font></tt></a><tt><font size=2><br>
&gt; &gt;&gt; openstack-dashboard.conf<br>
&gt; &gt;&gt; [2]<br>
&gt; &gt;&gt; </font></tt><a href="http://pkgs.fedoraproject.org/cgit/python-django-horizon.git/tree/"><tt><font size=2>http://pkgs.fedoraproject.org/cgit/python-django-horizon.git/tree/</font></tt></a><tt><font size=2><br>
&gt; &gt;&gt; openstack-dashboard-httpd-2.4.conf<br>
&gt; &gt;&gt; [3]<br>
&gt; &gt;&gt; </font></tt><a href="http://pkgs.fedoraproject.org/cgit/python-django-horizon.git/tree/"><tt><font size=2>http://pkgs.fedoraproject.org/cgit/python-django-horizon.git/tree/</font></tt></a><tt><font size=2><br>
&gt; &gt;&gt; python-django-horizon.spec<br>
&gt; &gt; <br>
&gt; &gt; Thanks Matthias! &nbsp;That's quite a complicated example, although
I can see<br>
&gt; &gt; there's much I can learn from it. &nbsp;Unfortunately, it's not
the ideal<br>
&gt; &gt; example because it moves everything that setup.py builds into<br>
&gt; &gt; /usr/share/openstack-dashboard. &nbsp;I need to keep stuff under<br>
&gt; &gt; /usr/lib/pythonX.Y/site-packages so that the other, non-Django,
parts<br>
&gt; &gt; continue to work as expected. &nbsp;(I suppose I could just relocate
the<br>
&gt; &gt; Django-parts of the build, but sounds like it will break more
things<br>
&gt; &gt; that it will help.)<br>
&gt; <br>
&gt; Yes, you're right. It's not the ideal and simple example.<br>
&gt; <br>
&gt; On the other side, it doesn't matter if you put all that stuff to<br>
&gt; /usr/share or to %{python_sitelib}<br>
&gt; <br>
&gt; Basically, you just need the two files. Stephen had another, more
simple<br>
&gt; example. This gets the job done. For most real world deployments you'd<br>
&gt; need some more config changes (database, caching, ssl, and more securing).<br>
&gt; <br>
&gt; Matthias<br>
</font></tt>
<br><tt><font size=2>Yup, I'm seeing it now. &nbsp;I realize sqlite is
normally used for production deployments, but in my case I would have been
totally fine with it since I know the number of &quot;user&quot; connections
is always going to be less than 20 or so: one real human on rare occasions
and the rest from machines that are almost always going to get a cached
page since they're each asking once a minute for their own same page. &nbsp;However,
SELinux made me adopt the better practice of using Postgresql since all
the policy is there for that. &nbsp;:-)</font></tt>
<br>
<br><tt><font size=2>I've got a deployed (test) setup roughly working now.
&nbsp;Next step is to clean up the &quot;hard to maintain &amp; it's fragile&quot;
aspects. &nbsp;I will probably wind up doing as openstack-dashboard does
and moving some of the python package/modules out of /usr/lib/pythonX.Y
and into /usr/share/my_app since the rpm spec can do that much smartly.
&nbsp;Then my puppet manifests can refer to things that aren't such moving
targets.</font></tt>
<br>
<br><tt><font size=2>I largely want to avoid a big mess of figuring out
how to migrate the deployed instance to new hosts as Fedora releases come
out. &nbsp;(As a rule, we never upgrade; just reinstall with much help
from puppet. &nbsp;Think of it as a fire drill.) &nbsp;Hopefully I'll get
to keep playing with Django in the future so it all doesn't become foreign
6 months from now.</font></tt>
<br>
<br><tt><font size=2>Thanks to all for the pointers. &nbsp;They've been
a big help.</font></tt>
<br><font size=2 face="sans-serif"><br>
--<br>
John Florian</font>
<br>