/docs/html/upgrading.html
HTML | 303 lines | 294 code | 9 blank | 0 comment | 0 complexity | 6331d6db062de95e81faf42e1565f0c1 MD5 | raw file
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <title>3. Upgrade — OpenEats2 v2.2.0 documentation</title>
- <link rel="stylesheet" href="_static/default.css" type="text/css" />
- <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
- <script type="text/javascript">
- var DOCUMENTATION_OPTIONS = {
- URL_ROOT: '',
- VERSION: '2.2.0',
- COLLAPSE_INDEX: false,
- FILE_SUFFIX: '.html',
- HAS_SOURCE: true
- };
- </script>
- <script type="text/javascript" src="_static/jquery.js"></script>
- <script type="text/javascript" src="_static/underscore.js"></script>
- <script type="text/javascript" src="_static/doctools.js"></script>
- <link rel="top" title="OpenEats2 v2.2.0 documentation" href="index.html" />
- <link rel="next" title="4. Configuration" href="config.html" />
- <link rel="prev" title="2. Installation" href="install.html" />
- </head>
- <body>
- <div class="related">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- accesskey="I">index</a></li>
- <li class="right" >
- <a href="config.html" title="4. Configuration"
- accesskey="N">next</a> |</li>
- <li class="right" >
- <a href="install.html" title="2. Installation"
- accesskey="P">previous</a> |</li>
- <li><a href="index.html">OpenEats2 v2.2.0 documentation</a> »</li>
- </ul>
- </div>
- <div class="document">
- <div class="documentwrapper">
- <div class="bodywrapper">
- <div class="body">
-
- <div class="section" id="upgrade">
- <h1>3. Upgrade<a class="headerlink" href="#upgrade" title="Permalink to this headline">¶</a></h1>
- <div class="section" id="upgrade-2-0-to-2-1">
- <h2>3.1. Upgrade 2.0 to 2.1<a class="headerlink" href="#upgrade-2-0-to-2-1" title="Permalink to this headline">¶</a></h2>
- <p>This procedure covers how to upgrade your existing 2.0 OpenEats2 site to version 2.1</p>
- <div class="section" id="install">
- <h3>3.1.1. Install<a class="headerlink" href="#install" title="Permalink to this headline">¶</a></h3>
- <ul class="simple">
- <li>Download the latest package from <a class="reference external" href="https://github.com/qgriffith/OpenEats">github</a></li>
- <li>Unzip the file</li>
- <li>Backup your database</li>
- <li>Backup your current site files</li>
- <li>From the unzip file, copy everything other then the settings.py, site-media/upload and site-media/uploads file into your current openeats directory, over writing
- what is already there</li>
- </ul>
- </div>
- <div class="section" id="config-file-changes">
- <h3>3.1.2. Config File Changes<a class="headerlink" href="#config-file-changes" title="Permalink to this headline">¶</a></h3>
- <p>Some minor changes need to be made to the settings.py file of your current site.</p>
- <p>Remove the following from the installed apps section of the settings.py file</p>
- <ul class="simple">
- <li>admin_tools.theming</li>
- <li>admin_tools.menu</li>
- <li>admin_tools.menu</li>
- </ul>
- <p>Add the following to the installed apps section of the settings.py file on the <em>first</em> line:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="s">'grappelli.dashboard'</span><span class="p">,</span>
- </pre></div>
- </div>
- <p>Add the following to the installed apps section of the settings.py file:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="s">'django.contrib.staticfiles'</span><span class="p">,</span>
- </pre></div>
- </div>
- <p>Remove the following from the <em>context processors</em> section of the settings.py file:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="s">"grappelli.context_processors.admin_template_path"</span><span class="p">,</span>
- </pre></div>
- </div>
- <p>Add the following to the <em>context processors</em> section of the settings.py file:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="s">"openeats.context_processors.oetitle"</span><span class="p">,</span>
- </pre></div>
- </div>
- <p>Add the following line to the settings.py file:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="n">LOCALE_PATHS</span> <span class="o">=</span> <span class="p">(</span>
- <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">BASE_PATH</span><span class="p">,</span> <span class="s">'locale'</span><span class="p">,)</span>
- <span class="p">)</span>
- </pre></div>
- </div>
- <p>Remove the following lines in your settings.py file:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="n">ADMIN_TOOLS_INDEX_DASHBOARD</span> <span class="o">=</span> <span class="s">'openeats.dashboard.CustomIndexDashboard'</span>
- <span class="n">ADMIN_TOOLS_APP_INDEX_DASHBOARD</span> <span class="o">=</span> <span class="s">'openeats.dashboard.CustomAppIndexDashboard'</span>
- </pre></div>
- </div>
- <p>Add the following line to your settings.py file:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="n">GRAPPELLI_INDEX_DASHBOARD</span> <span class="o">=</span> <span class="s">'openeats.dashboard.CustomIndexDashboard'</span>
- </pre></div>
- </div>
- <p>Add the following lines to your settings.py file:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="n">STATIC_ROOT</span> <span class="o">=</span> <span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">BASE_PATH</span><span class="p">,</span> <span class="s">'static-files'</span><span class="p">)</span>
- <span class="n">STATIC_URL</span> <span class="o">=</span> <span class="s">'/static-files/'</span>
- </pre></div>
- </div>
- <p>Change the <em>ADMIN_MEDIA_PREFIX</em> setting in the settings.py file to this:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="n">ADMIN_MEDIA_PREFIX</span> <span class="o">=</span> <span class="n">STATIC_URL</span> <span class="o">+</span> <span class="s">"grappelli/"</span>
- </pre></div>
- </div>
- <p>Add the following line under the <em>OpenEats Settings</em> section of the settings.py file:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="n">OETITLE</span><span class="o">=</span><span class="s">"OpenEats2"</span>
- </pre></div>
- </div>
- <p>You can set this to anything you want your site title to be, it doesn’t have to be set to <em>OpenEats2</em></p>
- <p>Remove the following line from urls.py:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="n">url</span><span class="p">(</span><span class="s">r'^admin_tools/'</span><span class="p">,</span> <span class="n">include</span><span class="p">(</span><span class="s">'admin_tools.urls'</span><span class="p">)),</span>
- </pre></div>
- </div>
- </div>
- <div class="section" id="removing-directories">
- <h3>3.1.3. Removing directories<a class="headerlink" href="#removing-directories" title="Permalink to this headline">¶</a></h3>
- <p>The following directories are no longer needed for version 2.1 and can be removed</p>
- <ul class="simple">
- <li>grappelli</li>
- <li>site-media/admin</li>
- <li>site-media/admin_tools</li>
- </ul>
- </div>
- <div class="section" id="upgrade-third-party-apps">
- <h3>3.1.4. Upgrade third party apps<a class="headerlink" href="#upgrade-third-party-apps" title="Permalink to this headline">¶</a></h3>
- <p>To upgrade all the packages that OpenEats2 requires perform the following steps.</p>
- <ul>
- <li><p class="first">Activate your virtualenv</p>
- </li>
- <li><p class="first">Change to the directory that you unzipped the OpenEats2 files into</p>
- </li>
- <li><p class="first">Run the following command:</p>
- <div class="highlight-python"><pre>pip install -r OE2_Requirements.txt --upgrade</pre>
- </div>
- </li>
- </ul>
- </div>
- <div class="section" id="database-changes">
- <h3>3.1.5. Database changes<a class="headerlink" href="#database-changes" title="Permalink to this headline">¶</a></h3>
- <p>Run the following command from the OpenEats2 directory:</p>
- <div class="highlight-python"><pre>./manage.py syncdb
- ./manage.py migrate djangoratings 0001 --fake
- ./manage.py migrate djangoratings 0002 --fake
- ./manage.py migrate djangoratings 0003
- ./manage.py migrate djangoratings 0004 --fake
- ./manage.py migrate djangoratings 0005 --fake
- ./manage.py migrate djangoratings
- ./manage.py migrate sentry 0001 --fake
- ./manage.py migrate sentry 0002 --fake
- ./manage.py migrate sentry 0003 --fake
- ./manage.py migrate sentry 0004 --fake
- ./manage.py migrate sentry 0005 --fake
- ./manage.py migrate sentry 0006 --fake
- ./manage.py migrate sentry 0007 --fake
- ./manage.py migrate sentry 0008 --fake
- ./manage.py migrate sentry 0009 --fake
- ./manage.py migrate sentry
- ./manage.py migrate</pre>
- </div>
- </div>
- <div class="section" id="third-party-static-files">
- <h3>3.1.6. Third Party static files<a class="headerlink" href="#third-party-static-files" title="Permalink to this headline">¶</a></h3>
- <p>Django 1.3 offers a new feature that pulls in all the css and image files from third party apps into one folder.
- This does away with having to setup symlinks to them yourself. The files are stored in the static-files directory.
- To get the initial files set run the following command:</p>
- <div class="highlight-python"><pre>./manage.py collectstatic</pre>
- </div>
- </div>
- <div class="section" id="rebuild-search-index">
- <h3>3.1.7. Rebuild Search Index<a class="headerlink" href="#rebuild-search-index" title="Permalink to this headline">¶</a></h3>
- <p>The search engine was updated as part of this release so it is a good idea to run the following command to rebuild it:</p>
- <div class="highlight-python"><pre>./manage.py rebuild_index</pre>
- </div>
- </div>
- <div class="section" id="running">
- <h3>3.1.8. Running<a class="headerlink" href="#running" title="Permalink to this headline">¶</a></h3>
- <p>After the upgrade you can run the following command to start the internal Django webserver. This will allow you to
- test your site:</p>
- <div class="highlight-python"><pre>./manage.py runserver 8000</pre>
- </div>
- </div>
- </div>
- <div class="section" id="upgrade-2-1-to-2-2">
- <h2>3.2. Upgrade 2.1 to 2.2<a class="headerlink" href="#upgrade-2-1-to-2-2" title="Permalink to this headline">¶</a></h2>
- <p>This procedure covers how to upgrade your existing 2.1 OpenEats2 site to version 2.2. If you are upgrading from 2.0 to 2.2
- you will need to follow the steps from Config File Changes down in the <em>Upgrading from 2.0 to 2.1</em> section.</p>
- <div class="section" id="id1">
- <h3>3.2.1. Install<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
- <ul class="simple">
- <li>Download the latest package from <a class="reference external" href="https://github.com/qgriffith/OpenEats">github</a></li>
- <li>Unzip the file</li>
- <li>Backup your database</li>
- <li>Backup your current site files</li>
- <li>From the unzip file, copy everything other then the settings.py, site-media/upload and site-media/uploads file into your current openeats directory, over writing
- what is already there</li>
- </ul>
- </div>
- <div class="section" id="id3">
- <h3>3.2.2. Database changes<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
- <p>Run the following command from the OpenEats2 directory:</p>
- <div class="highlight-python"><pre>./manage.py migrate list</pre>
- </div>
- </div>
- <div class="section" id="id4">
- <h3>3.2.3. Running<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
- <p>After the upgrade you can run the following command to start the internal Django webserver. This will allow you to
- test your site:</p>
- <div class="highlight-python"><pre>./manage.py runserver 8000</pre>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="sphinxsidebar">
- <div class="sphinxsidebarwrapper">
- <h3><a href="index.html">Table Of Contents</a></h3>
- <ul>
- <li><a class="reference internal" href="#">3. Upgrade</a><ul>
- <li><a class="reference internal" href="#upgrade-2-0-to-2-1">3.1. Upgrade 2.0 to 2.1</a><ul>
- <li><a class="reference internal" href="#install">3.1.1. Install</a></li>
- <li><a class="reference internal" href="#config-file-changes">3.1.2. Config File Changes</a></li>
- <li><a class="reference internal" href="#removing-directories">3.1.3. Removing directories</a></li>
- <li><a class="reference internal" href="#upgrade-third-party-apps">3.1.4. Upgrade third party apps</a></li>
- <li><a class="reference internal" href="#database-changes">3.1.5. Database changes</a></li>
- <li><a class="reference internal" href="#third-party-static-files">3.1.6. Third Party static files</a></li>
- <li><a class="reference internal" href="#rebuild-search-index">3.1.7. Rebuild Search Index</a></li>
- <li><a class="reference internal" href="#running">3.1.8. Running</a></li>
- </ul>
- </li>
- <li><a class="reference internal" href="#upgrade-2-1-to-2-2">3.2. Upgrade 2.1 to 2.2</a><ul>
- <li><a class="reference internal" href="#id1">3.2.1. Install</a></li>
- <li><a class="reference internal" href="#id3">3.2.2. Database changes</a></li>
- <li><a class="reference internal" href="#id4">3.2.3. Running</a></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- <h4>Previous topic</h4>
- <p class="topless"><a href="install.html"
- title="previous chapter">2. Installation</a></p>
- <h4>Next topic</h4>
- <p class="topless"><a href="config.html"
- title="next chapter">4. Configuration</a></p>
- <h3>This Page</h3>
- <ul class="this-page-menu">
- <li><a href="_sources/upgrading.txt"
- rel="nofollow">Show Source</a></li>
- </ul>
- <div id="searchbox" style="display: none">
- <h3>Quick search</h3>
- <form class="search" action="search.html" method="get">
- <input type="text" name="q" size="18" />
- <input type="submit" value="Go" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- <p class="searchtip" style="font-size: 90%">
- Enter search terms or a module, class or function name.
- </p>
- </div>
- <script type="text/javascript">$('#searchbox').show(0);</script>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- <div class="related">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="genindex.html" title="General Index"
- >index</a></li>
- <li class="right" >
- <a href="config.html" title="4. Configuration"
- >next</a> |</li>
- <li class="right" >
- <a href="install.html" title="2. Installation"
- >previous</a> |</li>
- <li><a href="index.html">OpenEats2 v2.2.0 documentation</a> »</li>
- </ul>
- </div>
- <div class="footer">
- © Copyright 2011, Quenten Griffith.
- Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
- </div>
- </body>
- </html>