diff --git a/app/models.py b/app/models.py
index 14ff3c7..368e59b 100644
--- a/app/models.py
+++ b/app/models.py
@@ -215,18 +215,19 @@ class PackageType(enum.Enum):
class PackagePropertyKey(enum.Enum):
- name = "Name"
- title = "Title"
- shortDesc = "Short Description"
- desc = "Description"
- type = "Type"
- license = "License"
- tags = "Tags"
- provides = "Provides"
- repo = "Repository"
- website = "Website"
- issueTracker = "Issue Tracker"
- forums = "Forum Topic ID"
+ name = "Name"
+ title = "Title"
+ shortDesc = "Short Description"
+ desc = "Description"
+ type = "Type"
+ license = "License"
+ media_license = "Media License"
+ tags = "Tags"
+ provides = "Provides"
+ repo = "Repository"
+ website = "Website"
+ issueTracker = "Issue Tracker"
+ forums = "Forum Topic ID"
def convert(self, value):
if self == PackagePropertyKey.tags:
diff --git a/app/templates/macros/forms.html b/app/templates/macros/forms.html
index 7700fe2..66f305b 100644
--- a/app/templates/macros/forms.html
+++ b/app/templates/macros/forms.html
@@ -20,6 +20,40 @@
{% endmacro %}
+{% macro package_lists() -%}
+
+{% endmacro %}
+
{% macro render_multiselect_field(field, label=None, label_visible=true, right_url=None, right_label=None) -%}
{% if field.type != 'HiddenField' and label_visible %}
diff --git a/app/templates/packages/create_edit.html b/app/templates/packages/create_edit.html
index ee05940..52a1d4b 100644
--- a/app/templates/packages/create_edit.html
+++ b/app/templates/packages/create_edit.html
@@ -10,40 +10,10 @@
{% block content %}
Create Package
-
-
- {% from "macros/forms.html" import render_field, render_submit_field, form_includes, render_multiselect_field, render_mpackage_field, render_deps_field %}
+ {% from "macros/forms.html" import render_field, render_submit_field, form_includes, render_multiselect_field, render_mpackage_field, render_deps_field, package_lists %}
{{ form_includes() }}
+ {{ package_lists() }}
+
+
{% endblock %}
diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html
index 93f6645..2e62ea9 100644
--- a/app/templates/packages/view.html
+++ b/app/templates/packages/view.html
@@ -117,9 +117,9 @@
Edit
Add screenshot
{% endif %}
- {% if current_user.is_authenticated %}
+ {# {% if current_user.is_authenticated %}
Suggest Changes
- {% endif %}
+ {% endif %} #}
{% if package.checkPerm(current_user, "MAKE_RELEASE") %}
Create Release
{% endif %}
@@ -216,19 +216,21 @@
-->
- {% if current_user.is_authenticated or requests %}
-
Edit Requests
+ {#
+ {% if current_user.is_authenticated or requests %}
+
Edit Requests
-
- {% endif %}
+
+ {% endif %}
+ #}
{% endblock %}
diff --git a/app/utils.py b/app/utils.py
index 5fd7cae..55311fa 100644
--- a/app/utils.py
+++ b/app/utils.py
@@ -68,7 +68,7 @@ def _do_login_user(user, remember_me=False):
user.active = True
if not user.rank.atLeast(UserRank.NEW_MEMBER):
- user.rank = UserRank.NEW_MEMBER
+ user.rank = UserRank.MEMBER
db.session.commit()
diff --git a/app/views/packages/__init__.py b/app/views/packages/__init__.py
index 2a28876..76d278b 100644
--- a/app/views/packages/__init__.py
+++ b/app/views/packages/__init__.py
@@ -272,4 +272,4 @@ def delete_package_page(package):
return redirect(url)
-from . import todo, screenshots, editrequests, releases
+from . import todo, screenshots, releases
diff --git a/app/views/packages/editrequests.py b/app/views/packages/editrequests.py
index 51d5989..e071745 100644
--- a/app/views/packages/editrequests.py
+++ b/app/views/packages/editrequests.py
@@ -58,8 +58,13 @@ def create_edit_editrequest_page(package, id=None):
edited_package = Package(package)
erequest.applyAll(edited_package)
-
form = EditRequestForm(request.form, obj=edited_package)
+ if request.method == "GET":
+ deps = edited_package.dependencies
+ form.harddep_str.data = ",".join([str(x) for x in deps if not x.optional])
+ form.softdep_str.data = ",".join([str(x) for x in deps if x.optional])
+ form.provides_str.data = MetaPackage.ListToSpec(edited_package.provides)
+
if request.method == "POST" and form.validate():
if erequest is None:
erequest = EditRequest()