summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-12-02 16:45:29 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-12-02 16:45:29 -0500
commitce034483ab02eca8921fe3441012b48a646de47b (patch)
tree8374dbb10ba50a5cb58e9e2487c96b3df30f0111
parentd265eb8b328fc58879618d20177967c51fde383e (diff)
parent4b819c267d6973e634e06f599b5d64cec26cfd95 (diff)
Merge branch 'master' of https://johkra.net/git/parabolaweb-johkra
Conflicts: packages/templatetags/package_extras.py
-rw-r--r--README12
-rw-r--r--local_settings.py.example13
-rw-r--r--packages/templatetags/package_extras.py16
-rw-r--r--templates/packages/details.html2
4 files changed, 34 insertions, 9 deletions
diff --git a/README b/README
index acd8b8f9..9cf699b3 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.
@@ -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': {
diff --git a/packages/templatetags/package_extras.py b/packages/templatetags/package_extras.py
index c8c88ca7..011e9cea 100644
--- a/packages/templatetags/package_extras.py
+++ b/packages/templatetags/package_extras.py
@@ -73,6 +73,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 = "//repo.parabolagnulinux.org/%(repo)s/os/%(arch)s/%(pkgfile)s"
+ return linkbase % parts
+
+@register.simple_tag
def get_wiki_link(package):
url = "//wiki.parabolagnulinux.org/index.php"
data = {
@@ -92,7 +104,7 @@ def svn_trunk(package):
@register.simple_tag
def bugs_list(package):
- url = "//bugs.parabolagnulinux.org/bugs/issue?"
+ url = "//bugs.parabolagnulinux.org/bugs/issue"
data = {
'@action': 'search',
'title': package.pkgname,
@@ -101,7 +113,7 @@ def bugs_list(package):
@register.simple_tag
def bug_report(package):
- url = "//bugs.parabolagnulinux.org/bugs/issue?"
+ url = "//bugs.parabolagnulinux.org/bugs/issue"
data = {
'@template': 'item',
'keyword': 'packages',
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 %}