mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-23 06:22:24 +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(),
|
||||
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(),
|
||||
|
@ -47,7 +47,7 @@
|
||||
{% if package.checkPerm(current_user, "EDIT_PACKAGE") %}
|
||||
<li><a href="{{ package.getEditURL() }}">Edit</a></li>
|
||||
{% elif current_user.is_authenticated %}
|
||||
<li><a href="">Suggest Change</a></li>
|
||||
<li><a href="{{ package.getCreateEditRequestURL() }}">Suggest Change</a></li>
|
||||
{% endif %}
|
||||
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
|
||||
<li><a href="{{ package.getCreateReleaseURL() }}">Create Release</a></li>
|
||||
|
3
setup.py
3
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"):
|
||||
|
Loading…
Reference in New Issue
Block a user