# HG changeset patch
# User durandn
# Date 1427199179 -3600
# Node ID ae469e83026f1496bab99c3e094d922a2d4a58ea
# Parent 53ee5113af7465dbbe2f5954878073a37f44f36c
Fixed errors when submitting (Github api sends tuples for commit parents now) + Fixed error when editing (session entry for modified and deleted categories didn't initialize properly) + added back links to workshop page on discussion list and changeset list
diff -r 53ee5113af74 -r ae469e83026f src/catedit/persistence.py
--- a/src/catedit/persistence.py Mon Mar 23 16:09:30 2015 +0100
+++ b/src/catedit/persistence.py Tue Mar 24 13:12:59 2015 +0100
@@ -403,11 +403,12 @@
+ str(new_tree_data)
)
logger.error(ghe.response.text)
-
+ logger.debug(str(new_tree_response[0]["sha"]))
+
# Point 5
new_commit_data = {"message": kwargs["message"],
"parents": [last_commit_master["sha"]],
- "tree": new_tree_response["sha"]}
+ "tree": new_tree_response[0]["sha"]}
logger.debug(str(new_commit_data))
try:
new_commit = github.post(
@@ -427,7 +428,7 @@
logger.error(ghe.response.text)
# Point 6
- new_head_data = {"sha": new_commit["sha"], "force": "true"}
+ new_head_data = {"sha": new_commit[0]["sha"], "force": "true"}
logger.debug(str(new_head_data))
try:
new_head = github.patch(
diff -r 53ee5113af74 -r ae469e83026f src/catedit/templates/categories/editor.html
--- a/src/catedit/templates/categories/editor.html Mon Mar 23 16:09:30 2015 +0100
+++ b/src/catedit/templates/categories/editor.html Tue Mar 24 13:12:59 2015 +0100
@@ -12,7 +12,7 @@
{{ super() }}
{% if session.get("user_logged", None) %}
>
- Atelier
+ {{current_repository}}
>
Editeur
{% endif %}
diff -r 53ee5113af74 -r ae469e83026f src/catedit/templates/categories/submit.html
--- a/src/catedit/templates/categories/submit.html Mon Mar 23 16:09:30 2015 +0100
+++ b/src/catedit/templates/categories/submit.html Tue Mar 24 13:12:59 2015 +0100
@@ -34,7 +34,7 @@
{{ super() }}
{% if session.get("user_logged", None) %}
>
- Atelier
+ {{current_repository}}
>
Soumission
{% endif %}
diff -r 53ee5113af74 -r ae469e83026f src/catedit/templates/categories/workshop.html
--- a/src/catedit/templates/categories/workshop.html Mon Mar 23 16:09:30 2015 +0100
+++ b/src/catedit/templates/categories/workshop.html Tue Mar 24 13:12:59 2015 +0100
@@ -34,7 +34,7 @@
{{ super() }}
{% if session.get("user_logged", None) %}
>
- Atelier
+ {{current_repository}}
{% endif %}
{% endblock navbar_items %}
{% block repo_list %}
diff -r 53ee5113af74 -r ae469e83026f src/catedit/templates/social/changesets_index.html
--- a/src/catedit/templates/social/changesets_index.html Mon Mar 23 16:09:30 2015 +0100
+++ b/src/catedit/templates/social/changesets_index.html Tue Mar 24 13:12:59 2015 +0100
@@ -62,7 +62,10 @@
{% endfor %}
{% endif %}
- |
+ |
+ Retour
+ |
+
{% import "macros.html" as macros %}
{{ macros.render_pagination(commits_pagination, commits_per_page, page_arg_name="commits_page", per_page_arg_name="commits_per_page") }}
|
diff -r 53ee5113af74 -r ae469e83026f src/catedit/templates/social/comment_thread_layout.html
--- a/src/catedit/templates/social/comment_thread_layout.html Mon Mar 23 16:09:30 2015 +0100
+++ b/src/catedit/templates/social/comment_thread_layout.html Tue Mar 24 13:12:59 2015 +0100
@@ -7,7 +7,7 @@
{{ super() }}
{% if session.get("user_logged", None) %}
>
- Atelier
+ {{current_repository}}
{% endif %}
{% endblock navbar_items %}
{% block page_content %}
diff -r 53ee5113af74 -r ae469e83026f src/catedit/templates/social/discussions_index.html
--- a/src/catedit/templates/social/discussions_index.html Mon Mar 23 16:09:30 2015 +0100
+++ b/src/catedit/templates/social/discussions_index.html Tue Mar 24 13:12:59 2015 +0100
@@ -68,7 +68,10 @@
{% endfor %}
- |
+ |
+ Retour
+ |
+
{% import "macros.html" as macros %}
{{ macros.render_pagination(discussions_pagination, discussions_per_page, page_arg_name="discussions_page", per_page_arg_name="discussions_per_page") }}
|
diff -r 53ee5113af74 -r ae469e83026f src/catedit/views/home.py
--- a/src/catedit/views/home.py Mon Mar 23 16:09:30 2015 +0100
+++ b/src/catedit/views/home.py Tue Mar 24 13:12:59 2015 +0100
@@ -86,6 +86,15 @@
+ session["user_login"]
)
logger.error(ghe.response.text)
+
+ session["modified_categories"] = {
+ repo: {} for
+ repo in app.config["PERSISTENCE_CONFIG"]["REPOSITORY_LIST"]
+ }
+ session["deleted_categories"] = {
+ repo: {} for repo
+ in app.config["PERSISTENCE_CONFIG"]["REPOSITORY_LIST"]
+ }
return redirect(url_for('home.index'))