PageRenderTime 26ms CodeModel.GetById 13ms RepoModel.GetById 1ms app.codeStats 0ms

/docs/html/upgrading.html

https://github.com/wraithan/OpenEats
HTML | 303 lines | 294 code | 9 blank | 0 comment | 0 complexity | 6331d6db062de95e81faf42e1565f0c1 MD5 | raw file
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>3. Upgrade &mdash; OpenEats2 v2.2.0 documentation</title>
  7. <link rel="stylesheet" href="_static/default.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '',
  12. VERSION: '2.2.0',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="_static/jquery.js"></script>
  19. <script type="text/javascript" src="_static/underscore.js"></script>
  20. <script type="text/javascript" src="_static/doctools.js"></script>
  21. <link rel="top" title="OpenEats2 v2.2.0 documentation" href="index.html" />
  22. <link rel="next" title="4. Configuration" href="config.html" />
  23. <link rel="prev" title="2. Installation" href="install.html" />
  24. </head>
  25. <body>
  26. <div class="related">
  27. <h3>Navigation</h3>
  28. <ul>
  29. <li class="right" style="margin-right: 10px">
  30. <a href="genindex.html" title="General Index"
  31. accesskey="I">index</a></li>
  32. <li class="right" >
  33. <a href="config.html" title="4. Configuration"
  34. accesskey="N">next</a> |</li>
  35. <li class="right" >
  36. <a href="install.html" title="2. Installation"
  37. accesskey="P">previous</a> |</li>
  38. <li><a href="index.html">OpenEats2 v2.2.0 documentation</a> &raquo;</li>
  39. </ul>
  40. </div>
  41. <div class="document">
  42. <div class="documentwrapper">
  43. <div class="bodywrapper">
  44. <div class="body">
  45. <div class="section" id="upgrade">
  46. <h1>3. Upgrade<a class="headerlink" href="#upgrade" title="Permalink to this headline"></a></h1>
  47. <div class="section" id="upgrade-2-0-to-2-1">
  48. <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>
  49. <p>This procedure covers how to upgrade your existing 2.0 OpenEats2 site to version 2.1</p>
  50. <div class="section" id="install">
  51. <h3>3.1.1. Install<a class="headerlink" href="#install" title="Permalink to this headline"></a></h3>
  52. <ul class="simple">
  53. <li>Download the latest package from <a class="reference external" href="https://github.com/qgriffith/OpenEats">github</a></li>
  54. <li>Unzip the file</li>
  55. <li>Backup your database</li>
  56. <li>Backup your current site files</li>
  57. <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
  58. what is already there</li>
  59. </ul>
  60. </div>
  61. <div class="section" id="config-file-changes">
  62. <h3>3.1.2. Config File Changes<a class="headerlink" href="#config-file-changes" title="Permalink to this headline"></a></h3>
  63. <p>Some minor changes need to be made to the settings.py file of your current site.</p>
  64. <p>Remove the following from the installed apps section of the settings.py file</p>
  65. <ul class="simple">
  66. <li>admin_tools.theming</li>
  67. <li>admin_tools.menu</li>
  68. <li>admin_tools.menu</li>
  69. </ul>
  70. <p>Add the following to the installed apps section of the settings.py file on the <em>first</em> line:</p>
  71. <div class="highlight-python"><div class="highlight"><pre><span class="s">&#39;grappelli.dashboard&#39;</span><span class="p">,</span>
  72. </pre></div>
  73. </div>
  74. <p>Add the following to the installed apps section of the settings.py file:</p>
  75. <div class="highlight-python"><div class="highlight"><pre><span class="s">&#39;django.contrib.staticfiles&#39;</span><span class="p">,</span>
  76. </pre></div>
  77. </div>
  78. <p>Remove the following from the <em>context processors</em> section of the settings.py file:</p>
  79. <div class="highlight-python"><div class="highlight"><pre><span class="s">&quot;grappelli.context_processors.admin_template_path&quot;</span><span class="p">,</span>
  80. </pre></div>
  81. </div>
  82. <p>Add the following to the <em>context processors</em> section of the settings.py file:</p>
  83. <div class="highlight-python"><div class="highlight"><pre><span class="s">&quot;openeats.context_processors.oetitle&quot;</span><span class="p">,</span>
  84. </pre></div>
  85. </div>
  86. <p>Add the following line to the settings.py file:</p>
  87. <div class="highlight-python"><div class="highlight"><pre><span class="n">LOCALE_PATHS</span> <span class="o">=</span> <span class="p">(</span>
  88. <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">&#39;locale&#39;</span><span class="p">,)</span>
  89. <span class="p">)</span>
  90. </pre></div>
  91. </div>
  92. <p>Remove the following lines in your settings.py file:</p>
  93. <div class="highlight-python"><div class="highlight"><pre><span class="n">ADMIN_TOOLS_INDEX_DASHBOARD</span> <span class="o">=</span> <span class="s">&#39;openeats.dashboard.CustomIndexDashboard&#39;</span>
  94. <span class="n">ADMIN_TOOLS_APP_INDEX_DASHBOARD</span> <span class="o">=</span> <span class="s">&#39;openeats.dashboard.CustomAppIndexDashboard&#39;</span>
  95. </pre></div>
  96. </div>
  97. <p>Add the following line to your settings.py file:</p>
  98. <div class="highlight-python"><div class="highlight"><pre><span class="n">GRAPPELLI_INDEX_DASHBOARD</span> <span class="o">=</span> <span class="s">&#39;openeats.dashboard.CustomIndexDashboard&#39;</span>
  99. </pre></div>
  100. </div>
  101. <p>Add the following lines to your settings.py file:</p>
  102. <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">&#39;static-files&#39;</span><span class="p">)</span>
  103. <span class="n">STATIC_URL</span> <span class="o">=</span> <span class="s">&#39;/static-files/&#39;</span>
  104. </pre></div>
  105. </div>
  106. <p>Change the <em>ADMIN_MEDIA_PREFIX</em> setting in the settings.py file to this:</p>
  107. <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">&quot;grappelli/&quot;</span>
  108. </pre></div>
  109. </div>
  110. <p>Add the following line under the <em>OpenEats Settings</em> section of the settings.py file:</p>
  111. <div class="highlight-python"><div class="highlight"><pre><span class="n">OETITLE</span><span class="o">=</span><span class="s">&quot;OpenEats2&quot;</span>
  112. </pre></div>
  113. </div>
  114. <p>You can set this to anything you want your site title to be, it doesn&#8217;t have to be set to <em>OpenEats2</em></p>
  115. <p>Remove the following line from urls.py:</p>
  116. <div class="highlight-python"><div class="highlight"><pre><span class="n">url</span><span class="p">(</span><span class="s">r&#39;^admin_tools/&#39;</span><span class="p">,</span> <span class="n">include</span><span class="p">(</span><span class="s">&#39;admin_tools.urls&#39;</span><span class="p">)),</span>
  117. </pre></div>
  118. </div>
  119. </div>
  120. <div class="section" id="removing-directories">
  121. <h3>3.1.3. Removing directories<a class="headerlink" href="#removing-directories" title="Permalink to this headline"></a></h3>
  122. <p>The following directories are no longer needed for version 2.1 and can be removed</p>
  123. <ul class="simple">
  124. <li>grappelli</li>
  125. <li>site-media/admin</li>
  126. <li>site-media/admin_tools</li>
  127. </ul>
  128. </div>
  129. <div class="section" id="upgrade-third-party-apps">
  130. <h3>3.1.4. Upgrade third party apps<a class="headerlink" href="#upgrade-third-party-apps" title="Permalink to this headline"></a></h3>
  131. <p>To upgrade all the packages that OpenEats2 requires perform the following steps.</p>
  132. <ul>
  133. <li><p class="first">Activate your virtualenv</p>
  134. </li>
  135. <li><p class="first">Change to the directory that you unzipped the OpenEats2 files into</p>
  136. </li>
  137. <li><p class="first">Run the following command:</p>
  138. <div class="highlight-python"><pre>pip install -r OE2_Requirements.txt --upgrade</pre>
  139. </div>
  140. </li>
  141. </ul>
  142. </div>
  143. <div class="section" id="database-changes">
  144. <h3>3.1.5. Database changes<a class="headerlink" href="#database-changes" title="Permalink to this headline"></a></h3>
  145. <p>Run the following command from the OpenEats2 directory:</p>
  146. <div class="highlight-python"><pre>./manage.py syncdb
  147. ./manage.py migrate djangoratings 0001 --fake
  148. ./manage.py migrate djangoratings 0002 --fake
  149. ./manage.py migrate djangoratings 0003
  150. ./manage.py migrate djangoratings 0004 --fake
  151. ./manage.py migrate djangoratings 0005 --fake
  152. ./manage.py migrate djangoratings
  153. ./manage.py migrate sentry 0001 --fake
  154. ./manage.py migrate sentry 0002 --fake
  155. ./manage.py migrate sentry 0003 --fake
  156. ./manage.py migrate sentry 0004 --fake
  157. ./manage.py migrate sentry 0005 --fake
  158. ./manage.py migrate sentry 0006 --fake
  159. ./manage.py migrate sentry 0007 --fake
  160. ./manage.py migrate sentry 0008 --fake
  161. ./manage.py migrate sentry 0009 --fake
  162. ./manage.py migrate sentry
  163. ./manage.py migrate</pre>
  164. </div>
  165. </div>
  166. <div class="section" id="third-party-static-files">
  167. <h3>3.1.6. Third Party static files<a class="headerlink" href="#third-party-static-files" title="Permalink to this headline"></a></h3>
  168. <p>Django 1.3 offers a new feature that pulls in all the css and image files from third party apps into one folder.
  169. This does away with having to setup symlinks to them yourself. The files are stored in the static-files directory.
  170. To get the initial files set run the following command:</p>
  171. <div class="highlight-python"><pre>./manage.py collectstatic</pre>
  172. </div>
  173. </div>
  174. <div class="section" id="rebuild-search-index">
  175. <h3>3.1.7. Rebuild Search Index<a class="headerlink" href="#rebuild-search-index" title="Permalink to this headline"></a></h3>
  176. <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>
  177. <div class="highlight-python"><pre>./manage.py rebuild_index</pre>
  178. </div>
  179. </div>
  180. <div class="section" id="running">
  181. <h3>3.1.8. Running<a class="headerlink" href="#running" title="Permalink to this headline"></a></h3>
  182. <p>After the upgrade you can run the following command to start the internal Django webserver. This will allow you to
  183. test your site:</p>
  184. <div class="highlight-python"><pre>./manage.py runserver 8000</pre>
  185. </div>
  186. </div>
  187. </div>
  188. <div class="section" id="upgrade-2-1-to-2-2">
  189. <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>
  190. <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
  191. 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>
  192. <div class="section" id="id1">
  193. <h3>3.2.1. Install<a class="headerlink" href="#id1" title="Permalink to this headline"></a></h3>
  194. <ul class="simple">
  195. <li>Download the latest package from <a class="reference external" href="https://github.com/qgriffith/OpenEats">github</a></li>
  196. <li>Unzip the file</li>
  197. <li>Backup your database</li>
  198. <li>Backup your current site files</li>
  199. <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
  200. what is already there</li>
  201. </ul>
  202. </div>
  203. <div class="section" id="id3">
  204. <h3>3.2.2. Database changes<a class="headerlink" href="#id3" title="Permalink to this headline"></a></h3>
  205. <p>Run the following command from the OpenEats2 directory:</p>
  206. <div class="highlight-python"><pre>./manage.py migrate list</pre>
  207. </div>
  208. </div>
  209. <div class="section" id="id4">
  210. <h3>3.2.3. Running<a class="headerlink" href="#id4" title="Permalink to this headline"></a></h3>
  211. <p>After the upgrade you can run the following command to start the internal Django webserver. This will allow you to
  212. test your site:</p>
  213. <div class="highlight-python"><pre>./manage.py runserver 8000</pre>
  214. </div>
  215. </div>
  216. </div>
  217. </div>
  218. </div>
  219. </div>
  220. </div>
  221. <div class="sphinxsidebar">
  222. <div class="sphinxsidebarwrapper">
  223. <h3><a href="index.html">Table Of Contents</a></h3>
  224. <ul>
  225. <li><a class="reference internal" href="#">3. Upgrade</a><ul>
  226. <li><a class="reference internal" href="#upgrade-2-0-to-2-1">3.1. Upgrade 2.0 to 2.1</a><ul>
  227. <li><a class="reference internal" href="#install">3.1.1. Install</a></li>
  228. <li><a class="reference internal" href="#config-file-changes">3.1.2. Config File Changes</a></li>
  229. <li><a class="reference internal" href="#removing-directories">3.1.3. Removing directories</a></li>
  230. <li><a class="reference internal" href="#upgrade-third-party-apps">3.1.4. Upgrade third party apps</a></li>
  231. <li><a class="reference internal" href="#database-changes">3.1.5. Database changes</a></li>
  232. <li><a class="reference internal" href="#third-party-static-files">3.1.6. Third Party static files</a></li>
  233. <li><a class="reference internal" href="#rebuild-search-index">3.1.7. Rebuild Search Index</a></li>
  234. <li><a class="reference internal" href="#running">3.1.8. Running</a></li>
  235. </ul>
  236. </li>
  237. <li><a class="reference internal" href="#upgrade-2-1-to-2-2">3.2. Upgrade 2.1 to 2.2</a><ul>
  238. <li><a class="reference internal" href="#id1">3.2.1. Install</a></li>
  239. <li><a class="reference internal" href="#id3">3.2.2. Database changes</a></li>
  240. <li><a class="reference internal" href="#id4">3.2.3. Running</a></li>
  241. </ul>
  242. </li>
  243. </ul>
  244. </li>
  245. </ul>
  246. <h4>Previous topic</h4>
  247. <p class="topless"><a href="install.html"
  248. title="previous chapter">2. Installation</a></p>
  249. <h4>Next topic</h4>
  250. <p class="topless"><a href="config.html"
  251. title="next chapter">4. Configuration</a></p>
  252. <h3>This Page</h3>
  253. <ul class="this-page-menu">
  254. <li><a href="_sources/upgrading.txt"
  255. rel="nofollow">Show Source</a></li>
  256. </ul>
  257. <div id="searchbox" style="display: none">
  258. <h3>Quick search</h3>
  259. <form class="search" action="search.html" method="get">
  260. <input type="text" name="q" size="18" />
  261. <input type="submit" value="Go" />
  262. <input type="hidden" name="check_keywords" value="yes" />
  263. <input type="hidden" name="area" value="default" />
  264. </form>
  265. <p class="searchtip" style="font-size: 90%">
  266. Enter search terms or a module, class or function name.
  267. </p>
  268. </div>
  269. <script type="text/javascript">$('#searchbox').show(0);</script>
  270. </div>
  271. </div>
  272. <div class="clearer"></div>
  273. </div>
  274. <div class="related">
  275. <h3>Navigation</h3>
  276. <ul>
  277. <li class="right" style="margin-right: 10px">
  278. <a href="genindex.html" title="General Index"
  279. >index</a></li>
  280. <li class="right" >
  281. <a href="config.html" title="4. Configuration"
  282. >next</a> |</li>
  283. <li class="right" >
  284. <a href="install.html" title="2. Installation"
  285. >previous</a> |</li>
  286. <li><a href="index.html">OpenEats2 v2.2.0 documentation</a> &raquo;</li>
  287. </ul>
  288. </div>
  289. <div class="footer">
  290. &copy; Copyright 2011, Quenten Griffith.
  291. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.7.
  292. </div>
  293. </body>
  294. </html>