From 3dc0acff1a1de5688c0ae2bebe72541f81bdf374 Mon Sep 17 00:00:00 2001
From: Johannes Krampf <johannes.krampf@gmail.com>
Date: Fri, 2 Dec 2011 19:15:58 +0100
Subject: Spelling in Readme

---
 README | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/README b/README
index 0e9d19af..497f4fe9 100644
--- a/README
+++ b/README
@@ -25,7 +25,7 @@ Worry about that in step 3.
 # Testing Installation
 
 Throughout this, we assume that parabolaweb is installed in a
-directory called `parabolaweb`. This is not nescessarily true. On the
+directory called `parabolaweb`. This is not necessarily true. On the
 main server, it's in `/srv/http/web'. Wherever you see this in a
 command, know that you should just replace it with the correct path
 for your install.
@@ -35,7 +35,7 @@ for your install.
         $ cd /path/to/parabolaweb && virtualenv2 `pwd`-env
 
    Here I just had you use `pwd` to choose the environment
-   directory. You can use anything, but it is recomended that it not
+   directory. You can use anything, but it is recommended that it not
    be the same directory as the install.
 
 2. Activate the virtualenv.
@@ -44,9 +44,9 @@ for your install.
 
 3. Fix symlink to the environment
 
-        (parabolaweb-env) $ ln -sf ../../parabolaweb-env/lib/python2.7/site-packages/django/contrib/admin/media media/admin_meda
+        (parabolaweb-env) $ ln -sf ../../parabolaweb-env/lib/python2.7/site-packages/django/contrib/admin/media media/admin_media
 
-   Of ourse change `../../parabolaweb-env` to the relative path to
+   Of course change `../../parabolaweb-env` to the relative path to
    your environment. Keep in mind that the path is relative from
    inside the `media/` directory, not the current directory.
 
-- 
cgit v1.2.3-2-g168b


From 0dc6c41899def8127b8176f4ea2d863757b19560 Mon Sep 17 00:00:00 2001
From: Johannes Krampf <johannes.krampf@gmail.com>
Date: Fri, 2 Dec 2011 19:16:20 +0100
Subject: Fix bug tracker URLs

---
 packages/templatetags/package_extras.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py
index 01d9afd6..bcbda210 100644
--- a/packages/templatetags/package_extras.py
+++ b/packages/templatetags/package_extras.py
@@ -92,7 +92,7 @@ def svn_trunk(package):
 
 @register.simple_tag
 def bugs_list(package):
-    url = "https://bugs.parabolagnulinux.org/bugs/issue?"
+    url = "https://bugs.parabolagnulinux.org/bugs/issue"
     data = {
         '@action': 'search',
         'title': package.pkgname,
@@ -101,7 +101,7 @@ def bugs_list(package):
 
 @register.simple_tag
 def bug_report(package):
-    url = "https://bugs.parabolagnulinux.org/bugs/issue?"
+    url = "https://bugs.parabolagnulinux.org/bugs/issue"
     data = {
         '@template': 'item',
         'keyword': 'packages',
-- 
cgit v1.2.3-2-g168b


From 8ceb83e52897c1c0bccc6322cffb0e864664afd1 Mon Sep 17 00:00:00 2001
From: Johannes Krampf <johannes.krampf@gmail.com>
Date: Fri, 2 Dec 2011 19:46:36 +0100
Subject: Fix download link. Solution looks a bit unclean to me.

---
 packages/templatetags/package_extras.py | 12 ++++++++++++
 templates/packages/details.html         |  2 +-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py
index bcbda210..c31990d7 100644
--- a/packages/templatetags/package_extras.py
+++ b/packages/templatetags/package_extras.py
@@ -72,6 +72,18 @@ def userpkgs(user):
         )
     return ''
 
+@register.simple_tag
+def get_download_link(package):
+    parts = {
+        "repo": package.repo.name.lower(),
+        "arch": package.arch.name,
+        "pkgfile": package.filename
+    }
+    if parts["arch"] == "any":
+        parts["arch"] = "i686"
+    linkbase = "https://repo.parabolagnulinux.org/%(repo)s/os/%(arch)s/%(pkgfile)s"
+    return linkbase % parts
+
 @register.simple_tag
 def get_wiki_link(package):
     url = "https://wiki.parabolagnulinux.org/index.php"
diff --git a/templates/packages/details.html b/templates/packages/details.html
index ef501c83..4570627f 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -39,7 +39,7 @@
                     onclick="return !window.open('/packages/flaghelp/','FlagHelp',
                     'height=350,width=450,location=no,scrollbars=yes,menubars=no,toolbars=no,resizable=no');">(?)</a></li>
                 {% endif %}
-                <li><a href="download/" rel="nofollow" title="Download {{ pkg.pkgname }} from mirror">Download From Mirror</a></li>
+                <li><a href="{% get_download_link pkg %}" rel="nofollow" title="Download {{ pkg.pkgname }} from mirror">Download From Mirror</a></li>
             </ul>
 
             {% if perms.main.change_package %}
-- 
cgit v1.2.3-2-g168b


From 4b819c267d6973e634e06f599b5d64cec26cfd95 Mon Sep 17 00:00:00 2001
From: Johannes Krampf <johannes.krampf@gmail.com>
Date: Fri, 2 Dec 2011 20:11:03 +0100
Subject: Add database settings for PostgreSQL

---
 README                    |  4 ++--
 local_settings.py.example | 13 +++++++++++++
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/README b/README
index 497f4fe9..6f9075ac 100644
--- a/README
+++ b/README
@@ -56,8 +56,8 @@ for your install.
         (parabolweb-env) $ pip install -r requirements.txt
 
    After that you will need to install a database engine for python.
-   This means `MySQL-python==1.2.3`, `pysqlite` or whatever the
-   package is for PostgreSQL. Eg:
+   This means `MySQL-python==1.2.3`, `pysqlite` or `psycopg2` for PostgreSQL.
+   Eg:
         (parabolweb-env) $ pip install MySQL-python==1.2.3
 
    You may also want to install memcached
diff --git a/local_settings.py.example b/local_settings.py.example
index 4ad87a36..b5883720 100644
--- a/local_settings.py.example
+++ b/local_settings.py.example
@@ -27,6 +27,19 @@ DATABASES = {
     },
 }
 
+## PostgreSQL Database settings
+#DATABASES = {
+#    'default': {
+#        'ENGINE'  : 'django.db.backends.postgresql_psycopg2',
+#        'NAME'    : 'parabola',
+#        'USER'    : 'parabola',
+#        'PASSWORD': 'parabola',
+#        'HOST'    : '',
+#        'PORT'    : '',
+#        'OPTIONS' : {},
+#    },
+#}
+
 ## sqlite3 Database settings
 #DATABASES = {
 #    'default': {
-- 
cgit v1.2.3-2-g168b