Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

edits to package display

  • Loading branch information...
commit 38278f7057336fb61aebf9263475446789b44d53 1 parent 8ec47f3
@kra3 kra3 authored
View
1  py3k/packages.py
@@ -147,4 +147,5 @@ def packages(page=1):
no_comments_packages = db.session.query(Distribution).outerjoin(Comment).filter(Comment.distribution_id==None).limit(5)
return render_template('show_package.html',
no_comments_packages=no_comments_packages,
+ captcha_key=get_captcha_key(),
page_obj=result)
View
22 py3k/templates/search_package.html
@@ -3,19 +3,19 @@
{% block body %}
{% macro render_pagination(pagination, endpoint) %}
- <div class=pagination style="font-size: 14pt;text-align:center">
- {%- for page in pagination.iter_pages() %}
- {% if page %}
- {% if page != pagination.page %}
- <a href="{{ url_for(endpoint, name=searchname, page=page) }}">{{ page }}</a>
+ <div class=pagination style="font-size: 14pt;text-align:center">
+ {%- for page in pagination.iter_pages() %}
+ {% if page %}
+ {% if page != pagination.page %}
+ <a href="{{ url_for(endpoint, name=searchname, page=page) }}">{{ page }}</a>
+ {% else %}
+ <strong>{{ page }}</strong>
+ {% endif %}
{% else %}
- <strong>{{ page }}</strong>
+ <span class=ellipsis>...</span>
{% endif %}
- {% else %}
- <span class=ellipsis>...</span>
- {% endif %}
- {%- endfor %}
- </div>
+ {%- endfor %}
+ </div>
{% endmacro %}
{{ render_pagination(page_obj, 'search_package') }}
View
30 py3k/templates/show_package.html
@@ -14,7 +14,6 @@
{% else %}
<span class=ellipsis>...</span>
{% endif %}
-
{%- endfor %}
</div>
{% endmacro %}
@@ -51,3 +50,32 @@
</li>
</ul>
{% endblock %}
+
+{% block newprj %}
+ <form action="{{ url_for('save_new_project') }}" method=post>
+ <p>
+ <label for="prjname">Project Name</label>
+ <input id="prjname" name='projectname' placeholder="Project name">
+ </p>
+ <p>
+ <label for="homepg">Homepage</label>
+ <input id="homepg" type='url' name='home_page' placeholder="http://">
+ </p>
+ <p>
+ <label for="auth">Authors</label>
+ <input id="auth" name='author' placeholder="Author(s)">
+ </p>
+ <p>
+ <label for="summary">Summary</label>
+ <textarea id="summary" name='summary' placeholder="Some cool information about your wonderful project..." rows="6" cols="60"></textarea>
+ </p>
+ <p>
+ <label for="cap">Enter the letters here:</label>
+ <input id="cap" name='captchavalue'>
+ <img src="{{ url_for('captcha', key=captcha_key) }}" />
+ </p>
+ <input type=hidden name=captchakey value={{ captcha_key }}>
+ <p><input value="Submit" type="submit"></p>
+ </form>
+{% endblock %}
+
Please sign in to comment.
Something went wrong with that request. Please try again.