Repository :
http://git.fedorahosted.org/cgit/copr.git
On branch : bkabrda-workspace
---------------------------------------------------------------
commit f742e83759eccad608a57a459a4ee7e2d9dd7d3b
Author: Slavek Kabrda <bkabrda(a)redhat.com>
Date: Fri Nov 16 13:21:26 2012 +0100
Move TODOs to one file, so that they're not present in source code changes
---------------------------------------------------------------
wsgi/TODO | 8 ++++++++
wsgi/coprs/config.py | 2 +-
wsgi/coprs/forms.py | 1 -
wsgi/coprs/models.py | 2 --
wsgi/coprs/templates/coprs/_coprs_forms.html | 1 -
wsgi/coprs/views/coprs_ns/general.py | 4 +---
6 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/wsgi/TODO b/wsgi/TODO
new file mode 100644
index 0000000..1cf014d
--- /dev/null
+++ b/wsgi/TODO
@@ -0,0 +1,8 @@
+- Unit tests
+- Query optimization
+- Build details
+- Figure out some sane production settings
+- More form validations?
+- It would be nice to be able to change allowed release arches dynamically by JS while
creating/editing coprs
+- Convert all remaining forms into wtforms (login, etc)
+- Backend API :)
diff --git a/wsgi/coprs/config.py b/wsgi/coprs/config.py
index d5d720c..fcf29d3 100644
--- a/wsgi/coprs/config.py
+++ b/wsgi/coprs/config.py
@@ -17,7 +17,7 @@ class Config(object):
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.abspath(DATABASE)
class ProductionConfig(Config):
- pass # TODO: some sane production settings
+ pass
class DevelopmentConfig(Config):
DEBUG = True
diff --git a/wsgi/coprs/forms.py b/wsgi/coprs/forms.py
index 8387ba5..df2a10d 100644
--- a/wsgi/coprs/forms.py
+++ b/wsgi/coprs/forms.py
@@ -72,7 +72,6 @@ class StringListFilter(object):
return regex.sub(lambda x: '\n', result)
class CoprForm(wtf.Form):
- # TODO: validations
# also use id here, to be able to find out whether user is updating a copr
# if so, we don't want to shout that name already exists
id = wtf.HiddenField()
diff --git a/wsgi/coprs/models.py b/wsgi/coprs/models.py
index fa51cc0..cce24da 100644
--- a/wsgi/coprs/models.py
+++ b/wsgi/coprs/models.py
@@ -18,8 +18,6 @@ class Serializer(object):
Options can also specify whether to include foo_id when displaying related foo
object
(__included_ids__, defaults to True). This doesn't apply when
__columns_only__ is specified.
-
- TODO: write some unit tests for this :)
"""
result = {}
columns = self.serializable_attributes
diff --git a/wsgi/coprs/templates/coprs/_coprs_forms.html
b/wsgi/coprs/templates/coprs/_coprs_forms.html
index feece30..f655ffa 100644
--- a/wsgi/coprs/templates/coprs/_coprs_forms.html
+++ b/wsgi/coprs/templates/coprs/_coprs_forms.html
@@ -7,7 +7,6 @@
{{ form.csrf_token }}
{{ render_field(form.id, hidden = True) }}
{{ render_field(form.name) }}
- {# TODO: validate/change arches dynamically by JS #}
{{ render_field(form.release) }}
{{ render_field(form.arches, size = 2) }}
{{ render_field(form.repos, rows = 10, cols = 50) }}
diff --git a/wsgi/coprs/views/coprs_ns/general.py b/wsgi/coprs/views/coprs_ns/general.py
index 7e4ec87..327a7eb 100644
--- a/wsgi/coprs/views/coprs_ns/general.py
+++ b/wsgi/coprs/views/coprs_ns/general.py
@@ -83,7 +83,6 @@ def copr_new():
chroots = ' '.join(form.chroots),
repos = form.repos.data.replace('\n', ' '),
owner = flask.g.user)
- # TODO: verify that user doesn't already have a copr with this name
db.session.add(copr)
db.session.commit()
@@ -156,7 +155,6 @@ def copr_update(username, coprname):
if form.validate_on_submit():
# we don't change owner (yet)
- # TODO: verify that this user doesn't already have copr named like this
copr = models.Copr.query.join(models.Copr.owner).\
filter(models.Copr.name == coprname).\
filter(models.User.openid_name ==
models.User.openidize_name(username)).\
@@ -227,7 +225,7 @@ def copr_give_up_building(username, coprname):
@coprs_ns.route('/detail/<username>/<coprname>/update_permissions/',
methods = ['POST'])
@login_required
-def copr_update_permissions(username, coprname): #TODO: optimize!
+def copr_update_permissions(username, coprname):
copr = models.Copr.query.\
join(models.Copr.owner).\
options(db.contains_eager(models.Copr.owner)).\