mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 14:32:25 +01:00
Fix suggest changes link
This commit is contained in:
parent
cd77ad6050
commit
287c9e5097
@ -177,6 +177,11 @@ class Package(db.Model):
|
|||||||
type=self.type.toName(),
|
type=self.type.toName(),
|
||||||
author=self.author.username, name=self.name)
|
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):
|
def getDownloadURL(self):
|
||||||
return url_for("package_download_page",
|
return url_for("package_download_page",
|
||||||
type=self.type.toName(),
|
type=self.type.toName(),
|
||||||
|
@ -47,7 +47,7 @@
|
|||||||
{% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
|
{% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
|
||||||
<li><a href="{{ package.getEditURL() }}">Edit</a></li>
|
<li><a href="{{ package.getEditURL() }}">Edit</a></li>
|
||||||
{% elif current_user.is_authenticated %}
|
{% elif current_user.is_authenticated %}
|
||||||
<li><a href="">Suggest Change</a></li>
|
<li><a href="{{ package.getCreateEditRequestURL() }}">Suggest Change</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
||||||
<li><a href="{{ package.getCreateReleaseURL() }}">Create Release</a></li>
|
<li><a href="{{ package.getCreateReleaseURL() }}">Create Release</a></li>
|
||||||
|
3
setup.py
3
setup.py
@ -1,5 +1,8 @@
|
|||||||
import os, sys, datetime
|
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"
|
delete_db = len(sys.argv) >= 2 and sys.argv[1].strip() == "-d"
|
||||||
|
|
||||||
if delete_db and os.path.isfile("db.sqlite"):
|
if delete_db and os.path.isfile("db.sqlite"):
|
||||||
|
Loading…
Reference in New Issue
Block a user