Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Styling fixes, started to alter controllers to suite new design.

  • Loading branch information...
commit f287f8519465fb47809ba78115feec285818da9e 1 parent c93caa6
Arun Karunagath kra3 authored
2  py3k/main.py
View
@@ -32,6 +32,7 @@
from .application import app
from .application import db
+from .captcha import get_captcha_key
from .model import Distribution
from .model import Comment
from .utils import get_status, pretty_date
@@ -70,6 +71,7 @@ def index():
comments=comments,
no_comments_packages=no_comments_packages,
lst_comments=lst_comments,
+ captcha_key=get_captcha_key(),
get_status=get_status,
time_delta=pretty_date)
6 py3k/nonpypi.py
View
@@ -31,7 +31,6 @@
from sqlalchemy.exc import IntegrityError
from .model import Distribution
-from .captcha import get_captcha_key
from .captcha import verify_captcha
@@ -81,8 +80,3 @@ def save_new_project():
db.session.add(distribution)
db.session.commit()
return redirect(url_for('packages_details', name=name))
-
-
-@app.route('/nonpypi')
-def nonpypipkg():
- return render_template('nonpypi_package.html', captcha_key=get_captcha_key())
5 py3k/static/css/style.css
View
@@ -188,6 +188,7 @@ section#main > article h2{
}
section#main > article:first-child{
background: #f9f9f9;
+ overflow:hidden;
}
section#main > article:first-child ul#credits{
list-style:decimal-leading-zero;
@@ -265,6 +266,10 @@ section form p input, section form p textarea{
}
section form p textarea{
width: 305px;
+ resize:none; /* for webkit */
+}
+section form p input#cap{
+ width:200px;
}
section form p input[type="submit"]{
width: 80px;
BIN  py3k/static/download
View
Binary file not shown
28 py3k/templates/index.html
View
@@ -38,3 +38,31 @@
</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 %}
30 py3k/templates/layout.html
View
@@ -69,31 +69,11 @@
Download <span>Python3</span></a>
</p>
</section>
- <section><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></section>
+ <section>
+
+ {% block newprj %}{% endblock %}
+
+ </section>
</article>
</section>
2  py3k/utils.py
View
@@ -34,7 +34,7 @@ def get_status(working):
else:
working_status = 'fails'
working_status_text = 'Failing'
- return working_status, working_status_text
+ return working_status, working_status_text # css class and display text
def pretty_date(time=False):
Please sign in to comment.
Something went wrong with that request. Please try again.