<h1>Installation<aclass="headerlink"href="#installation"title="Permalink to this headline">¶</a></h1>
<p>django-helpdesk installation isn’t difficult, but it requires you have a bit of existing know-how about Django.</p>
<divclass="section"id="getting-the-code">
<h2>Getting The Code<aclass="headerlink"href="#getting-the-code"title="Permalink to this headline">¶</a></h2>
<divclass="section"id="installing-using-pip">
<h3>Installing using PIP<aclass="headerlink"href="#installing-using-pip"title="Permalink to this headline">¶</a></h3>
<p>Try using <ttclass="docutils literal"><spanclass="pre">pip</span><spanclass="pre">install</span><spanclass="pre">django-helpdesk</span></tt>. Go and have a beer to celebrate Python packaging.</p>
<p>If you’re planning on editing the code or just want to get whatever is the latest and greatest, you can clone the official Git repository with <ttclass="docutils literal"><spanclass="pre">git</span><spanclass="pre">clone</span><spanclass="pre">git://github.com/rossp/django-helpdesk.git</span></tt></p>
<p>Copy the <ttclass="docutils literal"><spanclass="pre">helpdesk</span></tt> folder into your <ttclass="docutils literal"><spanclass="pre">PYTHONPATH</span></tt>.</p>
</div>
<divclass="section"id="i-just-want-a-tar-gz">
<h3>I just want a .tar.gz!<aclass="headerlink"href="#i-just-want-a-tar-gz"title="Permalink to this headline">¶</a></h3>
<p>You can download the latest PyPi package from <aclass="reference external"href="http://pypi.python.org/pypi/django-helpdesk/">http://pypi.python.org/pypi/django-helpdesk/</a></p>
<p>Download, extract, and drop <ttclass="docutils literal"><spanclass="pre">helpdesk</span></tt> into your <ttclass="docutils literal"><spanclass="pre">PYTHONPATH</span></tt></p>
<h2>Adding To Your Django Project<aclass="headerlink"href="#adding-to-your-django-project"title="Permalink to this headline">¶</a></h2>
<olclass="arabic">
<li><pclass="first">Edit your <ttclass="docutils literal"><spanclass="pre">settings.py</span></tt> file and add <ttclass="docutils literal"><spanclass="pre">helpdesk</span></tt> to the <ttclass="docutils literal"><spanclass="pre">INSTALLED_APPS</span></tt> setting. You also need <ttclass="docutils literal"><spanclass="pre">django.contrib.admin</span></tt> in <ttclass="docutils literal"><spanclass="pre">INSTALLED_APPS</span></tt> if you haven’t already added it. eg:</p>
<spanclass="s">'django.contrib.admin'</span><spanclass="p">,</span><spanclass="c"># Required for helpdesk admin/maintenance</span>
<spanclass="s">'django.contrib.markup'</span><spanclass="p">,</span><spanclass="c"># Required for text display</span>
<spanclass="s">'helpdesk'</span><spanclass="p">,</span><spanclass="c"># This is new!</span>
<spanclass="p">)</span>
</pre></div>
</div>
</li>
<li><pclass="first">Make sure django-helpdesk is accessible via <ttclass="docutils literal"><spanclass="pre">urls.py</span></tt>. Add the following line to <ttclass="docutils literal"><spanclass="pre">urls.py</span></tt>:</p>
<p>Note that you can change ‘helpdesk/’ to anything you like, such as ‘support/’ or ‘help/’. If you want django-helpdesk to be available at the root of your site (for example at <aclass="reference external"href="http://support.mysite.tld/">http://support.mysite.tld/</a>) then the line will be as follows:</p>
<li><pclass="first">Inside your <ttclass="docutils literal"><spanclass="pre">MEDIA_ROOT</span></tt> folder, create a new folder called <ttclass="docutils literal"><spanclass="pre">helpdesk</span></tt> and copy the contents of <ttclass="docutils literal"><spanclass="pre">helpdesk/htdocs</span></tt> into it. Alternatively, create a symlink:</p>
<li><pclass="first">Inside your <ttclass="docutils literal"><spanclass="pre">MEDIA_ROOT</span></tt> folder, inside the <ttclass="docutils literal"><spanclass="pre">helpdesk</span></tt> folder, is a folder called <ttclass="docutils literal"><spanclass="pre">attachments</span></tt>. Ensure your web server software can write to this folder - something like this should do the trick:</p>
<li><pclass="first">Ensure that your <ttclass="docutils literal"><spanclass="pre">attachments</span></tt> folder has directory listings turned off, to ensure users don’t download files that they are not specifically linked to from their tickets.</p>
<p>If you are using Apache, put a <ttclass="docutils literal"><spanclass="pre">.htaccess</span></tt> file in the <ttclass="docutils literal"><spanclass="pre">attachments</span></tt> folder with the following content:</p>
<p>You will also have to make sure that <ttclass="docutils literal"><spanclass="pre">.htaccess</span></tt> files aren’t being ignored.</p>
<p>Ideally, accessing <aclass="reference external"href="http://MEDIA_URL/helpdesk/attachments/">http://MEDIA_URL/helpdesk/attachments/</a> will give you a 403 access denied error.</p>