diff --git a/app/models.py b/app/models.py index 02ae8876..aeca471e 100644 --- a/app/models.py +++ b/app/models.py @@ -177,6 +177,11 @@ class Package(db.Model): type=self.type.toName(), author=self.author.username, name=self.name) + def getCreateEditRequestURL(self): + return url_for("create_editrequest_page", + ptype=self.type.toName(), + author=self.author.username, name=self.name) + def getDownloadURL(self): return url_for("package_download_page", type=self.type.toName(), diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html index 2ed3a321..76a96ac0 100644 --- a/app/templates/packages/view.html +++ b/app/templates/packages/view.html @@ -47,7 +47,7 @@ {% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
  • Edit
  • {% elif current_user.is_authenticated %} -
  • Suggest Change
  • +
  • Suggest Change
  • {% endif %} {% if package.checkPerm(current_user, "MAKE_RELEASE") %}
  • Create Release
  • diff --git a/setup.py b/setup.py index eed19cb7..8ce8395b 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,8 @@ import os, sys, datetime +if not "FLASK_CONFIG" in os.environ: + os.environ["FLASK_CONFIG"] = "../config.cfg" + delete_db = len(sys.argv) >= 2 and sys.argv[1].strip() == "-d" if delete_db and os.path.isfile("db.sqlite"):